-
Notifications
You must be signed in to change notification settings - Fork 658
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
Garbage collection is unacceptably slow #2806
Labels
Comments
bowenwang1996
added
P-critical
Priority: critical
A-storage
Area: storage and databases
labels
Jun 7, 2020
@mikhailOK @frol @SkidanovAlex please help if you know anything related to rocksdb options. |
bowenwang1996
added a commit
that referenced
this issue
Jun 7, 2020
A hot fix that mitigates #2806 by reducing garbage collection step to the absolute minimum. However, even if we just advance tail by 1 height at each step, `clear_data` still takes about 0.5s to execute, which is very suboptimal. Test plan ---------- Deploy on betanet and observe that garbage collection speeds up from more than 30s to 0.5s at each step.
It seems I can't resolve it now. Please assign on me when becomes actual. |
This was referenced Jun 15, 2020
bowenwang1996
added a commit
that referenced
this issue
Jun 22, 2020
Garbage collection is slow because we do not persist chunk tail and therefore `clear_chunk_data` iterates from 0 to min_chunk_height every time it is called. Fixes #2806.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the node garbage collects data, it invokes
clear_data
, which deletes old block and chunk data. However, in practice we have observed extraordinary slowness in this function. Under current setup, at every call toclear_data
, we garbage collect 100 heights worth of data and it takes 30-60s to execute after the network has been running for a while, which is absolutely devastating and unacceptable. I suspect that this has something to do with rocksdb compaction and deletion of data might have triggered compaction, which can take a while to run, depending on the size of the data. To address this issue, we shouldThe text was updated successfully, but these errors were encountered: