Browse Source

Merge pull request #2327 from joshuafc/patch-2

pull/2348/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
ac574d5572
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      weed/filer/leveldb/leveldb_store.go
  2. 1
      weed/filer/leveldb2/leveldb2_store.go
  3. 2
      weed/filer/leveldb3/leveldb3_store.go

1
weed/filer/leveldb/leveldb_store.go

@ -48,7 +48,6 @@ func (store *LevelDBStore) initialize(dir string) (err error) {
opts := &opt.Options{
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
CompactionTableSizeMultiplier: 10,
Filter: filter.NewBloomFilter(8), // false positive rate 0.02
}

1
weed/filer/leveldb2/leveldb2_store.go

@ -48,7 +48,6 @@ func (store *LevelDB2Store) initialize(dir string, dbCount int) (err error) {
opts := &opt.Options{
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
CompactionTableSizeMultiplier: 4,
Filter: filter.NewBloomFilter(8), // false positive rate 0.02
}

2
weed/filer/leveldb3/leveldb3_store.go

@ -68,14 +68,12 @@ func (store *LevelDB3Store) loadDB(name string) (*leveldb.DB, error) {
opts := &opt.Options{
BlockCacheCapacity: 32 * 1024 * 1024, // default value is 8MiB
WriteBuffer: 16 * 1024 * 1024, // default value is 4MiB
CompactionTableSizeMultiplier: 4,
Filter: bloom,
}
if name != DEFAULT {
opts = &opt.Options{
BlockCacheCapacity: 4 * 1024 * 1024, // default value is 8MiB
WriteBuffer: 2 * 1024 * 1024, // default value is 4MiB
CompactionTableSizeMultiplier: 4,
Filter: bloom,
}
}

Loading…
Cancel
Save