Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize blobovnicza caching #2180

Closed
fyrchik opened this issue Dec 26, 2022 · 1 comment
Closed

Optimize blobovnicza caching #2180

fyrchik opened this issue Dec 26, 2022 · 1 comment
Labels
discussion Open discussion of some problem enhancement Improving existing functionality neofs-storage Storage node application issues

Comments

@fyrchik
Copy link
Contributor

fyrchik commented Dec 26, 2022

There are multiple problems with the current scheme:

  1. We have separate opened/active cache which leads to a complex implementation (mutexes should be taken in a specific order and we MUST take both if blobovnicza has a chance of being evicted).
  2. Because of this separation opened_cache_size can actually be violated: actual amount of opened files is len(active) + opened_cache_size.
  3. We can remove items from blobovnicza thus the property opened cache contains filled blobovniczas is no longer true.

I propose to refactor it like this:

  1. Have only 1 cache with all blobovniczas.
  2. Active map should only contain an index: when we need to put an item we just open blobovnicza if it is not already opened.
  3. If width and depth parameters are very big compared to opened_cache_size, print a warning in logs.
  4. *After active index exceeds width we should start again from 0 and, possibly, perform VACUUM.
@roman-khimov
Copy link
Member

Obsoleted by #2453.

@roman-khimov roman-khimov closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Open discussion of some problem enhancement Improving existing functionality neofs-storage Storage node application issues
Projects
None yet
Development

No branches or pull requests

2 participants