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

MORITA Kazutaka morita.kazutaka at gmail.com
Mon Apr 2 11:18:17 CEST 2012


On Mon, Apr 2, 2012 at 5:31 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> 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.

Any reason?  At least, the simple_store driver with O_DIRECT works
well on my environment.

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

It means Sheepdog uses a page cache in both object cache and backend
stores when we don't specify '-D'.  To achieve the best performance,
we should maximize the size of object cache by using O_DIRECT to the
backend stores.

Thanks,

Kazutaka


>
> 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