James B. Byrne
2012-Feb-21 20:59 UTC
[CentOS-virt] How many virtual guest 'cpus' can a core duo 'quad' core support
CentOS-6.2 What is the maximum number of cpus can I configure for a single vm guest running on a host with this hardware? # lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 CPU socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 23 Stepping: 10 CPU MHz: 1998.000 BogoMIPS: 5331.76 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 2048K NUMA node0 CPU(s): 0-3 I ask this because it occurs to me that I may have missed something fundamental respecting the use of the initialism CPU vice the term Cores. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
Trey Dockendorf
2012-Feb-22 07:14 UTC
[CentOS-virt] How many virtual guest 'cpus' can a core duo 'quad' core support
On Tue, Feb 21, 2012 at 2:59 PM, James B. Byrne <byrnejb at harte-lyne.ca> wrote:> CentOS-6.2 > > What is the maximum number of cpus can I configure for a > single vm guest running on a host with this hardware? > > # lscpu > Architecture: ? ? ? ? ?x86_64 > CPU op-mode(s): ? ? ? ?32-bit, 64-bit > Byte Order: ? ? ? ? ? ?Little Endian > CPU(s): ? ? ? ? ? ? ? ?4 > On-line CPU(s) list: ? 0-3 > Thread(s) per core: ? ?1 > Core(s) per socket: ? ?4 > CPU socket(s): ? ? ? ? 1 > NUMA node(s): ? ? ? ? ?1 > Vendor ID: ? ? ? ? ? ? GenuineIntel > CPU family: ? ? ? ? ? ?6 > Model: ? ? ? ? ? ? ? ? 23 > Stepping: ? ? ? ? ? ? ?10 > CPU MHz: ? ? ? ? ? ? ? 1998.000 > BogoMIPS: ? ? ? ? ? ? ?5331.76 > Virtualization: ? ? ? ?VT-x > L1d cache: ? ? ? ? ? ? 32K > L1i cache: ? ? ? ? ? ? 32K > L2 cache: ? ? ? ? ? ? ?2048K > NUMA node0 CPU(s): ? ? 0-3 > > I ask this because it occurs to me that I may have missed > something fundamental respecting the use of the initialism > CPU vice the term Cores. > > > -- > *** ? ? ? ? ?E-Mail is NOT a SECURE channel ? ? ? ? ?*** > James B. Byrne ? ? ? ? ? ? ? ?mailto:ByrneJB at Harte-Lyne.ca > Harte & Lyne Limited ? ? ? ? ?http://www.harte-lyne.ca > 9 Brockley Drive ? ? ? ? ? ? ?vox: +1 905 561 1241 > Hamilton, Ontario ? ? ? ? ? ? fax: +1 905 561 0757 > Canada ?L8E 3C3 > > _______________________________________________ > CentOS-virt mailing list > CentOS-virt at centos.org > http://lists.centos.org/mailman/listinfo/centos-virtThe maximum you can assign to a single VM is the amount of CPUs visible to the KVM host. So a quad core is shows as 4 CPUs to the OS, so you could assign 4 vCPUs to a guest. To see how much is available and seen by KVM run # virsh nodeinfo. - Trey
Todd And Margo Chester
2012-Feb-22 17:25 UTC
[CentOS-virt] How many virtual guest 'cpus' can a core duo 'quad' core support
On 02/21/2012 12:59 PM, James B. Byrne wrote:> CentOS-6.2 > > What is the maximum number of cpus can I configure for a > single vm guest running on a host with this hardware? > > # lscpu > Architecture: x86_64 > CPU op-mode(s): 32-bit, 64-bit > Byte Order: Little Endian > CPU(s): 4 > On-line CPU(s) list: 0-3 > Thread(s) per core: 1 > Core(s) per socket: 4 > CPU socket(s): 1 > NUMA node(s): 1 > Vendor ID: GenuineIntel > CPU family: 6 > Model: 23 > Stepping: 10 > CPU MHz: 1998.000 > BogoMIPS: 5331.76 > Virtualization: VT-x > L1d cache: 32K > L1i cache: 32K > L2 cache: 2048K > NUMA node0 CPU(s): 0-3 > > I ask this because it occurs to me that I may have missed > something fundamental respecting the use of the initialism > CPU vice the term Cores. > >Hi James, I had a dialog with the KVM developers on the subject. The answer is as many as you wish, although performance will suffer if you assign 100 vcpu to a four core machine. Here is my notes on the dialog. -T KVM Cores and Hyperthreading explained: CentOS-virt mailing list: > Do you have a rule of thumb as to how many core to assign > > to a guest? For instance, with an Intel x5650 with 6 real > > and 12 hyperthreaded cores, how many cores would you assign > > to the guest? _______________________________________________ It fully depends on the load of your guests and how many guests you want/need to run on a single server. You need to perform some testing to know what will work the best in your case. One thing to remember though: In your case, if you create two guests with 12 virtual CPUs each, and one of them crashes and take all its 12 virtual CPUs up to 100%, it will essentially take most of the processing power away from the second guest, leaving the second guest in a close-to-useless state (depending on your scheduler, but you get the point). If you on the other hand had assigned 6 cores to each of them, the second guest would have remained unaffected, since it just uses the 6 cores with no load. So if your guest will not utilize the extra CPUs anyway, then don't assign them. Best regards Kenni _______________________________________________ It also depends on what each guest is doing. Some software, like the Postfix MTA, has issues with the timer in a VM and in circumstances like that you want to minimise the number of cores if you can't skip the use of the VM entirely. Kenni is right, though, test it and see whatever works best for your project. Regards, Ben _______________________________________________ You may already know this, but don't rely on hyperthreading giving you very much extra. At best it's squeezing some useful work out of what would be a few idle cycles waiting for the instruction pipeline to re-fill. At worst it degrades performance and has been known to be a security hazard. Therefore, in your given case, think six not twelve. Common advice is to leave one core for the host OS/scheduler. Which leaves you with 5 physical CPUs to allocate. N _______________________________________________ It's how it works, think of kvm as an application. If you tell that it should use 4 core it's like if you tell it to use 4 processes or threads. The host operating system will decide which processor core or thread to use ... Cheers, G
James B. Byrne
2012-Feb-23 19:23 UTC
[CentOS-virt] How many virtual guest 'cpus' can a core duo 'quad' core support
On Wed, February 22, 2012 12:25, Todd And Margo Chester> > Therefore, in your given case, think six not twelve. > Common advice is > to leave > one core for the host OS/scheduler. Which leaves you with > 5 physical > CPUs to > allocate. >Thank you. I never planned to allocate to any guest more cpus that were physically available. What I was checking was that a single physical cpu with four cores actually counted as four cpus insofar as kvm itself was concerned. I have allocated guests their processors on the basis that 1 core = 1 cpu. But it occurred to me that core might actually mean something different and so I wanted to verify my understanding. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
Seemingly Similar Threads
- failed to build llvm since 25de7691a0e27c29c8d783a22373cc265571f5e9 on AMD platform
- failed to build llvm since 25de7691a0e27c29c8d783a22373cc265571f5e9 on AMD platform
- Way to detect virtual machine cpu features
- how to pick cipher for AES-NI enabled AMD GX-412TC SOC tincd at 100% CPU
- NUMA issues on virtualized hosts