MySQL and Virtualization

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

Abstract:
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.

Description:

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.

Speakers

Raghavendra Prabhu
Software Engineer, Percona
Biography: 
Raghavendra Prabhu is the Product Lead of Percona XtraDB Cluster (PXC) at Percona. He joined Percona nearly 2 years ago. Before joining, he worked at Yahoo! SDC at Bangalore for 3 years as Systems Engineer, primarily dealing with databases (MySQL). Raghavendra's main interests include databases and operating systems, specifically linux kernel. He also likes to contribute and has contributed code upstream to several FOSS projects — for more details on that visit http://wnohang.net/code. In his spare time, he likes hacking code, reading books on his kindle DX, playing games over PC and rest of the time spending time over IRC.

Slides