mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
CompactionTableSizeMultiplier of leveldb use default value. #2325
To improve performance of leveldb find key in condition of large directory(millions of files) which use uuid as filename.
This commit is contained in:
parent
0b4269b6a8
commit
5654d0d60d
|
@ -48,7 +48,6 @@ func (store *LevelDBStore) initialize(dir string) (err error) {
|
||||||
opts := &opt.Options{
|
opts := &opt.Options{
|
||||||
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
|
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
|
||||||
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
|
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
|
||||||
CompactionTableSizeMultiplier: 10,
|
|
||||||
Filter: filter.NewBloomFilter(8), // false positive rate 0.02
|
Filter: filter.NewBloomFilter(8), // false positive rate 0.02
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,6 @@ func (store *LevelDB2Store) initialize(dir string, dbCount int) (err error) {
|
||||||
opts := &opt.Options{
|
opts := &opt.Options{
|
||||||
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
|
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
|
||||||
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
|
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
|
||||||
CompactionTableSizeMultiplier: 4,
|
|
||||||
Filter: filter.NewBloomFilter(8), // false positive rate 0.02
|
Filter: filter.NewBloomFilter(8), // false positive rate 0.02
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,14 +68,12 @@ func (store *LevelDB3Store) loadDB(name string) (*leveldb.DB, error) {
|
||||||
opts := &opt.Options{
|
opts := &opt.Options{
|
||||||
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
|
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
|
||||||
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
|
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
|
||||||
CompactionTableSizeMultiplier: 4,
|
|
||||||
Filter: bloom,
|
Filter: bloom,
|
||||||
}
|
}
|
||||||
if name != DEFAULT {
|
if name != DEFAULT {
|
||||||
opts = &opt.Options{
|
opts = &opt.Options{
|
||||||
BlockCacheCapacity: 4 * 1024 * 1024, // default value is 8MiB
|
BlockCacheCapacity: 4 * 1024 * 1024, // default value is 8MiB
|
||||||
WriteBuffer: 2 * 1024 * 1024, // default value is 4MiB
|
WriteBuffer: 2 * 1024 * 1024, // default value is 4MiB
|
||||||
CompactionTableSizeMultiplier: 4,
|
|
||||||
Filter: bloom,
|
Filter: bloom,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue