Browse Source

modify default config of rocksdb

tags/1.1.10
shaozhuguang 5 years ago
parent
commit
f636d23bcd
2 changed files with 5 additions and 5 deletions
  1. +4
    -4
      source/deployment/deployment-peer/src/main/resources/config/init/rocksdb.config
  2. +1
    -1
      source/storage/storage-rocksdb/src/main/java/com/jd/blockchain/storage/service/impl/rocksdb/RocksDBConnectionFactory.java

+ 4
- 4
source/deployment/deployment-peer/src/main/resources/config/init/rocksdb.config View File

@@ -1,8 +1,8 @@
#BlockCache使用缓存大小,单位:字节
cache.capacity=536870912
cache.capacity=1073741824

#BlockCache分片大小
cache.numShardBits=64
cache.numShardBits=128

#BlockSize大小,单位:字节
table.blockSize=4096
@@ -10,8 +10,8 @@ table.blockSize=4096
#MetaDataBlockSize大小,单位:字节
table.metadata.blockSize=8192

#布隆过滤器前缀bit数量
table.bloom.bitsPerKey=16
#布隆过滤器前缀bit数量,小于0的情况下不打开布隆过滤器
table.bloom.bitsPerKey=-1

#每个MemTable使用内存大小,单位:字节
option.writeBufferSize=268435456


+ 1
- 1
source/storage/storage-rocksdb/src/main/java/com/jd/blockchain/storage/service/impl/rocksdb/RocksDBConnectionFactory.java View File

@@ -98,7 +98,7 @@ public class RocksDBConnectionFactory implements DbConnectionFactory {

long tableBlockSize = getLong(dbProperties, "table.blockSize", 4 * SizeUnit.KB);
long tableMetadataBlockSize = getLong(dbProperties, "table.metadata.blockSize", 4 * SizeUnit.KB);
int tableBloomBitsPerKey = getInt(dbProperties, "table.bloom.bitsPerKey", 16);
int tableBloomBitsPerKey = getInt(dbProperties, "table.bloom.bitsPerKey", -1);

long optionWriteBufferSize = getLong(dbProperties, "option.writeBufferSize", 256 * SizeUnit.MB);
int optionMaxWriteBufferNumber = getInt(dbProperties, "option.maxWriteBufferNumber", 7);


Loading…
Cancel
Save