]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Add random cache and replace SharedLRU in KeyValueStore
authorHaomai Wang <haomaiwang@gmail.com>
Thu, 20 Mar 2014 08:20:39 +0000 (16:20 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Wed, 9 Jul 2014 02:53:06 +0000 (10:53 +0800)
commit6ff5fedb300f710fb4a06442b0d778b408631706
tree62cc16694fb17672d737afc00fb3233a0eaee9ab
parent73b2928acf4ebfa1c80100bb5a7a28cbdf6a5965
Add random cache and replace SharedLRU in KeyValueStore

SharedLRU plays pool performance in KeyValueStore with large header cache size,
so a performance optimized RandomCache could improve it.

RandomCache will record the lookup frequency of key. When evictint element,
it will randomly compare several elements's frequency and evict the least
one.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/common/config_opts.h
src/common/random_cache.hpp [new file with mode: 0644]
src/os/KeyValueStore.cc
src/os/KeyValueStore.h