VMware

This Question is Answered

1 "helpful" answer available (6 pts)
6 Replies Last post: May 18, 2006 10:45 AM by lschweiss  

Store .vmem files in /dev/shm posted: Mar 18, 2006 5:50 AM

Click to view MichielS's profile Novice 4 posts since
Mar 18, 2006
Hello,

I noticed that VMware Server creates a .vmem file with size of the memory used in the guest OS. Will performance be improved if VMware Server stores the .vmem-files in a temporary directory stored in shared memory (such as /dev/shm)? If so, how can I change that path? I already tried to set tmpDirectory="/dev/shm" in /etc/vmware/config, but that does not help.

In the knowledge base of VMware this topic is covered in answer ID 844 (Configuring Linux Host for Optimal Performance and Virtual Machine Stability).

Thanks!

Re: Store .vmem files in /dev/shm

1. Mar 18, 2006 6:11 AM in response to: MichielS
Click to view KevinG's profile Guru 16,980 posts since
Jan 8, 2004
After making the change tmpDirectory="/dev/shm" did you stop and restart the VMware servivces or reboot the host?

Re: Store .vmem files in /dev/shm

3. Mar 19, 2006 1:11 AM in response to: MichielS
Click to view sfarrell's profile Novice 12 posts since
May 12, 2005
I use this:

mainMem.useNamedFile=FALSE

this moves the rubbishy files to /tmp (like vmem files etc)

and I use tmpfs for /tmp (google and look for that - it uses swap and shared memory to back the file system)

Scott

please award me the answer points for this !!!

Re: Store .vmem files in /dev/shm

5. Mar 19, 2006 2:47 PM in response to: MichielS
Click to view petr's profile Champion 7,218 posts since
Jul 10, 2003
What exactly is stored in the .vmem-files?

Guest memory.

How often does the information change in those files?

Continuously. When stored on disk, kernel updates file on disk whenever it feels it shoud do such.

Since I now moved them to a memory based tmpfs, each VM now uses twice the amount of RAM.

I personally would highly discourage use of tmpfs (or any ram based filesystem) for *.vmem. Your machine may deadlock when you'll put it under memory stress.

It is also possible to switch the usage of .vmem-files off entirely?

No, guest memory must be backed by something, and it does not matter whether it is swapfile or file on filesystem.

Re: Store .vmem files in /dev/shm

6. May 18, 2006 10:45 AM in response to: petr
Click to view lschweiss's profile Novice 9 posts since
May 1, 2006
I've been trying to figure this problem out for a while now. Anytime I have more the 1GB of ram allocated in all the VMs started, the system will get slammed with disk I/O even when the VMs are idle. The CPU gets pegged with 80%+ iowait.

Moving the .vmem to /dev/shm made significant improvement in performance when exceeding 1GB of virtual memory, but still nothing close to the performance when running with less.

In no case has there been any memory paging on the host or in the VM. There is plenty of extra ram.

If putting the vmem files on a virtual disk is not the right way to fix this problem what is?


I'm running VMware on SuSE 10.0 and 10.1 hosts. Each machine has 1.5 and 2 GB or ram respectively. Both have SATA hard drives. At first I was suspicious of the hard drives until I realized difference when allocating more that 1GB total across the VMs.

I'd like to allocate most of the host memory to the VMs, as the VMs are the purpose of the machine, however anytime 1 GB is exceeded the machine becomes so slow it is useless.

Any other insight in to this problem would be greatly appreciated.

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