3

We have a MySQL server that supports several internal business systems. Our infrastructure team is having a spirited debate as to whether or not we can switch this database server to a VM. The argument is higher availability from the VM side versus performance from the physical hardware side. Most of the information we have been able to find is rather dated (2009 or earlier).

Does anyone have any experience with virtualizing a production MySQL server and its affect on availability and performance?

Some additional information, DB size is about 100GB, load is not that heavy, but there are a lot of writes.

EDIT: I should also note that the datadir is using a SAN volume

1
  • How many disks back your SAN volume and in which RAID level?
    – pfo
    Oct 25, 2012 at 13:41

4 Answers 4

2

What are your current IOPS(95% percentile @ < 20ms latency) that the MySQL does? If below 100 000/s you can go virtual quite easy and use the same storage device that you used to have before.

MySQL isn't even very effective with multiple cores so assigning more than 4-6 vCPUs isn't going to help due to contention within InnoDB (I assume you run InnoDB).

1
  • Yes we are running InnoDB
    – Peer Allan
    Oct 25, 2012 at 12:34
1

We virtualized a lot of MSSQL and Oracle Databases on HyperV and XEN including some big sharepoint Databases and we don't see any performanc issues. Our whole IT project bussines works on the sharepoint with about 100 concurrent users and a little bigger database than yours and some very big SAP Databases with Oracle under XEN. For the bigger Databases we created pass through disks so that only one layer needs to write. But I think your environment with this small database will work just fine even with virtual disks.

1
  • And for even bigger: Hyper-V now supports 32 virtual CPU's and the whoe disc can go on a SAN and be either ISCSI or FC passthrough - that is QUITE large.
    – TomTom
    Oct 25, 2012 at 18:44
1

If possible, just give it a try? Take a dump of the Database, put it on a VM, and run some benchmarks against it?

With the dump in hand, you can even try more HA ideas like multi-master replication with tools like Galera or other.

0

This used to be an issue (i.e. hypervisor reporting completed disk writes when the I/O subsystem hadn't actually seen the bits yet) but has been common practice for a couple of years now.

Using a recent version of Xen/VSphere there should be no reason not to virtualise a production MySQL server - benchmark predicted workloads against a bare metal equivalent to see how much overhead the hypervisor adds.

If you have many write, SSDs could be recommended.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .