Revision 70c7302fb5d343fa319e05327ecf88d09fe26a2b authored by haoyuhuang on 26 July 2019, 21:36:16 UTC, committed by Facebook Github Bot on 26 July 2019, 21:41:13 UTC
Summary:
This PR implements cache eviction using reinforcement learning. It includes two implementations:
1. An implementation of Thompson Sampling for the Bernoulli Bandit [1].
2. An implementation of LinUCB with disjoint linear models [2].

The idea is that a cache uses multiple eviction policies, e.g., MRU, LRU, and LFU. The cache learns which eviction policy is the best and uses it upon a cache miss.
Thompson Sampling is contextless and does not include any features.
LinUCB includes features such as level, block type, caller, column family id to decide which eviction policy to use.

[1] Daniel J. Russo, Benjamin Van Roy, Abbas Kazerouni, Ian Osband, and Zheng Wen. 2018. A Tutorial on Thompson Sampling. Found. Trends Mach. Learn. 11, 1 (July 2018), 1-96. DOI: https://doi.org/10.1561/2200000070
[2] Lihong Li, Wei Chu, John Langford, and Robert E. Schapire. 2010. A contextual-bandit approach to personalized news article recommendation. In Proceedings of the 19th international conference on World wide web (WWW '10). ACM, New York, NY, USA, 661-670. DOI=http://dx.doi.org/10.1145/1772690.1772758
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5610

Differential Revision: D16435067

Pulled By: HaoyuHuang

fbshipit-source-id: 6549239ae14115c01cb1e70548af9e46d8dc21bb
1 parent 41df734
History
File Mode Size
delete_scheduler.cc -rw-r--r-- 10.8 KB
delete_scheduler.h -rw-r--r-- 4.8 KB
delete_scheduler_test.cc -rw-r--r-- 24.7 KB
file_util.cc -rw-r--r-- 3.6 KB
file_util.h -rw-r--r-- 1.2 KB
filename.cc -rw-r--r-- 13.4 KB
filename.h -rw-r--r-- 7.1 KB
sst_file_manager_impl.cc -rw-r--r-- 17.7 KB
sst_file_manager_impl.h -rw-r--r-- 7.2 KB

back to top