Jun 12

For better or worse, vmware server puts a file onto your harddrive that it uses for memory of a virtual machine. Anyone that has ever had a server that has had to dig into swap knows how much your machine will drag when hard drives are substituted for memory.  Since vmware puts the memory file on disk by default, you are essentially always hitting the drive for most memory operations.  On my workstation (dual quad core with 16 gig of RAM and a 4 disc RAID 5 array) my machine would come to a crawl everytime a VM got busy due to high IO waits.  To fix that, we’re going to mount /tmp as tmpfs (a RAM backed file system that uses physical memory as the disc instead of a hard drive, wicked fast) and tell vmware to store all of it’s memory files in that directory.  This is a two step process. The first is to add the following line into /etc/fstab and then reboot

tmpfs        /tmp        tmpfs    size=12000000k 0 0

Replace the size parameter with the amount of memory that you would like to dedicate to VMs.
Now stop vmware and add the following line to the bottom of /etc/vmware/config

mainMem.useNamedFile=FALSE

Reboot and restart your wicked fast VMs!

May 5

Just a random tidbit I thought I would post. I have a server at home acting as an iSCSI SAN. I ran a batch of hdparm tests against it, a single SATA drive in that array, a 5 disc SAS array in a compaq server and a 4 disc RAID 5 3Ware SATA array. here are the results. These are averages ran over 5 passes BTW on an otherwise silent machine. The CPU’s are all different speeds, but are all of the same class (dual core 800mhz FSB)

5 disc SAS array with 136g 10k drives

Timing cached reads: 13336 MB in 2.00 seconds = 6673.96 MB/sec
Timing buffered disk reads: 98 MB in 1.18 seconds = 83.31 MB/sec

4 disc Linux RAID 5 with 3Ware 9650SE and 500g 7200RPM drives

Timing cached reads: 6576 MB in 2.00 seconds = 3293.08 MB/sec
Timing buffered disk reads: 448 MB in 3.00 seconds = 149.20 MB/sec

Single 500g 7200 RPM SATA drive

Timing cached reads: 14220 MB in 2.00 seconds = 7119.78 MB/sec
Timing buffered disk reads: 198 MB in 3.02 seconds = 65.51 MB/sec

6 500g 7200 RPM SATA drives in a software RAID 5 array

Timing cached reads: 14364 MB in 2.00 seconds = 7191.86 MB/sec
Timing buffered disk reads: 852 MB in 3.00 seconds = 283.64 MB/sec

Now, for those of you that have storage experience, yes I didn’t mention chunk size or any of that fun stuff. But the point that I’m trying to get across is that, if you have the CPU cycles to spare, software RAID can be wicked fast.