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

Slow compaction progress and high memory usage #1370

Closed
jarifibrahim opened this issue Jun 15, 2020 · 1 comment
Closed

Slow compaction progress and high memory usage #1370

jarifibrahim opened this issue Jun 15, 2020 · 1 comment
Labels
kind/enhancement Something could be better. priority/P1 Serious issue that requires eventual attention (can wait a bit) status/accepted We accept to investigate or work on it.

Comments

@jarifibrahim
Copy link
Contributor

What version of Badger are you using?

c45d966

Steps to Reproduce the issue

Run badger benchmark write -m 1000 command.

What did you see instead?

The compactions don't seem to make progress very slow and L0 gets accumulated with data

badger 2020/06/15 16:45:07 INFO: Got compaction priority: {level:0 score:48.4 dropPrefix:[]}
badger 2020/06/15 16:45:07 INFO: Running for level: 0
badger 2020/06/15 16:45:07 INFO: Got compaction priority: {level:1 score:60.551320023834705 dropPrefix:[]}

badger 2020/06/15 16:27:51 INFO: Got compaction priority: {level:1 score:60.551320023834705 dropPrefix:[]}
Time elapsed: 01s, bytes written: 67 MB, speed: 67 MB/sec, entries written: 419420, speed: 419420/sec
badger 2020/06/15 16:27:52 INFO: Got compaction priority: {level:1 score:60.551320023834705 dropPrefix:[]}
Time elapsed: 02s, bytes written: 101 MB, speed: 50 MB/sec, entries written: 629130, speed: 314565/sec
badger 2020/06/15 16:27:53 INFO: Got compaction priority: {level:1 score:60.551320023834705 dropPrefix:[]}
Time elapsed: 03s, bytes written: 155 MB, speed: 52 MB/sec, entries written: 970782, speed: 323594/sec
badger 2020/06/15 16:27:54 INFO: Got compaction priority: {level:1 score:60.551320023834705 dropPrefix:[]}

A score of 1 means we've filled the level to 100% capacity. The problem here is that because of commit 3747be5 the writes do not get stalled and levels get filled up. My badger directory has 200+ level 0 tables and they were being compacted with the entire L1 (which has 300+ tables).

@jarifibrahim jarifibrahim added kind/enhancement Something could be better. status/accepted We accept to investigate or work on it. labels Jun 15, 2020
@jarifibrahim jarifibrahim added the priority/P1 Serious issue that requires eventual attention (can wait a bit) label Jun 24, 2020
@jarifibrahim jarifibrahim changed the title Slow compaction progress Slow compaction progress and high memory usage Jun 27, 2020
@minhaj-shakeel
Copy link

Github issues have been deprecated.
This issue has been moved to discuss. You can follow the conversation there and also subscribe to updates by changing your notification preferences.

drawing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Something could be better. priority/P1 Serious issue that requires eventual attention (can wait a bit) status/accepted We accept to investigate or work on it.
Development

No branches or pull requests

2 participants