[x264-devel] hyperthreading and latency
Jason Garrett-Glaser
darkshikari at gmail.com
Sun Oct 17 13:01:15 CEST 2010
On Sun, Oct 17, 2010 at 3:54 AM, aviad rozenhek <aviadr1 at gmail.com> wrote:
> I have an issue where hyperthreading causes increased latency in x264,
> without improving performance.
> when threads are set to auto on my i7-920, latency is increased by 200ms
> compared to when I set i-threads to be 4.
> I noticed that pthread_num_processors_np() returns 8, even though there are
> only 4 cores on that cpu (8 is the number of "threads" on that CPU)
> the question is, does using 12 threads (8 * 1.5 factor) instead of 6 (4 *
> 1.5 factor) make sense on a 4 core system?
> I think the answer is no and that the default value of X264_THREADS_AUTO
> could work even better on hyper-threaded systems if hyper-threading are not
> considered an actual CPU.
If you need low latency, you should use sliced threads, as explained
in the documentation.
Tests show that hyperthreading improves performance by about 25%
overall under normal conditions. Latency is completely unrelated to
performance, except in that if you force low latency settings, you
will hurt performance.
Dark Shikari
More information about the x264-devel
mailing list