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

Memory Manager: Report to the log per cf / level / block type stats #660

Open
udi-speedb opened this issue Sep 3, 2023 · 5 comments
Open
Assignees
Labels
enhancement New feature or request usability

Comments

@udi-speedb
Copy link
Contributor

udi-speedb commented Sep 3, 2023

  • Report the following per block cache:
    • Per CF sharing the block cache in the DB, report the following information for the data blocks, index blocks, filter blocks, and compression dictionary blocks:
      • Separately for Level-0, Middle Level (0 < level < Last-Level-With-Data), and Last-Level-With-Data Level:
      • CURRENT Total size in cache
      • CURRENT Total pinned size in cache
      • Number of hits in the last dump interval
      • Total Number of hits
      • Number of misses in the last dump interval
      • Total number of misses

The information will be printed to the log according to the stats_dump_period_sec option.

The feature currently only supports the LRU-Cache

@udi-speedb
Copy link
Contributor Author

@hilikspdb - It seems there is no dedicated cache entry role for compression dictionaries. There is:

  // Compression dictionary building buffer's charge to account for
  // its memory usage
  kCompressionDictionaryBuildingBuffer,

that may be used to charge to cache the memory used to build the block, but that is not the role used when inserting the compression dictionary block into the cache. According to my checks, the role used is CacheEntryRole::kOtherBlock

@hilikspdb
Copy link
Contributor

hilikspdb commented Oct 11, 2023 via email

@udi-speedb
Copy link
Contributor Author

you can add this ... currently the "metadata block" (which contains the delete range tombstone) and the dictionary are accounted as "others"

On Wed, Oct 11, 2023 at 7:38 PM udi-speedb @.> wrote: @hilikspdb https://github.com/hilikspdb - It seems there is no dedicated cache entry role for compression dictionaries. There is: // Compression dictionary building buffer's charge to account for // its memory usage kCompressionDictionaryBuildingBuffer, that may be used to charge to cache the memory used to build the block, but that is not the role used when inserting the compression dictionary block into the cache. According to my checks, the role used is CacheEntryRole::kOtherBlock — Reply to this email directly, view it on GitHub <#660 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZKTXGEWJS5FN5XJM3DW573X63DR3ANCNFSM6AAAAAA4JF4KZQ . You are receiving this because you were mentioned.Message ID: @.>

@hilikspdb - Do you mean that I should maintain counters for kOtherBlock?

@hilikspdb
Copy link
Contributor

hilikspdb commented Oct 11, 2023 via email

@udi-speedb
Copy link
Contributor Author

To sum this up: Compression Dictionary blocks will remain under the kOtherBlock cache entry role and will be reported under that role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants