Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "server: Add memory check during eviction"
This reverts commit 1cde153ceafb59901ad133317b85d357573cf2df. Reason for revert: While this CL was attempting to address a reasonable conern (under-eviction), it unfornately goes too far in the opposite direction and over-evicts as well as unnecessarily burning through additional CPU cycles. As background, when we determine we need to evict some bytes in `do_eviction()`, we send messages to domains requesting them to evict some number of bytes. Those messsages are sent _asynchonously_, and any reciprocating updates to the domain sizes are recieved _asynchronously_. This CL introduced a loop around that core eviction functionality, assumably thinking that eviction is synchronous. As there is nothing blocking or delaying each iteration of the loop, it would hammer away sending async eviction messages until the domain sizes fell below the threshold, but because we sent more eviction requests than necessary, we over-evicted. This is compounded by the call to `MemoryTracker::allocated_bytes()` on each loop iteration. That function must update all jemalloc stats by updating an epoch value inside of jemalloc, which turns out be an expensive operation. Change-Id: Id7cc5dec6da388d0ec7876e1e3259e2398272ca6 Reviewed-on: https://gerrit.readyset.name/c/readyset/+/7522 Tested-by: Buildkite CI Reviewed-by: Ethan Donowitz <ethan@readyset.io>
- Loading branch information