KVM scalability and consolidation ratio: cache none vs cache writeback

Written by Gionatan Danti on . Posted in Virtualization

User Rating:  / 8
PoorBest 

Host scaling: CPU

How the host responds to the ever-increasing load? Lets start from CPU scaling:

At first, it seems that the write-back cache comports a noticeable toll on CPU performance: even accounting for the increased speed, total CPU load is quite high.

However, a deeper analysis show that increased CPU load is really due to the increased WAIT time, which is the time the CPU is spending waiting for the I/O subsystem to catch-up.

Hey, wait a moment (no pun intended): why enabling the wb cache actually results in increased disk WAIT time? The fact is that the writeback cache enables much more parallelism in the I/O stack, resulting in the disk working much harder, and more threads are concurrently marked as “executable” by the scheduler.

While CPU is waiting for I/O to complete, the process requesting the I/O operation is blocked, but the CPU is free to execute another thread. This means that real CPU load should be obtained summing USER and SYS loads, and in this case we see only a very mild increase in CPU load between the nocache and wb-cache scenarios (perfectly justified by the increased performance).

In short: enabling the write-back cache is a non-issue from a CPU standpoint, at least when using buffered I/O (as is the case with direct access to LVM-based disks).

Comments   

 
#1 Troels Arvin 2014-01-20 20:24
Where can one read more about the potential issues with write barriers and live migration?
 
 
#2 Gionatan Danti 2014-01-21 10:20
Quoting Troels Arvin:
Where can one read more about the potential issues with write barriers and live migration?


Hi,
here you can find some informations on barriers:
http://www.ilsistemista.net/index.php/virtualization/23-kvm-storage-performance-and-cache-settings-on-red-hat-enterprise-linux-62.html?start=2

On live migration and why it is better to not use it with caching, you can read libvirt and qemu man page.

Regards.
 

You have no rights to post comments