Put caching web server in vmware

apache-2.2performancevarnishvmware-esx

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?

Best Answer

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.