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

Drop checkpoint files from OS file cache to prevent file cache growing to hundreds of GB #2281

Merged
merged 6 commits into from
Apr 8, 2022

Conversation

fxamacker
Copy link
Member

@fxamacker fxamacker commented Apr 8, 2022

Backport #2280 into v0.25

NOTE: the CI Lint error also occurs in prior backports to v0.25 and can be ignored.

fxamacker and others added 6 commits April 8, 2022 15:11
After reading or creating a checkpoint file,
drop it from the OS file cache.

This change helps prevent Grafana EN Memory Usage chart
from showing hundreds of GB as used because it doesn't
exclude the OS file cache.

Without this change, checkpointing will add over 100GB
to OS file cache each time because each checkpoint file
is over 50GB.

If GOOS != linux then do nothing.
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #2281 (8373296) into v0.25 (42fd4f2) will increase coverage by 0.00%.
The diff coverage is 62.50%.

@@           Coverage Diff           @@
##            v0.25    #2281   +/-   ##
=======================================
  Coverage   57.48%   57.49%           
=======================================
  Files         643      643           
  Lines       38197    38224   +27     
=======================================
+ Hits        21958    21977   +19     
- Misses      13447    13450    +3     
- Partials     2792     2797    +5     
Flag Coverage Δ
unittests 57.49% <62.50%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
ledger/complete/wal/syncrename.go 25.80% <33.33%> (+0.80%) ⬆️
ledger/complete/wal/checkpointer.go 62.03% <64.28%> (+0.03%) ⬆️
ledger/complete/ledger.go 59.18% <100.00%> (ø)
consensus/hotstuff/eventloop/event_loop.go 68.29% <0.00%> (-2.44%) ⬇️
engine/collection/synchronization/engine.go 67.93% <0.00%> (ø)
...sus/approvals/assignment_collector_statemachine.go 47.11% <0.00%> (+4.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42fd4f2...8373296. Read the comment docs.

@zhangchiqing zhangchiqing merged commit db09d68 into v0.25 Apr 8, 2022
@zhangchiqing zhangchiqing deleted the fxamacker/drop-checkpoint-file-cache branch April 8, 2022 21:32
janezpodhostnik pushed a commit that referenced this pull request Apr 21, 2022
…g to hundreds of GB (#2281)

* Drop checkpoint files from OS file cache

After reading or creating a checkpoint file,
drop it from the OS file cache.

This change helps prevent Grafana EN Memory Usage chart
from showing hundreds of GB as used because it doesn't
exclude the OS file cache.

Without this change, checkpointing will add over 100GB
to OS file cache each time because each checkpoint file
is over 50GB.

If GOOS != linux then do nothing.

* Update ledger/complete/wal/checkpointer.go

Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>

* Log command to drop file from OS file cache

* Update comment for requestDropFromOSFileCache

* Fix lint error

* Fix lint error

Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
@fxamacker fxamacker added the Execution Cadence Execution Team label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants