Randomization in hastd(8) synchronization thread

Maxim Sobolev sobomax at sippysoft.com
Tue May 17 20:20:11 UTC 2011


Hi Pawel,

I am trying to use hastd(8) over slow links and one problem is apparent 
right now - current approach with synchronizing content sequentially is 
not working in this case. What happens is that hastd hits the first 
frequently updated block and cannot make any progress anymore. In my 
case I have 30GB of dirty space to be synchronized over just 1mbps uplink.

The quick fix that I've applied is randomization in the block selection 
code. This way  eventually all least used blocks will be synchronized, 
leaving only hot ones dirty. More effective approach would be to use 
some kind of LRU selection algorithm, but statistical approach would 
work just as good in this case.

Please review the patch below:

http://sobomax.sippysoft.com/activemap.c.diff

The next thing to make it usable is to make "async" mode working. I 
think simple support for that mode can be easily implemented by not 
sending write request to the remote note at all, but instead just doing 
it locally and kicking the synchronization thread to do it's magic in 
the background. I hope to follow up with the patch soon.

Regards,
-- 
Maksym Sobolyev
Sippy Software, Inc.
Internet Telephony (VoIP) Experts
Tel: +1-646-651-1110
Fax: +1-866-857-6942
Web: http://www.sippysoft.com
MSN: sales at sippysoft.com
Skype: SippySoft


More information about the freebsd-current mailing list