MySQL and Virtualization

Cloud and Virtualization
23 April 1:20pm - 2:10pm @ Ballroom F

In this talk, I will discuss how to effectively use MySQL with KVM.
Virtualization has been there for long, however, it is quite underutilized and
also discourage in lieu of performance. However, for a minimal / no loss of
performance, one will be able to take advantage of high availability (obtained from
ability to move VMs across boxes) along with native I/O performance (from
virtio, filesystem passthrough and PCI passthrough), greater instrumentation,
sharing of data (in case of MySQL, the database), lower memory footprint (from
KSM). The talk will also have a developer perspective on how to use it for
MySQL development / testing.


KVM has been one of the latest entrants to the field of virtualization (not
everything is emulated, especially performance intensive, so virtualization !=
emulation here). Its development is quite active (main development takes place
in kernel tree) and has made a mark for itself wrt. performance.

Now, wrt. MySQL, it offers several unique advantages. There are some who are
ready to sacrifice performance (slight compared to bare-metal) in bargain for
features like high availability, backups (live / incremental backups!), the loss
in performance can be compensated by deploying more than one (or whatever
necessary) or by having multiple guests (much better).

Performance is mainly considered under:

1. Network
2. Disk I/O

The talk will stress on each of the two, viz, using virtio / vhost_net for
improved network performance (very close to native) and virtio (instead of
virtualizing, allowing host in host I/O) / PCI passthrough (allowing one to pass
PCI-E devices to guests - fusion-io etc.) / filesystem passthrough (based on 9p,
the rationale being that instead of duplication, passthrough common trees of
filesystem like /usr or /home etc.)

KSM and multiple guests with buffer pools -- this has not explored before by
anyone else. however it will be quite interesting to see this. KSM does
deduplication of pages, so one can get a lower memory footprint while at the
same time maintaining full buffer pools on guests -- this is like the
passthrough equivalent for memory, non-dirtied memory is shared by the guests.

Instrumentation with perf-kvm is supported. This can be used to examine the
guest level events from the host.

Finally, use of KVM in MySQL development / testing will be discussed and
demonstrated. The complete kvm scripting along with above mentioned features
like passthrough will be demonstrated for rapid test <-> development of MySQL.


Raghavendra Prabhu
Software Engineer, Distributed Systems, Yelp, Yelp
Raghavendra Prabhu works as a Software Engineer in Distributed Systems team at Yelp. Prior to that he was the Product Lead of Galera-based Percona XtraDB Cluster (PXC) at Percona. He also works on Xtrabackup and Percona Server intermittently. He joined Percona in the fall of 2011. Before joining, he worked at Yahoo! SDC, Bangalore for 3 years as Systems Engineer, primarily dealing with databases (MySQL and Yahoo Sherpa/PNUTS) and configuration management. Raghavendra's main interests include databases, virtualization and containers, distributed systems, operating systems including linux kernel. He also likes to contribute and has contributed code upstream to several FOSS projects — for more details on that visit In his spare time, he likes to read books, technical papers/literature, listen to music, hack on software, nature hiking, and exploring in general while on vacations. You may also often find him on IRC channels on freenode and/or oftc. Speaking experience ============== He has spoken previously at PLMCE ('13, '14 and '15), FOSDEM ('13), LinuxConfAu ('14 and '15), Fossetcon ('14), ('14), Highload++ ('14) and SCALE 13x ('15). Slides (and details) can be reviewed at Previous recorded talks: ================== Playlist: Slides: Presented paper at IEEE conferences: ======================== i) SOMGPU: Self Organizing Maps on a Graphical Processing Unit for Pattern Classification: Published at IEEE Congress on Evolutionary Computation (CEC) which was part of IEEE World Congress on Computational Intelligence (WCCI) 2008. ii) GNeuron: Parallel Neural Networks with GPU: Presented at 14th International IEEE Conference on High Performance Computing (HiPC) 2007. Social/Contact: =========== Mail :, Twitter : randomsurfer Linkedin : Github : ronin13 Launchpad : raghavendra-prabhu : rdprabhu IRC : tlonim Blog : : Lanyrd : For more, you can contact him at GPG: D72BE977