[LAU] How to turn off hyperthreading?
Len Ovens
len at ovenwerks.net
Sun Dec 22 21:09:33 UTC 2013
On Sun, 22 Dec 2013, Jeremy Jongepier wrote:
>> This option is the preferred way to isolate CPUs. The alternative,
>> manually setting the CPU mask of all tasks in the system, can cause
>> problems and suboptimal load balancer performance."
>
> Thanks for the valuable information! If you don't mind I'll add it to
> http://wiki.linuxaudio.org/wiki/system%20configuration
I don't mind, it is not my info after all :)
>
> I thought just disabling them like:
>
> CPU=( cpu1 cpu3 cpu5 cpu7 )
> for i in "${CPU[@]}"
> do
> echo 0 > /sys/devices/system/cpu/$i/online
> done
>
> would do the trick too but on my own system I still can't go lower than
> -p128 so hopefully the isolcpus parameter improves stability.
>From the bit above, it would appear that "turning the cpu off" while the
system is running only stops the kernel from assigning new tasks to a cpu,
but does not move threads already assigned to a new cpu. Concidering that
you probably run that script pretty early at boot, probably everything
assigned to those cpus is system and will run till shutdown. (just a guess
on my part though) There are utilities that can push tasks from cpu to
cpu, but I am not familiar with them.
With hyperthreading on, i am still able to run my delta 66 at -p64 with no
xruns. With hyperthreading off I can run the same card at -p16 with
guitarix and no xruns. So hyperthreading only makes a difference (for me)
below -p64.
Of note, I moved the card to not only a clear irq PCI slot, but the pci
slot with the highest clear irq. I had a midi interface in the next higher
irq and had problems till I switched them around phyically.
This is an older computer... single core P4 at 2.4Ghz and 2.5G ram.
--
Len Ovens
www.ovenwerks.net
More information about the Linux-audio-user
mailing list