News for hackers. Stuff that matters.
Re:Riak's Bitcask - A Log-Structured Hash Table For Fast Key... by rozim on Tuesday January 11, 2011 @11:26AM (#2092339)
To me this is all nice and straightforward except for the merge i.e. when does it happen? Magically in the background or only at restart.

In either case then the question is how does this affect the responsiveness of the system.

This paper http://downloads.basho.com/papers/bitcask-intro.pdf is a nice easy ready with another level of detail over the linked to article.

I suspect they could consider - varint encoding of the key and value sizes on disk - aligning some writes to disk block boundaries to avoid spanning 2 blocks

though both probably only have minor gains.

For more inspiration see Jeff Dean's comments on the SSTable data structure at Google: http://osdi2006.blogspot.com/2006/10/paper-bigtable-distribu...

Re:Riak's Bitcask - A Log-Structured Hash Table For Fast Key... by metabrew on Tuesday January 11, 2011 @01:45PM (#2092989)
Riak has "windowed merges", ie you can schedule compaction at your off-peak times. Or not at all, I guess, if you never delete or modify existing data.
Re:Riak's Bitcask - A Log-Structured Hash Table For Fast Key... by siculars on Tuesday January 11, 2011 @02:41PM (#2093136)
the window merge is a new thing in riak 0.14, i believe. and you are correct the merge is only a consideration based on your use case. if you are using riak as a pure dump of immutable data you will not need to merge. if, however, your use case consists of a number of edits you should consider a more aggressive merge strategy. As all updates/deletes are appended to bitcask and are actually writes, your dead bytes will start growing rapidly.