We are having to make a design choice in our web environment. At this moment we are stuck at a discussion if we CAN put the varnish caching server into the vmware environment or on dedicated hardware.
My envisioned setup:
varnish/apache servers -> tomcat instances (in vmware) -> mysql cluster
(apache needs to be there because we want to be able to exclude varnish to troubleshoot caching issues)
this setup would serve 30+ tomcat CMS instances of which 3 would be large sites
our main issue would be if we have a large performance degradation if we put the caching server in VMWare
Does anyone here got any experience with caching servers in VMWare?
If you already have the software installed and running, I suggest that you measure the CPU performance on that server. Even if you have other stuff running on the same server, it may not matter. If the CPU load is 33% or less of what that server is capable of, then it is realistic to put it in a virtual machine running on similar or more powerful hardware.
Any potential performance degradation from going virtual depends on the other virtual machines which share the same hardware. Ideally, if you have a heavy CPU load, you should only install virtual machines with a light load on the same server. And the same probably goes for network I/O and disk I/O. But don't jump to conslusions. Measure the load on the CPU, the network and the disks, then make the decision based on those measurements.
Leave yourself some headroom when sizing out your virtual machine server to allow for growth in the load of ALL virtual machines that will go onto it.
Since Varnish is built around serving cached data from memory, by nature it will be light on the disk load, which means that it is a good candidate for running in a virtual machine. But do make sure that the physical server has the ability to expand the RAM, for instance a quad core machine with 16gigs of RAM max, will provide a nice Varnish server with 4G of RAM for the Varnish VM. And if the Varnish VM needs to grow, you can do a simple RAM upgrade rather than migrating to another physical server.
From what I understand, the one major bottleneck of virtual servers is HD access. So if your plan is to use disk-based caching and virtual hard drives I would say you're not going to get very good performance.
If you use a dedicated hard drive for the VM, or if you use memory-based caching, you should be fine, in theory.
One of the servers I manage is an 8 core dedicated box with a 500GiB RAID 10 array and 12 GB of RAM. It runs VMware server 2. One of the virtual machines it runs is a single processor VM with 3 GB of RAM and an Apache webserver, Exim, FTP, MySQl, and more. load on that virtual machine hovers between 1 and 4, and we have seen great results in setting up a second VM to act as a caching proxy, proxing all requests to the first machine. This enables the second VM to have an additional CPU.