Re: Question regarding rbd cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



librbd caches data at a buffer / block level.  In a simplified example, if you are reading and writing random 4K blocks, the librbd cache would store only those individual 4K blocks.  Behind the scenes, it is possible for adjacent block buffers to be merged together within the librbd cache.  Therefore, if you read a whole object worth of adjacent blocks, the whole object could be stored in the cache as a single entry due to merging -- assuming no cache trimming occurred to evict blocks.

When a flush occurs, only buffers that are flagged as dirty written are written back to the OSDs.  The whole object would not be written to the OSDs unless you wrote data to the whole object.

-- 

Jason Dillaman 
Red Hat 
dillaman@xxxxxxxxxx 
http://www.redhat.com 


----- Original Message ----- 
From: "Xu (Simon) Chen" <xchenum@xxxxxxxxx> 
To: ceph-users@xxxxxxxxxxxxxx 
Sent: Wednesday, February 25, 2015 7:12:01 PM 
Subject:  Question regarding rbd cache 

Hi folks, 

I am curious about how RBD cache works, whether it caches and writes back entire objects. For example, if my VM images are stored with order 23 (8MB blocks), would a 64MB rbd cache only be able to cache 8 objects at a time? Or does it work at a more granular fashion? Also, when a sync/flush happens, would the entire 8MB block be written back to ceph, or maybe some offset writes happens? 

Thanks. 
-Simon 


_______________________________________________ 
ceph-users mailing list 
ceph-users@xxxxxxxxxxxxxx 
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com 
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux