chore(tiering): add protection against overruning memory budget (#3327)

chore(tiering): Introduce second chance replacement strategy

Introduce hot/cold replacement strategy https://www.geeksforgeeks.org/second-chance-or-clock-page-replacement-policy/

Also, add protection against overruning memory budget
Finally, cancel in-flight offloading requests for entries that were looked up.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2024-07-18 03:52:43 -04:00 committed by GitHub
parent d51fea09e2
commit b9f8671df9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 81 additions and 55 deletions

View file

@ -30,7 +30,7 @@ using namespace std;
ABSL_DECLARE_FLAG(string, dbfilename);
ABSL_DECLARE_FLAG(uint32_t, num_shards);
ABSL_FLAG(bool, force_epoll, false, "If true, uses epoll api instead iouring to run tests");
ABSL_DECLARE_FLAG(size_t, acllog_max_len);
namespace dfly {
std::ostream& operator<<(std::ostream& os, const DbStats& stats) {