[FFmpeg-user] Strange CPU usage when running multiple ffmpeg instances

Claudiu Rad jazzman at misalpina.net
Mon Aug 25 21:09:46 CEST 2014


On 8/25/2014 1:47 PM, Tal Maoz wrote:
> When running just one instance of ffmpeg, it uses about 20-25% CPU. I then
> continue to run a few more simultaneous
> instances doing the exact same thing. When I have 4 instances, I see that
> each instance is now using 30-35% CPU.
> When I get to 7 instances, each one is using 40-45% CPU. Finally, when I
> get to 9 instances, each instance uses 55-60% CPU!
> As you will see below, my ffmpeg is compiled with vaapi support, but I've
> already tried running with "-hwaccel none"
> and with "-threads 1" and I still get the same results.
>
> One would expect the CPU usage per instance to remain the same, right? am I
> missing anything here?

well, not really.
how do you measure the cpu usage?
i mean you should consider with growing number of active processes a 
significant increase in the process/thread switching overhead.
still, i think this shouldn't make such differences, but can't be 
completely ignored.
additionally, by using the pipes, network, etc, i wonder if you don't 
trigger any system I/O that piles up.

i'm not an expert but it wouldn't make sense for ffmpeg processes to be 
somehow inter-dependent. and that's why i don't think this is an ffmpeg 
issue, but you have to search for answers in the resources ffmpeg is using.

-- 
Claudiu


More information about the ffmpeg-user mailing list