[FFmpeg-devel] [PATCH] slicethread: Limit the automatic number of threads to 16
Martin Storsjö
martin at martin.st
Mon Sep 5 22:58:29 EEST 2022
On Mon, 5 Sep 2022, Martin Storsjö wrote:
> This matches a similar cap on the number of automatic threads
> in libavcodec/pthread_slice.c.
>
> On systems with lots of cores, this does speed things up in
> general (measurable on the level of the runtime of running
> "make fate"), and fixes a couple fate failures in 32 bit mode on
> such machines (where spawning a huge number of threads runs
> out of address space).
> ---
On second thought - this observation that it speeds up "make -j$(nproc)
fate" isn't surprising at all; as long as there are jobs to saturate all
cores with the make level parallelism anyway, any threading within each
job just adds extra overhead, nothing more.
// Martin
More information about the ffmpeg-devel
mailing list