I have a KVM host server running Ubuntu 12.04 LTS, bare bones installation with only KVM installed. The server has an 8 Core Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz CPU with 32GB of RAM and SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05). There are two physical disks installed in a mdraid 1. I am using LVM partitions for /, /var, swap.
I am seeking advice on optimizing the disk performance of my KVM guests on this host configuration. My guests are running Ubuntu 12.04 LTS. One guest runs a CrashPlan PROe Master (not storage) Server (http://www.crashplan.com/enterprise/). CrashPlan PROe Server uses a database that is being read/written fairly intensively with our CrashPlan topology and load. As such, log reviews are indicating that transactions are waiting resulting in degraded performance.
My current guest parameters include:
- Storage Format: RAW
- Disk Bus: SATA
- Cache Mode: None
- IO Mode: Default
- Memory Allocation: 8192 MB
- CPU Allocation: 4
Can anyone suggest best practices to host or guest configuration to optimize performance of KVM guests disk IO performance particularly for random read/write (database)?
Best Answer
I strongly suggest you to try with cache=writeback
With recent OS as guests it will be equally safe (if not better) but generally much faster then cache=none.
I conducted some tests in the past, you can read more here: http://www.ilsistemista.net/index.php/virtualization/43-kvm-scalability-and-consolidation-ratio-cache-none-vs-cache-writeback.html
As a side note, be sure to using VirtIO drivers to get the most from yours HDDs.