[pve-devel] default cache option=none vs writeback
Stefan Priebe - Profihost AG
s.priebe at profihost.ag
Thu Feb 14 09:27:18 CET 2013
OK that this was maybe just during qemu 1.2 sorry for the confusion.
Stefan
Am 14.02.2013 09:26, schrieb Alexandre DERUMIER:
> qemu rbd driver :( /block/rbd.c)
>
> if (flags & BDRV_O_NOCACHE) {
> rados_conf_set(s->cluster, "rbd_cache", "false");
> } else {
> rados_conf_set(s->cluster, "rbd_cache", "true");
> }
>
>
> and since qemu 1.3
>
> default is BDRV_O_CACHE_WB
> (http://git.qemu.org/?p=qemu.git;a=blobdiff;f=blockdev.c;h=7c83baa353ca11e10af5d6b241aec219d94ff11d;hp=8669142704b9d71c459c9740559c26d91ae772a2;hb=1f212b9d3edd8679bafd3bcf0301795206438724;hpb=9315cbfd8d7074eca44fbc5f93902e97b27d5240)
>
>
> so, rbd cache should work with default qemu 1.3 cache.
>
>
> ----- Mail original -----
>
> De: "Alexandre DERUMIER" <aderumier at odiso.com>
> À: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag>
> Cc: "Dietmar Maurer" <dietmar at proxmox.com>, pve-devel at pve.proxmox.com
> Envoyé: Jeudi 14 Février 2013 09:12:47
> Objet: Re: [pve-devel] default cache option=none vs writeback
>
>>> see for example here:
>>> http://www.spinics.net/lists/ceph-devel/msg06920.html
>
> This seem an "old" post from June, when default cache mode was not writeback. (default is writeback since qemu 1.3)
>
> Maybe can we check the rbd qemu code to be sure ?
>
>
>
> ----- Mail original -----
> .
> De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag>
> À: "Alexandre DERUMIER" <aderumier at odiso.com>
> Cc: "Dietmar Maurer" <dietmar at proxmox.com>, pve-devel at pve.proxmox.com
> Envoyé: Jeudi 14 Février 2013 08:50:34
> Objet: Re: [pve-devel] default cache option=none vs writeback
>
> Hi,
>
> but i think it's still crazy for the users - for me too. An example is
> RBD. Default is writeback but rbd still behaves differently if you
> select default or if you select writeback.
>
> see for example here:
> http://www.spinics.net/lists/ceph-devel/msg06920.html
>
> Stefan
> Am 14.02.2013 07:49, schrieb Alexandre DERUMIER:
>>>> Maybe we should just display 'default' without '= no cache'?
>>
>> I think we should display default(writeback) or default(nocache), but keep displaying the information.
>> Because nobody rtfm the known what is default ;)
>>
>> maybe the best way is to follow qemu:
>>
>> default(writeback) = no qemu cache option for all storages. (with no specific .raw, cache=none, trick)
>>
>> That shouldn't change in the futur I think.
>>
>>
>>>> AFAIK you get very bad performance with qcow2 files and cache=none
>>
>> Not sure about it, it's true with writethrough/directsync because of the fsync and qcow2 metadatas.
>> But it really depends of the physicals storages behind, and their cache implementation.
>>
>> My tests my netapp and nexenta seem to show that cache=writeback have a little overhead vs cache=none,
>> mainly when the host need to flush datas.(tested with iscsi, raw, qcow2).
>>
>> But some storage like rbd have a good writeback cache feature.
>>
>> So it's not easy to auto detect what is the best cache option value.
>>
>>
>>
>> So, maybe keep default qemu writeback is a good compromise ?
>>
>> ----- Mail original -----
>>
>> De: "Dietmar Maurer" <dietmar at proxmox.com>
>> À: "Alexandre DERUMIER" <aderumier at odiso.com>, pve-devel at pve.proxmox.com
>> Envoyé: Mercredi 13 Février 2013 16:31:27
>> Objet: RE: [pve-devel] default cache option=none vs writeback
>>
>>> Currently pve-manager display default = no cache, and currently only raw
>>> files are forced with cache=none.
>>
>> Maybe we should just display 'default' without '= no cache'?
>>
>>>
>>> but since qemu 1.3, default is writeback. It's very confusing for the users.
>>>
>>>
>>> So maybe settings cache=none to disk options for all storages as default
>>> could be great ?
>>
>> AFAIK you get very bad performance with qcow2 files and cache=none
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel at pve.proxmox.com
>> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>>
More information about the pve-devel
mailing list