-
Notifications
You must be signed in to change notification settings - Fork 485
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
Various improvements to fuzzers. #214
Conversation
263620d
to
2051b3a
Compare
This is interesting:
The last few ops are all compacts. The first two don't increase storage.size_used but the last one crashes. |
With puts only on id=0 and no removes, we can still exhaust arbitrary storage. The causes seems likely to be https://github.com/tigerbeetledb/tigerbeetle/blob/43d3587ce24a683eccc17830cbc8a9dd27d97540/src/lsm/compaction.zig#L521. |
43d3587
to
9376b15
Compare
I added code to release grid blocks associated with level_a in compaction. I haven't taken the time to understand the surrounding code so my changes are probably wrong. However, I can't test them because the only compaction that is every performed in the fuzzer is from the immutable table to level 0 (run |
Same for |
It looks like level 0 only ever has one table. With |
Aha, grid blocks are only released when the superblock checkpoints, which the fuzzers are not currently doing. |
a157223
to
3b83ed1
Compare
Suppose we have enough accounts to fill a single table in level 0. Account has 10 indexes, so that's 10 tables. Every compaction of the immutable table into level 0 acquires storage for 10 new tables, and the old storage only gets freed when the superblock checkpoints. This happens on average every 32 compacts in the fuzzer (and exactly every 32 compacts in prod?). So we have at minimum 32x space amplification from garbage collection alone. |
If we put 1e6 accounts in the fuzz run, then we need at minimum 1e6 * 128 bytes * 32 garbage = 3.8gb just for the account object tree, let alone secondary indexes. So we should expect the forest fuzzer to exhaust 1gb storage pretty quickly, certainly long before it can test compaction of level 0. |
If we don't do this then used grid blocks are never released and we quickly exhaust storage. Set `puts_since_compact` and `compacts_per_checkpoint` to approximate production settings.
608e55f
to
52766e5
Compare
52766e5
to
4080fca
Compare
puts_since_compact
andcompacts_per_checkpoint
to approximate production settings.I removed c64b81b since we don't currently have a way to test it.