I've been using VMware for some years now. From the release of Server 1.0 also in development and light-weight production servers environments. As 1.0 has some known limits (only beta 2-way SMP, memory limits, no paravirtualization...) I was waiting for 2.0 with great anticipation - 2.0 beta1 was a disappointment, so I decided to wait for 2.0 beta2.
From what Azmir told as at the VMware World Europe 2008 I give it a test drive the day beta2 was released. And I was more then pleased!
(For the ones that do not want to read the whole story just skip to the end where I put up the necessarily optimizations.)
My Linux choice is Debian - it has always been. So I put up a host - installed Debian Etch 4.0p3, recompiled its kernel with bigmem support and was ready to roll-in the VMware Server 2.0 beta2. It couldn't be easier! I've actually got running the 2.0 beta server from scratch in less then one hour.
The machine isn't some high-end piece of hardware - just an old but good IBM xSeries 225:
2x 2.4 GHz Intel P4 Xeon, hyper threading enabled (so 4 logical processors)
8GB RAM (4x 2GB DDR266 Kingston)
1x 80 GB IDE 7.2k single
2x 36 GB SCSI 10k in RAID1
4x 500 GB SATA 7.2k in RAID5
1x 1 Gbps Broadcom NetExtreme
My first move was to check out the Web interface. It works, it actually works. Cool. So, let's put up some virtual machine on.
3584 MB RAM
virtual disk1 on RAID1 host field
virtual disk2 on RAID2 host field
For web servers (and many other services), my choice is FreeBSD - it has always been. So I've rolled-in the FreeBSD 7.0 for the guest virtual machine. At the first glance it's not looking good. The idle CPU usage of the guest as shown in the host is about 35%. OK, lets go on - install vmware-tools (need to use the FreeBSD 6.0 compatibility libraries - come-on VMware, make the tools for FreeBSD 7.0!), then I recompiled kernel with standard tweaks (100 Hz kernel timer...) and with enabled the all-new ULE_SCHEDULER. Reboot and woila - the idle CPU usage of the guest as shown in the host is about 3-5% which seems to be reasonable.
I did some more testing and the virtual machine seemed to be stable and performing good. So I said to myself - let's take a chance and move to this vm a real high-weigh production web server. So I did - and after a week I can say just this - Server 2.0 beta2 Rocks!
OK, It's true that I have only one vm, but still, this server serves about 200 web pages, all supported by MySQL DBs for content managers. I've got about 5 Mb/s of constant network traffic and around 120 select queries / second in MySQL server. So it is quite a load. And it just works.
As much as I love FreeBSD, I hate VMware & FreeBSD Foundation for not supporting it a little bit more in VMware virtualization. Knowing this I'm using Linux as guest where true performance is needed.
So I went on and installed a Debian Etch 4.0p3 as second guest. I wanted the paravirtualization, so I downloaded kernel 2.6.24-4, enabled it and - WOOHA, this vm with paravirtualized kernel is fabulous! The idle CPU usage of the guest as shown in the host is about just 0-1%.
Up to now I haven't got enough time to put or move a real high-load production server into this second Linux guest machine - but I'll probably clone the configuration and data from the first guest (FreeBSD) to this one - then will do some tests and compare the the load and performance when serving real life load.
Nevertheless, I did one comparable test in both guest machines. Thats what I did for both machines:
same virtual HW configuration for both virtual machines (as shown above);
power on just one guest machine, kill all unnecessarily processes and ran the UNIXbench.
I know that UNIXbench isn't the most modern and best tool to measure performance, but it can give me some idea of how fast the basic UNIX operations are doing in host (Linux), guest 1 (FreeBSD) and guest 2 (Linux paravirtualized).
The final scores of UNIXbench are (see details in attachments):
host (Linux): 442.2
guest 1 (FreeBSD): 47.6
guest 2 (Linux paravirtualized): 219.8
OK, now let me finish the story. So, VMware Server 2.0 beta2 is really great and ready to do some real life, high-load production servers. Especial if you are planing to use paravirtualized Linux guests.
BUT! Beware! Those cool performances WILL NOT come out-of-the box, oh no, many optimizations will have to be done before.
Rule no.1: HOST: optimize disks: spread the load through many disk fields and set writeback and noatime parameters for Ext3 partitions - I can not stress how important this is - it really does impact on whole guest performance;
Rule no.2: HOST: use /dev/shm for tmp dir: (/etc/vmware/config: tmpDirectory = "/dev/shm", make sure you have mounted /dev/shm as big as your RAM is);
Rule no.3: GUEST - all: do standard optimizations:
sched.mem.pshare.enable = "FALSE"
mainMem.useNamedFile = "FALSE"
MemTrimRate = "0"
MemAllowAutoScaleDown = "FALSE"
Rule no.4: GUEST - all: install vmware-tools, enable time synchronization;
Rule no.5: GUEST - all: use vmxnet or at least e1000 for virtual network;
Rule no.6: GUEST - UNIX: reduce timer interrupt demand (100 Hz);
Rule no.7: GUEST - Linux: use tickless timer option (CONFIG_NO_HZ);
Rule no.8: GUEST - Linux: compile paravirtualized kernel.
Well, that would be all. I just can not stress hard enough how well performing the Server 2.0 beta2 is - just make sure you will optimize it properly. Like from almost all software you can not get best results just out of the box - this is even more obvious in the world of virtualization.
Now all what is left for me is to wait for the GA release of Server 2.0 where I do not expect many improvements, but I do expect for VMware to add official support for additional guests (FreeBSD!, Debian...).
Kind regards, Marko Kobal.