[linux-lvm] lvmcache writeback mode and small writes

Paul Richards paul.richards at gmail.com
Thu Jul 4 08:09:47 UTC 2019


Hello there,
I have a question about the behavior of lvmcache with respect to writes
that are smaller than the cache chunk size into chunks that are not
currently cached.

Given an lvmcache using writeback mode, 128KiB chunksize, and nothing
currently cached.

When an application does a 4KiB write followed by an fsync, what
reads/writes occur within lvmcache before the fsync is acknowledged?


Is it roughly:

1. The 128KiB cold chunk is read from the origin LV.
2. The 4KiB write is made into this chunk, and written to the cache LV.
3. Fsync acknowledged.

Or, does lvmcache avoid the read of the origin LV (step 1) by buffering the
smaller-than-chunksize write in the cache LV somewhere?  Perhaps in some
sort of dedicated journal for small writes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20190704/d4a5dbf7/attachment.htm>


More information about the linux-lvm mailing list