diff --git a/kvrocks.conf b/kvrocks.conf index a6c319d072b..1debccedbe9 100644 --- a/kvrocks.conf +++ b/kvrocks.conf @@ -547,7 +547,7 @@ rocksdb.row_cache_size 0 # files opened are always kept open. You can estimate number of files based # on target_file_size_base and target_file_size_multiplier for level-based # compaction. For universal-style compaction, you can usually set it to -1. -# Default: 4096 +# Default: 8096 rocksdb.max_open_files 8096 # Amount of data to build up in memory (backed by an unsorted log @@ -603,7 +603,7 @@ rocksdb.max_background_flushes -1 # This value represents the maximum number of threads that will # concurrently perform a compaction job by breaking it into multiple, # smaller ones that are run simultaneously. -# Default: 2 (i.e. no subcompactions) +# Default: 2 rocksdb.max_sub_compactions 2 # In order to limit the size of WALs, RocksDB uses DBOptions::max_total_wal_size @@ -647,12 +647,12 @@ rocksdb.wal_size_limit_mb 16384 # actual size of the unit read from disk may be smaller if # compression is enabled. # -# Default: 4KB +# Default: 16KB rocksdb.block_size 16384 # Indicating if we'd put index/filter blocks to the block cache # -# Default: no +# Default: yes rocksdb.cache_index_and_filter_blocks yes # Specify the compression to use. Only compress level greater diff --git a/src/config/config.cc b/src/config/config.cc index 39d8d352658..5c9863c4946 100644 --- a/src/config/config.cc +++ b/src/config/config.cc @@ -40,7 +40,7 @@ #include "server/server.h" #include "status.h" -constexpr const char *kDefaultBindAddress = "127.0.0.1"; +constexpr const char *kDefaultBindAddress = "0.0.0.0"; constexpr const char *errBlobDbNotEnabled = "Must set rocksdb.enable_blob_files to yes first."; constexpr const char *errLevelCompactionDynamicLevelBytesNotSet = @@ -162,14 +162,14 @@ Config::Config() { /* rocksdb options */ {"rocksdb.compression", false, new EnumField(&rocks_db.compression, compression_types, rocksdb::CompressionType::kNoCompression)}, - {"rocksdb.block_size", true, new IntField(&rocks_db.block_size, 4096, 0, INT_MAX)}, - {"rocksdb.max_open_files", false, new IntField(&rocks_db.max_open_files, 4096, -1, INT_MAX)}, + {"rocksdb.block_size", true, new IntField(&rocks_db.block_size, 16384, 0, INT_MAX)}, + {"rocksdb.max_open_files", false, new IntField(&rocks_db.max_open_files, 8096, -1, INT_MAX)}, {"rocksdb.write_buffer_size", false, new IntField(&rocks_db.write_buffer_size, 64, 0, 4096)}, {"rocksdb.max_write_buffer_number", false, new IntField(&rocks_db.max_write_buffer_number, 4, 0, 256)}, {"rocksdb.target_file_size_base", false, new IntField(&rocks_db.target_file_size_base, 128, 1, 1024)}, {"rocksdb.max_background_compactions", false, new IntField(&rocks_db.max_background_compactions, 2, -1, 32)}, {"rocksdb.max_background_flushes", true, new IntField(&rocks_db.max_background_flushes, 2, -1, 32)}, - {"rocksdb.max_sub_compactions", false, new IntField(&rocks_db.max_sub_compactions, 1, 0, 16)}, + {"rocksdb.max_sub_compactions", false, new IntField(&rocks_db.max_sub_compactions, 2, 0, 16)}, {"rocksdb.delayed_write_rate", false, new Int64Field(&rocks_db.delayed_write_rate, 0, 0, INT64_MAX)}, {"rocksdb.wal_ttl_seconds", true, new IntField(&rocks_db.wal_ttl_seconds, 3 * 3600, 0, INT_MAX)}, {"rocksdb.wal_size_limit_mb", true, new IntField(&rocks_db.wal_size_limit_mb, 16384, 0, INT_MAX)}, @@ -177,7 +177,7 @@ Config::Config() { {"rocksdb.disable_auto_compactions", false, new YesNoField(&rocks_db.disable_auto_compactions, false)}, {"rocksdb.enable_pipelined_write", true, new YesNoField(&rocks_db.enable_pipelined_write, false)}, {"rocksdb.stats_dump_period_sec", false, new IntField(&rocks_db.stats_dump_period_sec, 0, 0, INT_MAX)}, - {"rocksdb.cache_index_and_filter_blocks", true, new YesNoField(&rocks_db.cache_index_and_filter_blocks, false)}, + {"rocksdb.cache_index_and_filter_blocks", true, new YesNoField(&rocks_db.cache_index_and_filter_blocks, true)}, {"rocksdb.block_cache_size", true, new IntField(&rocks_db.block_cache_size, 0, 0, INT_MAX)}, {"rocksdb.subkey_block_cache_size", true, new IntField(&rocks_db.subkey_block_cache_size, 2048, 0, INT_MAX)}, {"rocksdb.metadata_block_cache_size", true, new IntField(&rocks_db.metadata_block_cache_size, 2048, 0, INT_MAX)},