CPU Cores with Hyper-threading enabled [message #49141] |
Sat, 30 March 2013 13:56 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
nytros
Messages: 1 Registered: March 2013
|
Junior Member |
|
|
Hello,
I have an i7 server with 4 cores and Hyper-threading enabled. /proc/cpuinfo shows 8 logical cores. My question is how to set the CPU cores in OpenVZ (i use SolusVM).
If i need a VPS to use only 2 REAL cores should i set 2 or 4 in CPU Cores field? If i need it to use all cores should i set 4 or 8? etc. What i mean, the CPU cores field in OpenVZ refers to real cores or logical cores enabled by Hyper-threading?
Thanks,
|
|
|
Re: CPU Cores with Hyper-threading enabled [message #49203 is a reply to message #49141] |
Mon, 08 April 2013 19:36 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
muttled
Messages: 7 Registered: December 2012
|
Junior Member |
|
|
Based on (my understanding of) the way OpenVZ does load balancing, the cpus represented by /proc/cpuinfo are the ones allocated (but shift around, making it unpredictable).
That means if you allocate 4 processors for a container that should have had 2 REAL cores, you're giving them between 50-100% of the actual physical processors (closer to 100% depending on processes) instead of the 50% you were expecting since load would shift around from the HT "logical" processors to the physical processors.
I'd say a rule of thumb would be to assign as many processors as you actually want them to have, and assume that the HT might give a bump sometimes overall when containers are competing for the same real cores. Again, this is based on how I interpret the information from the wiki.
|
|
|