Saturday, January 29, 2011

VMWare Server :: VM set to 2gb RAM but vmware process shows 100mb physical, 1900mb virtual

I've set up a VMWare instance to run CastIron Integration Appliance. I allocated 2gb of memory to the instance, assuming it would take this as physical memory (my server has 8gb total).

When I view top however on the server, the vmware-vmx process has about 100m Resident memory and 1900m Virtual.

Running CastIron it reports that the appliance often hits 50% memory usage. Does this mean I'm using 900mb of harddrive space as memory? I wanted VMWare to use 2gb of physical memory, no swap. Can anyone tell me how to achieve this?

Setup
Debian Lenny 5.0.3
VMWare Server 2.0.2

  • Unless you're using ESX and making VM resource reservations your VM will not be given any more physical memory than is being used, i.e. if you give your VM 4GB but only ever address 1GB then only 1GB of physical memory is taken up.

    I'm not sure where the 50% figure comes from but if that VM's vmware-vmx process is only using 100MB then that's all that's being used.

    Basically don't worry about it :)

    brad : well i'm worrying about it because i'm getting poor performance from castiron. I'm not sure how it reports it's 50% either, but in the vmware admin interface, it shows that my VM has 2gb memory and is using 389mb, but my vmware-vmx process shows 84m physical memory being used. what am I missing?
    From Chopper3
  • First, vmware ALWAYS creates swap. It's required. If you do not set reservations, ESX host creates a .vswp file equal to the difference between the amount of physical memory assigned to the virtual machine and the reservation it has. By default, memory reservations are set to 0. If you have a virtual machine with 2GB of memory without a reservation, it creates a 2GB .vswp file when it is powered on. Whether it uses it or not depends on other factors (primarily do you have enough free ram on the host to support the guests requests). If you make reservations for your virtual machine's that are equal to the amount of RAM assigned to them, swapping and page sharing does not occur.

    Second you can give a vm watever you want but vmware will is only going to report what the guest actually uses. When you set a number for how much ram you want to allocate this is the maximum amount of ram that server will ever use.

    From Jim B
  • VMware Server has a setting to define if you want all VM memory to fit in physical RAM, or allow some of them to be swapped; it's in the host settings.

    If you have more RAM than you're using, you can safely set it to only use RAM; you will then not be able to power on more VMs if there's not enough available physical memory, of course.

    brad : Can you go into more detail? This is exactly what I'm looking for but I don't see anywhere in the web interface where I can define that. What exactly do you mean by 'host settings' ? Is this in some config file? or is it through the web admin interface?
    Massimo : In the web admin interface, if you select the **host** in the inventory on the left panel, you will see a link in the right panel called "Edit Host Settings"; the option is there. This should help: http://www.virtuatopia.com/index.php/Configuring_VMware_Server_2.0_Host-Wide_Settings
    brad : amazing thx....
    From Massimo

0 comments:

Post a Comment