google / google/leveldb

Leveldb keeps generating small sst file

Open
#175 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

Original [issue 169](https://code.google.com/p/leveldb/issues/detail?id=169) created by wuzuyang on 2013-05-15T02:08:12.000Z:

here is leveldb.stats ouputs:

```
Compactions
Level Files Size(MB) Time(sec) Read(MB) Write(MB)
--------------------------------------------------
0 0 0 0 0 36
2 0 0 9 0 519
3 30 4 12 594 580
4 530 10070 1187 101893 101892
5 1750 52946 7101 534959 534716
```

Level-3 has 30 files, but it only has 4MB size. Then these 30 files will be merged to level-4, but the newly created level-4 sst files is small too, I can see that with ls command.

This leads to frequently compaction after written 4MB data.

What is the expected output? What do you see instead?

small sst file should be merged.

What version of the product are you using? On what operating system?

Linux

Please provide any additional information below.

kTargetFileSize = 32 \* 1048576

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.