[FFmpeg-user] maximum CPU utilization with ffmpeg and libx264
Robert Johnston
anaerin at gmail.com
Tue Mar 22 09:03:23 CET 2011
On March-22-11 1:53:41 AM, Reindl Harald wrote:
> Am 22.03.2011 02:41, schrieb George D Pylant III:
>
>> My understanding is that these cores support hyperthreading allowing two threads
>> to run simultaneously on each core.
>
> yes and no
> since it is not a full core / cpu you can not expect wonders
> HT is using on non-ht-cpus wasted parts of the die (to say it simple)
Hyperthreading is an artifact of Intel's decision to lengthen it's
instruction pipeline, rather than increase the speed of execution. They
found with early test Pentium 4's that the long instruction pipe wasn't
getting anywhere near filled, and thus all their hard work was wasted.
Hyperthreading was implemented as a way of stuffing two shorter
instructions into one long pipe. If the instructions you are sending
are already optimised for VLIW processors (as GCC and the ff devs have
tried to) then pumping these "long" instructions into the "virtual" HT
cores will result in slowdown, as both instruct
ions won't fit in the
pipe. This was demonstrated with properly multithreaded tasks back when
HT was first introduced - It was slower to run a Raytracer with HT
enabled, and taking all cores (real and virtual) than it was to disable
HT and run with "half" the number of cores, or restrict the raytracer
to just the "real" cores, when possible. HT is good for multitasking,
as it can stuff in idle tasks into spare space in the pipe when
available, but it's bad for multithreading and true performance as it
will slow down truly multi-core aware applications.
Hope this helps.
More information about the ffmpeg-user
mailing list