[FFmpeg-trac] #485(FFmpeg:new): libx264 does a hidden renice when running multi-threaded !?!

FFmpeg trac at avcodec.org
Sun Sep 18 20:50:50 CEST 2011


#485: libx264 does a hidden renice when running multi-threaded  !?!
----------------------------------+---------------------------------
               Reporter:  rkbwde  |                  Owner:  michael
                   Type:  defect  |                 Status:  new
               Priority:  normal  |              Component:  FFmpeg
                Version:  0.8.3   |               Keywords:
             Blocked By:          |               Blocking:
Reproduced by developer:  0       |  Analyzed by developer:  0
----------------------------------+---------------------------------
 I've been using e.g. "ffmpeg -y  -i blue_sky_1080p25.y4m  -r 15.14 -b
 3600k -vcodec libx264 -threads 0 tst.avi".

 On a quad core Phenom, top showed some 360% CPU usage, so four threads
 were running nicely.

 However, I noticed that cpufreqs governor "ondemand" failed to increase
 cpu clock frequency as expected - resulting in three times higher
 computing time than with cpufreqs governor "performance".

 After doing some experiments, I noticed that disabling ignore_nice_load
 (echo 0 >/sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load) fixed
 the issue.

 This would mean that these "background" threads run on lower priority than
 the main thread, wouldn't it ?

 To me this was quite surprising as I started ffmpeg with normal priority
 and expected all its threads to run on the same priority level.

 Rainer

 P.S. My own multi-threaded test software (computing faculties of large
 numbers) didn't expose this behaviour.

 P.P.S. Version info (packages from packman repository):
 ffmpeg version 0.8.3, Copyright (c) 2000-2011 the FFmpeg developers
   built on Sep  8 2011 19:02:07 with gcc 4.5.1 20101208 [gcc-4_5-branch
 revision 167585]
   configuration: --shlibdir=/usr/lib64 --prefix=/usr
 --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-
 static --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-
 libspeex --enable-libxvid --enable-postproc --enable-gpl --enable-x11grab
 --extra-cflags='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-
 protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC
 -I/usr/include/gsm' --enable-debug --disable-stripping --enable-libgsm
 --enable-libschroedinger --enable-libdirac --enable-avfilter --enable-
 libvpx --enable-version3 --enable-libopencore-amrnb --enable-libopencore-
 amrwb --enable-libx264 --enable-libdc1394 --enable-pthreads --enable-
 librtmp
   libavutil    51.  9. 1 / 51.  9. 1
   libavcodec   53.  7. 0 / 53.  7. 0
   libavformat  53.  4. 0 / 53.  4. 0
   libavdevice  53.  1. 1 / 53.  1. 1
   libavfilter   2. 23. 0 /  2. 23. 0
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/485>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list