80 likes | 102 Vues
Explore the performance implications of running PostgreSQL 8.1.3 on virtual machines, comparing warm and cold startup scenarios. Discover the overhead causes and conclusions regarding VM setups for database systems.
E N D
Database Systems on Virtual Machines: How Much Do We Lose? Kristin Travis March 2, 2011
Article Information • Authors: Minhas, Yadav, Aboulnaga, Salem • University of Waterloo • Conference: IEEE 24th International Conference on Data Engineering • Date: April 2008
Background • Obvious benefits with using virtual machines • Decreased costs, flexibility, etc. • Virtual machines add performance overhead • Question: is it worth it? • Personal interest
Setup • DBMS: PostgreSQL 8.1.3 • Base System: SUSE Linux 10.1 • VM system uses VMM Xen 3.1 • 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 • “Warm” Experiment • Run the 22 queries to “warm” up the buffer, then measure performance in the 2nd run • Queries experience a fairly large overhead • Slowdown in system time is much larger than slowdown in user time
Overhead Causes • System Call Time • System calls are usually handled by OS, but in the VM most go through the Xen VMM • Negligible in this case • Page Fault Handling Time • 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 • “Cold” Experiment • Restart PostgreSQL and flush the file system caches before running each query • Interesting results: the relative slowdown is not high, and some queries actually run faster • 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 • The many advantages to running a DBMS in a VM does not come at a high cost in performance • Future work: • Different VM environments (Hyper-V) • Different DBMS (MySQL, Oracle, etc.) • Using multiple VMs on one physical machine