Skip to content

Mas i370 d30 sstmemory#371

Merged
martinsumner merged 7 commits into
develop-3.0from
mas-i370-d30-sstmemory
Mar 23, 2022
Merged

Mas i370 d30 sstmemory#371
martinsumner merged 7 commits into
develop-3.0from
mas-i370-d30-sstmemory

Conversation

@martinsumner

Copy link
Copy Markdown
Owner

On very large stores with lots of old, and largely untouched objects, too much memory is taken up by relatively inactive files.

The fetch_cache has an unpredictable size, and it is hard to reason or prove its effectiveness.

This change takes the existing caching level configuration, which prevents automatic fadvise of files below a certain level in the LSM tree, and also blocks the creation of the fetch_cache below a certain level.

There has been some observations of memory fragmentation as well. There is currently no hibernation of unused files. Unused files will still be used during all object folds and journal compaction because of SQN checking, so SQN checking is now used as a potential trigger for hibernation - if there is no activity in the 60s following. a SQN check the managing process for the SST file will hibernate.

SQN checks are all background processes
SQN check in the penciller is used for journal (all object) folds, but mainly for journal compaction.  Use this to trigger hibernation where SST files stay quiet after the compaction check.
@martinsumner
martinsumner marked this pull request as ready for review March 11, 2022 11:10
Based on volume testing.  Relatively speaking, far higher value to be gained from caches at higher levels (lower numbered levels).  The cache at lower levels are proportionally much less efficient.  so cache more at higher levels, where there is value, and less at lower levels where there is more cost relative to value.
Making significant change appears to not have had the expected positive improvement - so a more minimal change is proposed.

The assumption is that the cache only really gets used for double reads in the write path (e.g. where the application reads before a write) - and so a large cache make minimal difference, but no cache still has a downside.
Comment thread src/leveled_penciller.erl
% compact thta more advanced value, but this may cause
% confusion in snapshots.
current;
compare_to_sqn(Obj, SQN) ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactoring... gets more readable

@martinsumner
martinsumner merged commit 0f4d670 into develop-3.0 Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants