Question

I plan to evaluate Riak for production, but i am confused about the Bitcask engine. Documentation says that keeps all keys in memory, so what happen when key total size exceed RAM? Riak crash? or it starts swapping? Also is there any way to calculate how many keys are fit in RAM?

Était-ce utile?

La solution

Bitcask stores all keys in memory together with information about exactly where the object resides on disk, which allows the value of the object to be looked up based on a single disk seek. It is therefore very fast. Only the keys related to the objects stored on a particular node are however kept in memory there, which means storage capacity can be increased by scaling up as well as out. A calculator that can be used to determine how much memory Bitcask will consume is available here.

As it is recommended to run Riak with swappiness set to 0, Riak will crash when running out of memory. Bitcask is therefore generally best suited for bounded data sets where you can control the number of keys in the system. If you have an unbounded data set, it may be worthwhile considering the LevelDB backend instead.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top