[Sheepdog] [PATCH] object cache: enable direct IO for cache object

Liu Yuan namei.unix at gmail.com
Mon Apr 2 10:31:40 CEST 2012


On 04/02/2012 06:20 AM, MORITA Kazutaka wrote:

> If you don't mind disabling O_DSYNC for a object cache, please support
> following flags:
> 
>  * for users who run VMs in Sheepdog cluster
> 
>    - (O_DIRECT|O_DSYNC|O_RDWR) for backend stores
>    - (O_DIRECT|O_RDWR) for object caches
> 
>    It is because we want to use a host memory for guest VMs.
> 
>  * for users who run VMs outside Sheepdog cluster
> 
>    - (O_DIRECT|O_DSYNC|O_RDWR) for backend stores
>    - only O_RDWR for object caches
> 
>    It is because we can use a memory on the storage node for disk
>    caches of Sheepdog virtual disks.  If you don't mind, I'd like to
>    make this option default since it shows the best storage
>    performance.
> 


I think we'd better not use O_DIRECT even for backend stores as default.

So I'd suggest:
use '-D' or '-directio' to control both object cache and backend stores
whether use page cache or not.

And for object cache, use write-back disk cache. (NO O_DSYNC)
    for backend store, do not use write-back disk cache.(YES O_DSYC)

how do you think of it?

Thanks,
Yuan



More information about the sheepdog mailing list