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

磁盘空间占用比dbsisze大非常多 #1207

Open
feiyu13 opened this issue Mar 28, 2018 · 2 comments
Open

磁盘空间占用比dbsisze大非常多 #1207

feiyu13 opened this issue Mar 28, 2018 · 2 comments

Comments

@feiyu13
Copy link

feiyu13 commented Mar 28, 2018

dbsize, 8.8G左右,du 显示的ldb文件110G左右;ssdb不能显示数据库的key数目,根据其他库的估算,key的数量小于2亿,key大小,32字节,value 大小,15字节,不计算压缩和元数据,大概占用空间9G。从leveldb.stats来看,level 4 2792 91724,文件数目2792,占用空间91G,按照leveldb的理论,除了level 0,其他level同一个key不会出现多次,请教一下出现这种情况的原因。

另外,我的db用法是,更新频繁。

@yurongliao
Copy link

在低峰期做一下compact,应该会好很多。

@feiyu13
Copy link
Author

feiyu13 commented Apr 10, 2018

我没读leveldb代码分析,看了下文章,没有搞清楚这是为啥,想了解一下具体原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants