Compact generate small sst files on L5
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
RocksDB main branch version 7.6, git hash is 84e9b6ee2dc0318a8d09b5a7dd337880ebc80e92
### Expected behavior
In MyRocks, we set `target_file_size_multiplier=2`, average file size of **L5** should be about **2x** of **L4**.
### Actual behavior
while TPCC loading, average file size of **L4** is 162.617 MiB and **L5** is 59.857 MiB, and there are many very small sst files on **L5**.
```
** Compaction Stats [default] **
Level Files Size Score Read(GB) Rn(GB) Rnp1(GB) Write(GB) Wnew(GB) Moved(GB) W-Amp Rd(MB/s) Wr(MB/s) Comp(sec) CompMergeCPU(sec) Comp(cnt) Avg(sec) KeyIn KeyDrop Rblob(GB) Wblob(GB)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
L0 0/0 0.00 KB 0.0 0.0 0.0 0.0 4014.3 4014.3 0.0 1.0 0.0 348.6 11793.11 11593.88 5693 2.072 0 0 0.0 0.0
L1 1/0 29.21 MB 0.1 4205.0 4014.3 190.7 4225.1 4034.5 0.0 1.1 833.7 837.7 5165.01 17802.27 5693 0.907 13G 524K 0.0 0.0
L2 58/0 2.50 GB 1.0 8135.2 2313.8 5821.4 8104.9 2283.5 1720.6 3.5 247.8 246.9 33618.83 33003.17 108567 0.310 27G 16M 0.0 0.0
L3 364/8 25.50 GB 1.0 6814.2 2637.0 4177.2 6760.6 2583.4 1363.8 2.6 254.3 252.3 27444.17 26859.43 51179 0.536 22G 29M 0.0 0.0
L4 1574/7 249.96 GB 1.0 12859.8 3357.2 9502.6 12710.9 3208.3 512.0 3.8 264.7 261.6 49748.14 48858.54 51063 0.974 41G 711M 0.0 0.0
L5 8007/0 468.05 GB 0.2 241.6 41.3 200.3 228.4 28.1 2684.7 5.5 301.2 284.7 821.52 801.61 1411 0.582 850M 177M 0.0 0.0
L6 0/0 0.00 KB 0.0 0.0 0.0 0.0 0.0 0.0 67.5 0.0 0.0 0.0 412.16 0.00 72 5.724 0 0 0.0 0.0
Sum 10004/15 746.03 GB 0.0 32255.8 12363.6 19892.2 36044.4 16152.2 6348.6 8.8 256.0 286.1 129002.94 138918.91 223678 0.577 105G 934M 0.0 0.0
Int 0/0 0.00 KB 0.0 2.8 1.0 1.7 2.8 1.0 0.5 0.0 200.7 200.5 14.24 13.98 33 0.431 10M 0 0.0 0.0
```

### Steps to reproduce the behavior
1. Set `target_file_size_multiplier=2` and `target_file_size_base=32M` with NoCompression
2. Set `sst_partitioner_factory = NewSstPartitionerFixedPrefixFactory(4)`
3. run TPCC load
Contributor guide
Assessment
This issue has not been assessed yet.