OpenVZ Forum


Home » General » Support » Should I enable or disable HyperThreading? (Advantages, disadvantages)  () 1 Vote
Should I enable or disable HyperThreading? [message #38461] Mon, 21 December 2009 21:51 Go to next message
mustardman is currently offline  mustardman
Messages: 91
Registered: October 2009
Member
As it is, using OpenVZ on any recent hardware means I have Hyperthreading and multicore CPU capability. I can disable Hyperthreading in the BIOS or in Grub.conf.

What are the advantages/disadvantages of using Hyperthreading?

My situation is fairly typical. I will be splitting up the server into several VPS's. Each one will get access to a portion of CPU cycles on one core.

If I enable Hyperthreading I get twice the number of cores showing up in OpenVZ but it's not actual number of cores so I have to take that into account and assign more clock cycles for the same level of performance.

In my mind it would be easier to just disable Hyperthreading which simplifies things but I want to get the maximum usage out of my hardware investment.

Searching around the internet I get a mixed bag of opinions on Hyperthreading. Some disable it and some swear by it. I was wondering what sorts of opinions people have around here as it applies to OpenVZ containers.

I will be using this server for Asterisk (VoIP) btw.
Re: Should I enable or disable HyperThreading? [message #38508 is a reply to message #38461] Mon, 28 December 2009 12:08 Go to previous messageGo to next message
foxb is currently offline  foxb
Messages: 12
Registered: December 2009
Junior Member
Here is explanation
http://en.wikipedia.org/wiki/Hyper-threading

As for to enable or disable it is more personal choice.

As for * have in mind that * is really CPU bonded and on high CPU usage you might have quality problems.
Re: Should I enable or disable HyperThreading? [message #38511 is a reply to message #38508] Mon, 28 December 2009 19:43 Go to previous messageGo to next message
mustardman is currently offline  mustardman
Messages: 91
Registered: October 2009
Member
Thanks for the reply.

I am aware of what HT is and what it does. I am interested in real world experiences on OpenVZ.

One advantage from a business perspective is that it doubles the amount of cores as interpreted by OpenVZ. So regardless of what is REALLY happening in hardware, container customers are given the impression they are on 2 cores when really it's only 1 core. Or 4 when it's only 2, 8 when it's only 4.

Yes, I am aware that is more a cosmetic thing but in the VPS business, impressions are important. Some of it is real performance improvement on the node but of course not as much as real physical cores.

I am curious if the openVZ kernel is optimized for HT and what sorts of improvements I can expect to see to determine if it is worth even bothering.
Re: Should I enable or disable HyperThreading? [message #38523 is a reply to message #38511] Tue, 29 December 2009 07:14 Go to previous message
gordan is currently offline  gordan
Messages: 1
Registered: December 2009
Junior Member
I cannot see HT harming OpenVZ performance (bugs notwithstanding). In general, HT will improve performance by:

1) Saving you half of the context switches (which is probably the most expensive operation you can do on a CPU)

2) Reduce the overall memory latency when things aren't in the caches. This is particularly helpful when you have lots of processes running on a machine. The latency to memory is typically around 50-60ns while latency to caches is typically 300-1000ps. If you have twice as many processes scheduled to run, the chances of the memory that at least one of them requires being correctly pre-fetched in the caches increases, so while one of them is waiting for the memory fetch the other can execute and get rotated back out.
Previous Topic: centos4 didn't find ovzkernel-devel, maybe give a try for el5 kernel flavor?
Next Topic: Copy To Container From Host
Goto Forum:
  


Current Time: Fri Mar 29 15:39:29 GMT 2024

Total time taken to generate the page: 0.01849 seconds