-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node/policy: Cache container policy application results
Application result of container (C) storage policy to the network map (N) does not change for fixed C and N. Previously, `Search` and `Replicate` object server handlers always calculated the list of container nodes from scratch. This resulted in excessive node resource consumption when there was a dense flow of requests for a small number of containers per epoch. The obvious solution is to cache the latest results. A similar attempt had already been made earlier with 9269ed3, but it turned out to be incorrect and did not change anything. This adds a caching component for up to 1000 recently requested lists of container nodes over two epochs - current and previous. By increasing the amount of memory retained, the component will mitigate load spikes on a small number of containers. The volume limit of 1000 was chosen heuristically as a first approximation, and for both epochs. Tests on the development environment showed a pretty good improvement, but results on real load tests are yet to be obtained. Based on this, similar optimization for other layers and queries will be done later. Refs #2692. Signed-off-by: Leonard Lyubich <[email protected]>
- Loading branch information
1 parent
d68aa9f
commit 13a115d
Showing
3 changed files
with
519 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.