본문 바로가기
Research/Tools

How to tweak VMware Workstation in linux host

by sunnyan 2010. 6. 17.
728x90

How to tweak VMware Workstation in linux host

   Posted by: nirjhar   in VMware

I use Debian as my primary OS. I have Windows XP installed in one of my partition but that is for only to satisfy my gaming need. My study needs certain things that require Windows. So, I am using VMware Workstation inside my Debian box to host Windows. Currently I have four virtual machines running through VMware. One Windows 2003 Server Enterprise Edition, two Windows XP Professional & one Red Hat Enterprise Linux 5. Among these four virtual machines, other than one Windows XP Professional, three are connected with each other through VMware’s virtual networking interface. Sometimes, all four virtual machines run simultaneously. All these require more processing power. So, I wanted to tweak my VMware to squeeze out every bit of performance as I can. So, one fine Sunday morning, I sat down in front of my desktop, trying to tweak the VMware configurations as much as I can. I have come out with such impressive result which further decreases my processor I/O by 20% and disk I/O by 40%! I think I must share those tweaks with everyone.  I assume that you have some working knowledge in Linux system before you try these tweaks.

Lets start with boot loader. Since, almost every linux uses Grub as boot loader, lets tell the grub loader to disable the tick less kernel option which further reduces the virtual machine’s I/O constraints by reverting back to using ticks which is better supported by VMware. Open the /boot/grub/menu.lst file as root user. Look for the line similar to this “kernel        /boot/vmlinuz-2.6.26-1-686 root=/dev/sda6 ro” . Your kernel version can be different than showed here. Append the following line at the end of the line & save the file.

nohz=off

Good. Now we will edit the sysctl.conf file so that Linux kernel performs better as virtual server. Open /etc/sysctl.conf as root user. Append the following lines at the end of the file & save it.

vm.swappiness = 0
vm.overcommit_memory = 1
vm.dirty_background_ratio = 5
vm.dirty_ratio = 10
vm.dirty_expire_centisecs = 1000

Next, we are going to edit the main VMware configuration file. Open /etc/vmware/config as root user and append the following lines at the end of the file.

mainMem.useNamedFile = FALSE
prefvmx.useRecommendedLockedMemSize=”TRUE”
prefvmx.minVmMemPct=”100″
MemTrimRate = “0″
MemAllowAutoScaleDown = “FALSE”
mem.ShareScanTotal=0
mem.ShareScanVM=0
mem.ShareScanThreshold=1843
sched.mem.maxmemctl=0
sched.mem.pshare.enable = “FALSE”

***IMPORTANT: Set the number in “mem.ShareScanThreshold” to the maximum megabytes of memory available to your VMware Workstation. Else, some errors may occur.

Now, reboot the computer and you are set. VMware will perform much faster than before. You will surely feel the difference.

Please, send me your suggestions and comments. Thank you.

Tags: , ,

This entry was posted on Thursday, March 26th, 2009 at 6:17 AM and is filed under VMware. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
728x90