OpenVZ Forum


Home » General » Support » CPU Cores with Hyper-threading enabled
CPU Cores with Hyper-threading enabled [message #49141] Sat, 30 March 2013 13:56 Go to next message
nytros is currently offline  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
muttled is currently offline  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.

Previous Topic: Unable to start cxs Watch daemon: /proc/sys/fs/inotify/max_user_watches is set too low
Next Topic: Replatform Debian 6 => CentOS 6.4 - major performance drop
Goto Forum:
  


Current Time: Thu Jul 18 22:24:07 GMT 2024

Total time taken to generate the page: 0.02539 seconds