Operating System - HP-UX
1833778 Members
2416 Online
110063 Solutions
New Discussion

Dynamic Memory on HPVM Guest v. 4.20.05

 
RafS
HPE Pro

Dynamic Memory on HPVM Guest v. 4.20.05

Hi all,
I've some questions about VM's dynamic memory.

1) How can I monitor the VM Guest 4.20.05 memory utilization from the VM Host ?
I need to obtain Current Memory ( now I'm using hpvmstatus -r -P VMGuestName) and Used memory.

2) Is the used memory equal to Available Memory ( obtained with hpvmstatus -r -P VMGuestName ) + swapped memory ?

3) I have the following machines:
- VM_Host1 (v. 4.20.05 )
physical memory = 128 GB

- VM_Guest1 ( v. 4.20.05 )
Total Memory: 64 GB
dynamic_memory_control=0
ram_dyn_type=driver
ram_dyn_min=512M
ram_dyn_max=64G
ram_dyn_target_start=56G
ram_dyn_entitlement=10G
amr_enable=1

- VM_Guest2 ( v. 4.20.05 )
Total Memory: 64 GB
dynamic_memory_control=0
ram_dyn_type=driver
ram_dyn_min=512M
ram_dyn_max=64G
ram_dyn_target_start=56G
ram_dyn_entitlement=10G
amr_enable=1

VM_Guest1 and VM_Guest2 run on VM_Host1.

If I turn on VM_Guest1 and then I turn on VM_Guest2, everything is ok.

If I turn on VM_Guest1, run several processes on the VMGuest1 ( each of which allocate a certain amount of memory using malloc() ), terminate the processes to release the memory, and then I try to turn on the VMGuest2, it doesn't start.
Does anybody know why I can't turn on VM_Guest2 ?
Could you tell me Why on the VMGuest1, Current Memory (56 GB ) >> Target Memory (10 GB ) although Free Memory is about 50 GB ?
Why VMGuest_1 does not share its free memory with VM_Guest2 ?


4) Is there a relationship between available memory+free memory and current memory ?


Thanks in advance

Regards

5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Dynamic Memory on HPVM Guest v. 4.20.05

Shalom,

Couple of things to look at here.

On the host machine, each virtual machine is a process. That process has memory allocated to it and you can monitor memory as simply as using top on the host machine.

You will see based on your current setup the machines will have allocated to them exactly what you have configured them for, 64 GB.

Each VM is an HP-UX machine and standard memory monitor tools will be sufficient to see use inside the guest.

You ask:
Why VMGuest_1 does not share its free memory with VM_Guest2 ?
Why should it? You have allocated two machines with a maximum of 64 GB of ram on a 128 GB Ram system. There is no need for memory sharing based on this setup.

Question 4: I don't understand your question can you restate it?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
RafS
HPE Pro

Re: Dynamic Memory on HPVM Guest v. 4.20.05

Hi Steven,

I know that each VM is a Process, but I would like to monitor, from the VM Host, the VM Guest total memory ( 64 GB ) and the VM Guest used memory ( e.g. as a percentage of the total memory ).

"You ask:
Why VMGuest_1 does not share its free memory with VM_Guest2 ?
Why should it? You have allocated two machines with a maximum of 64 GB of ram on a 128 GB Ram system. There is no need for memory sharing based on this setup."

May be I'm wrong, but I think there is need for memory sharing because in the first case I can start the VM_Guest2 ( not before the VM_Guest1 automatically decreases its target and current memory ), while in the second case I canâ t start the VM_Guest2 ( the VM_Guest1 decreases its target memory but fails to decrease its current memory although free memory is about 50 GB ) and I receive the following error:

#hpvmstart â P VM_Guest2
Warning 1: There is insufficient free host memory for this guest (63045 MB available, max guest allowed 57813 MB).
These problems may prevent HPVM guest VM_Guest2 from starting.
hpvmstart: Unable to continue.


4) â Is there a relationship between available memory+free memory and current memory ? â

Why the VM_Guest1 starts paging when I allocate about 50 GB and current memory is 56 GB ?
Seems that available_memory+free_memory is function of current memory. Is there a mathematical relationship ?

Thanks,
Raffaele
Steven E. Protter
Exalted Contributor

Re: Dynamic Memory on HPVM Guest v. 4.20.05

Shalom,

PSB

I know that each VM is a Process, but I would like to monitor, from the VM Host, the VM Guest total memory ( 64 GB ) and the VM Guest used memory ( e.g. as a percentage of the total memory ).

Can you post ps -ef or top output from the host showing current memory use.

"You ask:
Why VMGuest_1 does not share its free memory with VM_Guest2 ?
Why should it? You have allocated two machines with a maximum of 64 GB of ram on a 128 GB Ram system. There is no need for memory sharing based on this setup."

The OS itself needs less than 1 GB to run and you've set up two VM guests, with 54 GB of permanent ram and 10 GB dynamic. You can from the command line reduce the memory footprint of one system and increase that of the other.

I'm not seeing a need based on current allocation for any sharing to go on. Put up another HPVM and you might get different results.

Please post:
swapinfo -tam
# from the host and both guests.


May be I'm wrong, but I think there is need for memory sharing because in the first case I can start the VM_Guest2 ( not before the VM_Guest1 automatically decreases its target and current memory ), while in the second case I can't start the VM_Guest2 ( the VM_Guest1 decreases its target memory but fails to decrease its current memory although free memory is about 50 GB ) and I receive the following error:

#hpvmstart â  P VM_Guest2
Warning 1: There is insufficient free host memory for this guest (63045 MB available, max guest allowed 57813 MB).
These problems may prevent HPVM guest VM_Guest2 from starting.
hpvmstart: Unable to continue.

Now I see your point. post swapinfo -tam for host and guest1 before start of guest2.

I think you might get both to start if you reduce total to say 62 GB and the dynamic total to 8 GB/guest.

Alternately, you might make more of the total ram dynamic and see if it impacts the system start up footprint.

This is relatively new technology and it doesn't always work as expected.

If you have glance, use it to analyze kernel memory usage on the host. That could be eating up a lot of resources.

In asking for the swapinfo output, I'm betting we find the total system memory use is higher than expected after starting guest1.

I'm also thinking the kernel of the host or even the guest is using a higher level of resources than you expect.

Regards,

Steven
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Emil Velez
Honored Contributor

Re: Dynamic Memory on HPVM Guest v. 4.20.05

VMs do not share memory. Physical memory from the VM host is used for each VM separately and exclusively. IN addition if your VM is 64 GB the process will be 64GB +1% of memory in size. So it will use 68GB of memory.

RafS
HPE Pro

Re: Dynamic Memory on HPVM Guest v. 4.20.05

Dear all,

Probably I'm wrong to explain the problem, so I'll try to clear up the point 3) using an example.

I attached a detailed description.


Thanks again