mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-03-02 22:57:11 -05:00
Thread configuration for transcription in runner #6284
Labels
No labels
Component: Accessibility
Component: Administration
Component: Auth
Component: CLI
Component: Channels
Component: Chapters
Component: Comments
Component: Custom Markdown
Component: Docker 🐳
Component: Documentation 📚
Component: Email
Component: Embed
Component: Federation 🎡
Component: Import/Export
Component: Live
Component: Metadata
Component: Mobile
Component: Moderation :godmode:
Component: Notifications
Component: Object storage
Component: Observability
Component: PeerTube Plugin 📦
Component: Player ⏯️
Component: Playlist
Component: Recommendation
Component: Redundancy
Component: Registration
Component: Runners
Component: SEO
Component: Search
Component: Security
Component: Stats
Component: Studio
Component: Studio
Component: Subscriptions
Component: Subtitles 💬
Component: Transcoding
Component: Upload
Component: Video Import
Component: i18n 🔡
Priority: High
Priority: Low
Priority: Roadmap
Status: Blocked ✋
Status: In Progress 🔜
Status: To Reproduce
Status: Waiting for answer
Template not filled
Type: Bug 🐛
Type: Discussion 💭
Type: Discussion 💭
Type: Duplicate ➿
Type: Feature Request ✨
Type: Maintenance 👷♀️
Type: Performance
Type: Question
UI
good first issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/PeerTube#6284
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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, ...).
@Chocobozzz commented on GitHub (Oct 8, 2025):
I think we can add a thread setting to transcription (maybe using
OMP_NUM_THREADSenv variable).You can also run multiple runners using
--enable-jobCLI option that would have their own concurrency setting.@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.