[pve-devel] Fwd: Re: recommanded cache setting for rbd image

Alexandre DERUMIER aderumier at odiso.com
Tue Nov 6 09:02:50 CET 2012


note that some application, like database, use directio, so it's bypass the cache, and force a fsync for each write.

(like fio with --direct=1).

For rbd, I think it can help a lot, as you can aggregate writes, and flush them once in a single 4MB object.




----- Mail original ----- 

De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mardi 6 Novembre 2012 08:49:51 
Objet: Re: [pve-devel] Fwd: Re: recommanded cache setting for rbd image 

Am 06.11.2012 08:39, schrieb Alexandre DERUMIER: 
> Yes, it's safe, in the meaning of "you can break your filesystem". 
> 
> But you can loose last x seconds of writes if case of powerfailure. 
> 
> also, you need a linux kernel > 2.6.37, or barrier=1 in your fstab for kernel < 2.6.37 
I have ;-) 

> and for windows, you really need lasts virtio driver, which can handle writeback correctly. 
I don't use windows ;-) 

> (Note that cache=none is the same behaviour, you don't have cache on your host, but you always have cache on your disks). 
> If you really don't want to loose any write, go to cache=directsync or cache=writethrough, a fsync is done for each write. (so you are sure that all caches (host,disk,raid controller) are flushed for each write) 

To me the same functionality like normal SATA disks with cache would be 
fine / ok. 

Stefan 



More information about the pve-devel mailing list