VMware

This Question is Not Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
3 Replies Last post: Aug 25, 2009 10:49 AM by juchestyle  

VMs not getting enough assigned memory posted: Aug 24, 2009 1:38 PM

Click to view juchestyle's profile Master 1,357 posts since
Jun 20, 2005

Hey guys,

Has anyone run into an issue where a vm tries to use more memory that is assigned to it and the vm can't get the memory?

We have a RHEL 4 32 bit vm that has 2 gigs assigned to it. My linux guy says that process 2779 (java) was out of memory. And that the only way to get it to use more than 512 megs was to apparently reboot the vm.

Anyone ever run into this kind of thing before? This has happened on other linux vms before and reboot was the answer. Other vms on the same host seem to be ok.

Thank you,

Matthew

Kaizen!

Re: VMs not getting enough assigned memory

1. Aug 24, 2009 2:25 PM in response to: juchestyle
Click to view wila's profile Virtuoso 3,266 posts since
Jun 27, 2006
Hi Matthew,

Sounds weird, is the swap partition properly setup?
You can see the amount of swap that is setup/user using either the top or the free command.
The total column for swap in the output of those commands should not be 0.

You can also check if swap is used by running:
swapon -s


If swap is not properly setup then as soon as your host runs out of memory it can only crash an application in order to get more memory.
If you have a swap partition (let's take sda2 here as an example), then you first have to prepare it:
mkswap /dev/sda2

and you can enable it using swapon:
swapon /dev/sda2

For this after a reboot to be used again, you'll have to add it to the /etc/fstab file like:
/dev/sda2               swap                    swap    defaults        0 0


Hope this helps,


--
Wil
_____________________________________________________
VI-Toolkit & scripts wiki at http://www.vi-toolkit.com

Re: VMs not getting enough assigned memory

2. Aug 25, 2009 8:31 AM in response to: juchestyle
Click to view FredPeterson's profile Expert 456 posts since
Apr 19, 2006
Are you sure the java app is configured correctly with the -xms and -xmx parameters to actually 'fit' within the assigned RAM size? This is an application thing and has nothing to do with the VM.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities