What’s the relation between librbd cache and nova disk_cachemodes

asked 2017-11-19 21:14:45 -0500

yafeng gravatar image

Hi,

From Ceph document: The user space implementation of the Ceph block device (i.e., librbd) cannot take advantage of the Linux page cache, so it includes its own in-memory caching, called “RBD caching.” RBD caching behaves just like well-behaved hard disk caching. When the OS sends a barrier or a flush request, all dirty data is written to the OSDs. This means that using write-back caching is just as safe as using a well-behaved physical hard disk with a VM that properly sends flushes (i.e. Linux kernel >= 2.6.32). The cache uses a Least Recently Used (LRU) algorithm, and in write-back mode it can coalesce contiguous requests for better throughput.

It seems rbd cache can improve the IO performance.

And from openstack nova configuration: Setting disk_cachemodes to network=writeback allows data to be written into a cache on each change, but those changes are flushed to disk at a regular interval. This can increase write performance on Ceph block devices.

What’s the relation between librbd cache and nova disk_cachemodes? For VM, Setting disk_cachemodes to network=writeback is enough to improve IO performance? Or Both are needed?

Thanks very much. Br. Yafeng

edit retag flag offensive close merge delete