database systems on virtual machines: how much do we lose?

8
Database Systems on Virtual Machines: How Much Do We Lose? Kristin Travis March 2, 2011

Upload: isabelle-oconnor

Post on 30-Dec-2015

27 views

Category:

Documents


1 download

DESCRIPTION

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 24 th International Conference on Data Engineering Date: April 2008. Background. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Database Systems on Virtual Machines: How Much Do We Lose?

Database Systems on Virtual Machines: How

Much Do We Lose?

Kristin Travis

March 2, 2011

Page 2: Database Systems on Virtual Machines: How Much Do We Lose?

Article Information

Authors: Minhas, Yadav, Aboulnaga, Salem University of Waterloo

Conference: IEEE 24th International Conference on Data Engineering

Date: April 2008

Page 3: Database Systems on Virtual Machines: How Much Do We Lose?

Background

Obvious benefits with using virtual machines Decreased costs, flexibility, etc.

Virtual machines add performance overhead Question: is it worth it? Personal interest

Page 4: Database Systems on Virtual Machines: How Much Do We Lose?

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

Page 5: Database Systems on Virtual Machines: How Much Do We Lose?

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

Base

Runtime

(secs)

Xen

Runtime

(secs)

Relative

Slow-down (%)

Q3 4.61 5.82 26.23

Q9 10.52 11.36 7.91

Q13 13.36 14.1 5.59

Q18 8.86 10.13 14.36

Q21 2.3 2.48 7.84

Page 6: Database Systems on Virtual Machines: How Much Do We Lose?

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%

Page 7: Database Systems on Virtual Machines: How Much Do We Lose?

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)

Page 8: Database Systems on Virtual Machines: How Much Do We Lose?

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