[Vdo-devel] Questions on write policy, discard and thin provisioning

Gionatan Danti g.danti at assyoma.it
Sat Mar 3 00:21:59 UTC 2018


> We only recently made VDO's write policy 'sync' issue correct flushes
> and FUAs for storage with a writeback cache, so we have not had years
> of testing the correctness of the flushes VDO uses in sync mode as we
> have in async mode.
> 
> The penalty for using sync mode on storage with a volatile write cache
> is a large performance due to the flushing of the cache that VDO has
> to do in sync mode, much more than in async mode. Also, we only
> recently made VDO issue what we believe to be correct flushes and FUAs
> for storage with a volatile write cache when in sync mode.

Ok, lets see if I understand it now:
- in the past, sync policy *required* any writes on the underlying 
device to be really written to stable storage. Any FLUSH/FUA from the 
upper layer filesytem was ignored;
- now, sync policy on a device with a volatile cache writes *everything* 
with sync/FLUSH/FUA enabled (ie: similar to O_SYNC for files), with 
degraded performance due to increased flushes. This also means vdo has a 
method to discover if a device has a volatile writeback cache (and this 
is in line to what I read in the man page [1]);
- async write policy implements barrier passing from the upper layer 
filesystem down to the underlying block device, but writes are not all 
automatically marked synchronous (no FLUSHes/FUAs on all writes by 
default).

So:
- sync with writethough cache -> ok;
- sync with writeback cache -> prone to dataloss on previous version; 
reduced performance, but no data loss (bugs aside) on current version;
- async with writethough cache -> akin to sync with writethough cache;
- async with writeback cache -> ok, flushes happen only when the upper 
layer filesystem issues them.

Right?
Thanks.

[1] 
https://github.com/dm-vdo/vdo/blob/6ae275d372f1335600b5094451b9c9f8f6aef19f/vdo-manager/man/vdo.8

-- 
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti at assyoma.it - info at assyoma.it
GPG public key ID: FF5F32A8




More information about the vdo-devel mailing list