[Sheepdog] [PATCH] object cache: make the flushing data more fine grained

Liu Yuan namei.unix at gmail.com
Tue May 15 11:48:55 CEST 2012


On 05/15/2012 05:25 PM, Yunkai Zhang wrote:

> Each time when sheep flushes an cache object, it will flush its whole
> data(4M) to the cluster, even if that object only contains one byte in
> dirty.
> 
> Now I splits an cache object into multiple blocks, each block is 128 KB
> (this size can be switch in range[64, 128, 256, 512] KB defined by BLOCK_SIZE
> macro).
> 
> Each time when client writes an cache object, sheep will caculate which block
> would be modified and mark it as dirty block. Those dirty infomation are saved
> in a bitmap.
> 
> When sheep flushes an canch object, it will not flush the whole data again,
> instead of, it will read the bitmap of this object and only send the data marked
> as dirty block.
> 
> In addition, I replaced flock with lockf so that we only lock on the section we
> care about of an object file.


Thanks. Applied.

Yuan



More information about the sheepdog mailing list