[FFmpeg-user] ffmpeg multithreaded performance bad for specific physical machine

P. Remek p.remek1 at googlemail.com
Thu Oct 6 23:25:25 EEST 2016


I have some update regarding my original question: we figured that if
we switch off linux watchdog with "echo 0 > proc/sys/kernel/watchdog"
the multithreaded behaivor and performance of ffmpeg goes back to
normal. We don't know yet why is that because on our two socket
physical machine the performance is normal even with this switched on.
Any ideas?


On Fri, Sep 30, 2016 at 11:17 PM, P. Remek <p.remek1 at googlemail.com> wrote:
> Hello,
> I am facing rather interesting problem and am slowly running out of
> ideas. It seems that ffmpeg running on one of our physical machines
> has performance problems when running with multiple threads.
> We have two physical boxes:
> First: 2-socket Intel Xeon E5-2630 v2
> Second 4-socket Intel Xeon E7-8867 v3
> First seems ok, when I run encoding with 1 thread I get ~20 fps, with
> 2 threads ~40 fps. So it scales up as expected.
> The second however, with 1 thread I get ~25 fps, and with 2 threads it
> stays roughly the same on ~25 fps - so, no scale up.
> What is also interesting that the CPU consumption (viewed using htop)
> looks comparable on both machines when running 2 threads - basically 3
> cores are spinning somewhere around 80% but with different end result
> (20 vs 40 fps).
> I already excluded hyperthreading (disabled on both), numa issues (I
> am starting the command with taskset to bind the execution to cores
> running on same socket) and specific instructions which are different
> on our different CPU families - like for example AVX2 which is only on
> our E7 cpu (I disabled everything using -cpuflags 0, -x264opts asm=0)
> I also tried to compile the binaries directly on the tested machines
> to exclude some CPU-specific compile time optimizations which might
> take effect.
> Does anybody have an idea where else could be the problem?
> Here is the command which I use to run the test:
> root at lab-node3:~/ffsource/ffmpeg-3.1.3# taskset -c 1,2,3 ./ffmpeg
> -cpuflags 0 -f lavfi -i testsrc=duration=60:size=1024x576:rate=25
> -threads 2 -preset veryfast -c libx264 -x264opts asm=0 -f mpegts -
> Regards,
> Prema

More information about the ffmpeg-user mailing list