[Sheepdog] [PATCH] sheep: disable object cache by default

Liu Yuan namei.unix at gmail.com
Mon May 7 05:27:33 CEST 2012


On 05/07/2012 10:53 AM, Liu Yuan wrote:

>>  - Cached data should be synced periodically.  Currently, the data is
>> >    not synced at all until SD_OP_FLUSH_VDI is requested.
>> > 
> 
> I don't think so. It is simpler and cleaner for us only implement flush
> mechanism and let flush policy be determined by VM. We should only
> guarantee the data consistency when we are asked for it.
> 
> Only problem we have is that if VM crashed, what should we do with the
> dirty object? I thought of a timeout mechanism, but then I dropped it
> because
> 
> 1) upper layer knows better than us
> 2) upper layer can make use of qemu-io to issue flush request or simply
> restart the VM.
> 


Further more, I think what you envision about the object cache is more
reflected in the sheepfs, which export a file abstraction in the local
file system hierarchy. This means,

1) VM can make advantage of kernel's page cache for readahead, async
writeback, cached data in memory to honor the 'cache=writeback' as the
same semantics as usual instead of relying object cache to implement it
slightly different.

2) more fragile than object cache which caches data in local disk
because page cache is implemented as a memory cache.

The overall performance of sheepfs exported storage using page cache is
better than object cache, though not as durable as object cache. Plus,
we can still use sheepfs with object cache to reduce network traffic.

Thanks,
Yuan



More information about the sheepdog mailing list