Database Systems on Virtual Machines How Much Do
Database Systems on Virtual Machines: How Much Do We Lose? Kristin Travis March 2, 2011
Article Information l Authors: Minhas, Yadav, Aboulnaga, Salem l l l University of Waterloo Conference: IEEE 24 th International Conference on Data Engineering Date: April 2008
Background l Obvious benefits with using virtual machines l l Decreased costs, flexibility, etc. Virtual machines add performance overhead Question: is it worth it? Personal interest
Setup l l l DBMS: Postgre. SQL 8. 1. 3 Base System: SUSE Linux 10. 1 VM system uses VMM Xen 3. 1 l l VM also runs SUSE Linux 3 GB memory, 1 virtual CPU Test DB is 2 GB in size, ensuring that the entire DB can fit in memory 22 TPC-H queries are run in identical settings on both machines
First Experiment l “Warm” Experiment l Run the 22 queries to “warm” up the buffer, then measure performance in the 2 nd run Base Runtime (secs) Xen Runtime (secs) Relative Slowdown (%) Q 3 4. 61 5. 82 26. 23 Q 9 10. 52 11. 36 7. 91 Q 13 13. 36 14. 1 5. 59 Q 18 8. 86 10. 13 14. 36 Q 21 2. 3 2. 48 7. 84 Queries experience a fairly large overhead l Slowdown in system time is much larger than slowdown in user time l
Overhead Causes l System Call Time l l l Page Fault Handling Time l l System calls are usually handled by OS, but in the VM most go through the Xen VMM Negligible in this case Page faults in Xen are more than twice as expensive as they are in the base system The average relative slowdown of all 22 queries is only 9. 8%
Second Experiment l “Cold” Experiment l l Interesting results: the relative slowdown is not high, and some queries actually run faster l l l Restart Postgre. SQL and flush the file system caches before running each query Slowdown is caused by disk I/O, having to read from the disk every query Some queries run faster because Xen VMM aggressively prefetches data for the VM The average relative slowdown of all 22 queries is only 6. 2% (better than “warm” experiment)
Conclusions l l The many advantages to running a DBMS in a VM does not come at a high cost in performance Future work: l l l Different VM environments (Hyper-V) Different DBMS (My. SQL, Oracle, etc. ) Using multiple VMs on one physical machine
- Slides: 8