JS Ext

Thursday, April 4, 2013

Qemu Snapshot Performance

A few months ago, I Added logging to my VM backup script.  This allowed me to keep metrics on the qemu-snapshot operation.  I did an 'ls' before and after the snapshot.  I also logged how long it took to perform the snapshot.  I decided to share the data that I have collected.

Each different data series represents a different virtual hard disk.  The different disks were used in different ways by different operating systems.  This caused different Qemu disks to vary in performance.  Also, this computer is more than just a VM server.  The snapshotting does take place at night, though, so there should be minimal interference.  The Y-Axis represents the speed of the snapshotting process measured in MB per second.  Higher is better.

For starters, the blue circles represent the 40GB C Drive of a Windows XP VM.  This was my primary gaming VM.  For 6 months, I only took occasional snapshots.  For the last 6 months, I took weekly snapshots.  Since I wasn't keeping metrics, I don't know if snapshotting slowed down over time or if they were always slower.  By the time I started keeping metrics, it took about an hour (64 minutes on average, or 14MB/s) to take a snapshot.  This disk was stored on an SSD.

A few months ago, my Windows XP gaming VM significantly degraded in performance.  I decided to install Windows 7 64-bit onto a fresh virtual disk.  This fresh disk was also on the SSD.  This disk is represented by the orange diamonds.  The first weekly backup that I took was slow, but after that, it averaged at 230MB/s.

I keep a separate virtual disk for the D: drive of my gaming VM.  The D: drive is represented by the yellow triangles.  This disk averaged around 350MB/s.  There was one backup that ran far slower at 29.6MB/s.  This was the first backup that occurred after installing Windows 7.  After the upgrade, I moved a lot of my games (6.6GB of data) from the C: drive to the D: drive.  This increase of disk usage caused the snapshot to take a lot longer.

The other 2 disks represent the C: drives of 2 other Windows 7 VMs.  Those VMs don't see as much usage as the gaming VM, though.  They tend to snapshot at around 300GB/s except for a few (unexplainable) exceptions.

One thing that was interesting about the data was the comparison between SSD and HDD.  The fresh install on the SSD (orange diamond) averaged around 230MB/s while the other virtual disks on HDD tended to average around 300MB/s.  This result seems counter-intuitive.  I have run the VM with the disk on an SSD and on an HDD to compare the different.  Windows does run faster on the SSD.  It seems weird that the snapshot takes longer.

This data represents 3 months of weekly backups.  The disk that had the slowest backups was active for a little more than a year.  It was also the one that saw the most data change from day to day.  Every few months, I will look at the data to see if there is a pattern of degradation.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.