L'octidi 8 fructidor, an CCXXII, Tal Maoz a écrit : > One would expect the CPU usage per instance to remain the same, right
Not with hyperthreading. Hyperthreading is like multitasking on a single
core, only with a time-slice of about one CPU instruction (and no context
switch overhead). When a single thread is running, it gets 100% of the CPU
speed, but when two threads are running doing roughly the same thing, they
both get about 50% of the CPU speed.
You can try this (zsh syntax):
for i in {1..4}; { openssl speed aes > $i.txt & }
You will notice that all have roughly the same speed, and the same speed as
a single instance alone. Now replace 4 by 8: all will go at about half
speed.
But as seen by the operating system, and therefore as visible in any process
accounting tool, the threads are not sleeping, they are both running on two
CPUs, each twice slower than normal. So they need twice the same amount of
CPU to perform their task.
Regards,
--
Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-user
