VMware server performance
Friday, July 18th, 2008We started using VMware server for virtualization running CentOS 5 as host and CentOS 5 and other operating systems as guests. The servers were Dell PowerEdge 2950s with 4 SAS disks in RAID-10 setup.
However, performance was really poor especially for I/O intensive applications. After browsing around a bit I did the following:
- Change I/O scheduler (host and guest)
echo deadline > /sys/block/sda/queue/scheduler - Increase disk read-ahead (host and guest)
/sbin/blockdev –setra 32768 /dev/sda - Set size of /dev/shm on host server to same as memory size on server (8 GB) via
mount -o remount,size=8G /dev/shm
And adding an entry in /etc/fstab for it to be set up on boot-time as well
tmpfs /dev/shm tmpfs defaults,size=8G 0 0 - And then add some configuration options to the .vmx files (restart of virtual machines needed after the change):
mem.ShareScanTotal=0
mem.ShareScanVM=0
mem.ShareScanThreshold=4096
sched.mem.maxmemctl=0
sched.mem.pshare.enable = “FALSE”
mainMem.useNamedFile = “FALSE”
MemTrimRate = “0″
MemAllowAutoScaleDown = “FALSE”
This indeed the trick. Performance increased significantly!
Specifically I/O intensive operations does not affect the host server and all virtual machines as previously.