Operating System - HP-UX
1837023 Members
2300 Online
110111 Solutions
New Discussion

How I can Assign 2 CPU in both Guests if I have 4 CPUs RX6600

 
MJA_1
Advisor

How I can Assign 2 CPU in both Guests if I have 4 CPUs RX6600

I am going to build new HP-UX VM Host with 2 HP-UX Guests in RX6600 which has 4 CPU. Client needs to give 2 CPU to both guests. My question is that ...
Q)How I can assign 2 CPUs to both guests.
Q)If VM Host will assign all 4 CPUs to both Guests 2 for each guests then what will be the performance impact on Hosts and how VM Host will work with CPU if all 4 are utilising from Guests.
Please let me know the best practice method to assign CPUs for 2 gusts in 4 CPUs - RX6600.

Thanks .. MJ
3 REPLIES 3
Tim Nelson
Honored Contributor

Re: How I can Assign 2 CPU in both Guests if I have 4 CPUs RX6600

hpvmmodify -P guest1 -c 2 .....
hpvmmodify -P guest2 -c 2

You can allocate more vcpu than physical cpus. Limited to reserved entitlement ( defaults to 10% ). Theoretically a 4way rx6600 could have 40 guests w/10% entitlement( 10 * 4 ). ( I believe the actual limit is 30 ).

If both VGuests consume all their resources, then yes performance would suffer across the board but this is why you are virtualizing, not all servers need 100% of resources 100% of the time.

If you are planning for both VGuests to consume all the resource then you need to re-think your physical server's resources.

Eric SAUBIGNAC
Honored Contributor

Re: How I can Assign 2 CPU in both Guests if I have 4 CPUs RX6600

Bonjour MJ,

Remember that Integrity VM is a sharing environment, not like vPar. So you can't think that if you "assign" 4 CPU to the guest the Host will be no more able to work.

"Assign" is not realy a good word. In reality, when you "assign" x CPU to a guest, it is more true to think in term of : I give to my VM, wich in reality is a process on the VM Host, the possibilty to execute on x CPU. But you don't assign a given CPU to a given VM. At any time you can share a processor between several VM.

That is so true, that in your configuration, if you give 2 vCPU to each guest, and though you have 4 CPU in your host, you can have both VM sharing one or two CPU and later both VM will sit on different CPU. VM processes always move from one CPU to another. That is what I have observed in versions 2 and 3. Maybe things have changed in version 3.5 ... not yet tested.

So when several VM share a same CPU, entitlement begins : if several VM ask at the same time for 100% of CPU, the CPU will be shared according to the entitlement. It is better to configure entitlement in a relative way, not in an absolute way. To be more explicit if you want to share a cpu with 25% for one VM and 75% for an other one, it is better to do 5% for 1 VM and 15% for the other one : the ratio is the same and the CPU will be shared according to this ratio.

One problem is at the startup of the VM :

- Suppose a 2 Core Host.
- VM 1 as 1 vCPU with 60% --> 30 % of total host CPU
- VM 2 as 1 vCPU with 60% --> 30 % of total host CPU
- VM 3 as 1 vCPU with 50% --> 25 % of total host CPU

Total : 30 + 30 + 25 = 85 % of total host CPU. So should it work ? It seems that yes, but the answer is NO. Suppose VM1 is started and stand on CPU1, VM2 is started and stand on CPU2, you will not be able to start VM3. Entitlement is supposed to be guaranteed, that is "If it is needed, Integrity VM must be able to give to the VM the entitlement asked." So 60% of guaranteed entitlement for VM1 and 60% of entitlement for VM2 --> you CAN'T start VM 3 with an entitlement of 50% because there is a reservation of 60% on both CPU : Integrity VM can't guarantee that, if needed, one VM will be served with 60% and the third one with 50%.

And finally, there is not yet a capping option that could limit the amount of CPU a VM will ask for. The only natural capping is the number of vCPU you give to a VM.

If you want a more precise way to control allocation of CPU, consider gWLM : http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=gwlm



--> I would say there is not really good established "best practices". It's depend. Supposing you want to share equally the CPU between 2 VM, I see 2 options :

- If you want to limit CPU allocation you can give only 2 vCPU to each VM. For the entitlement I wonder ... never tested. Well, suppose you give 5%. So both VM can share the same CPU at a moment. Imagine VM 1 on cPU 1 and 2, vM 2 on CPU 2 and 3. This leaves CPU 4 unused. Suppose in this case that both VM claim for 100% of CPU. That means that you will be able to share only 75% of global host CPU. That's a pity, no ? So the test I have never done is 2 vCPU for each guest and an entitlement > 50%, for example 55% (Contrary to what I just said right now ;-). In this case we can suppose that the 2 VMs will never share a common CPU. Yes, but what if you want to add a third VM ?

- if you don't care with that, and want the more possible power, simply give 4 vCPU to each VM and a 5% entitlement.

IMHO I think the latest option is the simplest and so the best ...

Very sorry if my poor english has complicated my explanations :-(

Regards

Eric
Geoff Wild
Honored Contributor

Re: How I can Assign 2 CPU in both Guests if I have 4 CPUs RX6600

The Admin guide is a great resource:

http://docs.hp.com/en/T2767-90067/T2767-90067.pdf

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.