[LAU] i5 Hyper-Threading, BIOS settings and Arch n00b pointers

Len Ovens len at ovenwerks.net
Fri Aug 29 05:40:49 UTC 2014


On Thu, 28 Aug 2014, Kaza Kore wrote:

> I have seen on this list multiple times lately (possibly by the same person, but
> never corrected) a statement similar to thus:
> "I chose an i5 over an i7 as the i5 doesn't have Hyperthreading whereas the i7
> does."
> 
> I always thought I remembered this as wrong, especially as I believed I was
> running a 2 core i5 in my laptop and it shows up as 4 cores. I have just

That is correct. I had forgotten that there was a model of i5 with two 
cores and that one has hyperthreading to make up for it. As I was buying 
MB and processor separate, I looked through Intel's spec list to make sure 
I got one without hyperthreading. I was hopping not to pay for "Boost 
Technology" as well, but the only higher end cpu that can be had without 
boost is the xeon (some of them anyway).

> "The quick explanation is that all Core i7 CPUs use Hyper-Threading, so a
> six-core CPU can handle 12 streams, a four-core can handle eight streams, and a
> dual-core can handle four streams. Core i5 uses Hyper-Threading to make a
> dual-core CPU act like a four-core one, but if you have a Core i5 processor with
> four true cores, it won't have Hyper-Threading. For the time being, Core i5 tops
> out at handling four streams, using four real cores or two cores with
> Hyper-Threading."[1]

Yes that is correct. Thank you for pointing that out. As always, this list 
is a good start, but one's own research is important too.

> As I say, Hyperthreading definitely "works" on my i5 and did with 12.04 as well
> as 14.04. Whether it helps or hinders I have no idea! I do know that the current
> Hyperthreading technology has nothing, or very little, to do with the
> Hyperthrading of the old P4 CPUs and most of the comments I read on it when the
> processors first came out seem to assume they were the same beast. I also know on
> Doze systems having it enabled on an i7 gave massive performance boosts with
> audio software, whereas on the old P4 performance was better with HT disabled (at
> least initially.)

Performance is an interesting word, hyperthreading has always helped 
performance, even audio performance if you are talking about CPU 
throughput. In jackd terms, even on the single core P4, audio was pretty 
solid down to about -p64, then xruns. With hyperthreading off -p16 with no 
xruns was possible. However, overall performance was less too.

> So can anybody point to any conclusive evidence that i-series processors benefit
> from having HT disabled on a Linux based DAW? Preferably benchmarks on a system
> installed with HT Enabled and Disabled using a recent kernel and system.

That does sound interesting. There is a site that tests lowlatency 
performance of a number of machines with RT kernels. Here is one for an i3 
with hyperthreading:
https://www.osadl.org/Profile-of-system-in-rack-0-slot-0.qa-profile-r0s0.0.html

It looks very good, so your comment about the difference between old 
hyperthreading and new may be right. (the highest latency in the plot is 
34us with cycle test) How these test relate to real world audio use I 
don't know. At the top of the above page there is access to the rest of 
the rack slots with different machines that might be there.

> There are also other BIOS settings I would like some recommendation on how to
> set. Also how much difference does it make it functions are turned on in BIOS and
> then Disabled later? I would imaging the other way around would cause more
> difficulties (as maybe the relevant parts of the kernel wouldn't be installed?)
> but have definitely read recommendations to make sure to set up BIOS first.
> 
> The items in question are:
> Intel SpeedStep

Even with the i5, a few months old, setting the CPU to performance over 
ondemand seems to make a difference. Ondemand pretty much means 10ms for 
no xrun latency. Ondemand changes cpu speed in such a way that the OS is 
aware of the cpu speed and can control that speed. Letting the CPU decide 
on it's own can't be better. This is why I turn boost technology off. -p16 
is about .6ms at 48k sample rate and seems to be very stable. In fact 
setting CPU governor to userspace and fixing cpu frequency to 800 MHz 
seems to be more stable than with on demand. (tested on both the i5 and an atom 
netbook)

> CPU Management

Not sure what you mean by that. SMIs? Any time the OS doesn't know what 
the CPU is doing, RT latency suffers. Intel agrees turning them off 
improves low latency, but they also say that in some cases this voids 
warranty...

> Intel Hyper-Threading (mentioned above.)

I don't know that the physical technology matters so much as the OS being 
hyperthreading aware and treating each pair of cores like one. That is 
making sure that core 0 does not do anything that takes too long for core 
1 to meet it's dead line. I do not know if new Linux kernels do this, 
older ones did not. They logged that the chip had hyperthreading, but 
still seemed to treat two threads as two different cores.

Certainly, common wisdom has not kept up with tech changes. I would be 
nice to know more.

--
Len Ovens
www.ovenwerks.net



More information about the Linux-audio-user mailing list