leveldb generating tiny sst file

99 views
Skip to first unread message

孙伟

unread,
Jul 27, 2015, 11:47:45 AM7/27/15
to leveldb
Hi,

i set kTargetFileSize to 32M, so the sst file should be 32M.
when i insert a lot of data to leveldb, i found a lot of sst file is 32M
and a great number of file is 1k, 2k, or 16k
what's the problem, can someone tell how to compact the small sst into large sst file?

孙伟

unread,
Aug 5, 2015, 12:29:38 AM8/5/15
to leveldb

any one can give me some tips on how to emerge this small files,
Thanks a lot!

在 2015年7月27日星期一 UTC+8下午11:47:45,孙伟写道:

Edouard Alligand

unread,
Aug 6, 2015, 8:49:44 AM8/6/15
to lev...@googlegroups.com
Why would you want to change kTargetFileSize? Also keep in mind it's the "target" size.

--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Escriva

unread,
Aug 6, 2015, 8:56:15 AM8/6/15
to lev...@googlegroups.com, Edouard Alligand
The target size is approximately the minimum size of a file. Increasing it will not create small files. I suspect what's going on here is either compression is enabled and doing a really good job, or more likely, the database is being opened and closed frequently.

On August 6, 2015 8:49:23 AM EDT, Edouard Alligand <edoua...@gmail.com> wrote:
>Why would you want to change kTargetFileSize? Also keep in mind it's
>the
>"target" size.
>
>On Wed, Aug 5, 2015 at 6:29 AM, 孙伟 <hill.s...@gmail.com> wrote:
>
>>
>> any one can give me some tips on how to emerge this small files,
>> Thanks a lot!
>>
>> 在 2015年7月27日星期一 UTC+8下午11:47:45,孙伟写道:
>>
>>> Hi,
>>>
>>> i set
>>>
>>>
>>>
>>> *kTargetFileSize to 32M, so the sst file should be 32M.when i insert
>a
>>> lot of data to leveldb, i found a lot of sst file is 32Mand a great
>number
>>> of file is 1k, 2k, or 16kwhat's the problem, can someone tell how to
>>> compact the small sst into large sst file?*
>>>
>> --
>> You received this message because you are subscribed to the Google
>Groups
>> "leveldb" group.
>> To unsubscribe from this group and stop receiving emails from it,
>send an
>> email to leveldb+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>

--
Sent from my phone. Please excuse my brevity.

陈宗志

unread,
Sep 20, 2015, 10:52:53 PM9/20/15
to leveldb
I think the small sst files don't affect the performance.

you can write a simple compact program to make the small sst into large sst file..
Reply all
Reply to author
Forward
0 new messages