Thread configuration for transcription in runner #6284

Open
opened 2026-02-22 12:41:58 -05:00 by deekerman · 2 comments
Owner

Originally created by @alejandrocobo on GitHub (Sep 27, 2025).

Describe the problem to be solved

Hi. I have a new server intended just to run Peertube jobs. In the configuration file of the Runner, there is a parameter called "concurrency" that apparently set the number of parallel jobs allowed to run.

Whisper uses 4 threads by default while I've set ffmpeg to run just 1 thread. The problem is that this parameter treats a Whisper process the same than a ffmpeg process while they demand a very different amount of CPU.

My suggestion is to be able to set a concurrency parameter for "ffmpeg" and another for "transcription". In fact, it would be great that the concurrency parameter counted the total amount of threads to run instead of the processes.

But by having just a different "concurrency" parameter for each type of job would do the trick.

Thanks.

Describe the solution you would like

Have multiple "concurrency" parameters: one for each kind of job (ffmpeg, transcription, ...).

Originally created by @alejandrocobo on GitHub (Sep 27, 2025). ### Describe the problem to be solved Hi. I have a new server intended just to run Peertube jobs. In the configuration file of the Runner, there is a parameter called "concurrency" that apparently set the number of parallel jobs allowed to run. Whisper uses 4 threads by default while I've set ffmpeg to run just 1 thread. The problem is that this parameter treats a Whisper process the same than a ffmpeg process while they demand a very different amount of CPU. My suggestion is to be able to set a concurrency parameter for "ffmpeg" and another for "transcription". In fact, it would be great that the concurrency parameter counted the total amount of threads to run instead of the processes. But by having just a different "concurrency" parameter for each type of job would do the trick. Thanks. ### Describe the solution you would like Have multiple "concurrency" parameters: one for each kind of job (ffmpeg, transcription, ...).
Author
Owner

@Chocobozzz commented on GitHub (Oct 8, 2025):

I think we can add a thread setting to transcription (maybe using OMP_NUM_THREADS env variable).
You can also run multiple runners using --enable-job CLI option that would have their own concurrency setting.

@Chocobozzz commented on GitHub (Oct 8, 2025): I think we can add a thread setting to transcription (maybe using `OMP_NUM_THREADS` env variable). You can also run multiple runners using `--enable-job` CLI option that would have their own concurrency setting.
Author
Owner

@alejandrocobo commented on GitHub (Nov 1, 2025):

Hi @Chocobozzz, sorry for the late response (again).

The point here is that I have a 12 cores CPU (SMT disabled) and I'd like that Peertube wouldn't use more than 10 cores. For that, I need to be able to set a configuration from which I won't surpass that amount of threads. Setting the OMP_NUM_THREADS is an option so by using the same number of threads in ffmpeg and Whisper, would solve my problem. In fact, without OMP_NUM_THREADS, I just have to set the ffpmeg number of threads to 4 and problem solved (2 processes = 8 threads < 10).

But I think, being able to set how many Whisper and ffmpeg processes will be executed separately would be more flexible. Meaning that, I want ffmpeg to use just 1 thread while I don't mind Whisper using 4 or more threads. With the workaround you propose, I am forced to set just 1 thread for Whisper.

@alejandrocobo commented on GitHub (Nov 1, 2025): Hi @Chocobozzz, sorry for the late response (again). The point here is that I have a 12 cores CPU (SMT disabled) and I'd like that Peertube wouldn't use more than 10 cores. For that, I need to be able to set a configuration from which I won't surpass that amount of threads. Setting the OMP_NUM_THREADS is an option so by using the same number of threads in ffmpeg and Whisper, would solve my _problem_. In fact, without OMP_NUM_THREADS, I just have to set the ffpmeg number of threads to 4 and problem solved (2 processes = 8 threads < 10). But I think, being able to set how many Whisper and ffmpeg processes will be executed separately would be more flexible. Meaning that, I want ffmpeg to use just 1 thread while I don't mind Whisper using 4 or more threads. With the workaround you propose, I am forced to set just 1 thread for Whisper.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PeerTube#6284
No description provided.