Skip to content

Commit 7f09192

Browse files
yuhaijun999ketor
authored andcommitted
[feat][store] The default block_cache_size of rocksdb is 1GB. Increase it to 2GB to improve concurrent query performance. Add it to the configuration file.
1 parent 0138fb0 commit 7f09192

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

conf/coordinator.template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ log:
3939
path: $BASE_PATH$/log
4040
store:
4141
path: $BASE_PATH$/data/db
42+
block_cache_size: 2147483648 # 2GB
4243
background_thread_num: 16 # background_thread_num priority background_thread_ratio
4344
# background_thread_ratio: 0.5 # cpu core * ratio
4445
stats_dump_period_s: 120

conf/document.template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ document:
4040
enable_follower_hold_index: false
4141
store:
4242
path: $BASE_PATH$/data/db
43+
block_cache_size: 2147483648 # 2GB
4344
background_thread_num: 16 # background_thread_num priority background_thread_ratio
4445
fast_background_thread_num: 8 # background_thread_num priority background_thread_ratio
4546
# background_thread_ratio: 0.5 # cpu core * ratio

conf/index.template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ vector:
4141
enable_follower_hold_index: false
4242
store:
4343
path: $BASE_PATH$/data/db
44+
block_cache_size: 2147483648 # 2GB
4445
background_thread_num: 16 # background_thread_num priority background_thread_ratio
4546
fast_background_thread_num: 8 # background_thread_num priority background_thread_ratio
4647
# background_thread_ratio: 0.5 # cpu core * ratio

conf/store.template.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ region:
2020
merge_check_interval_s: 120
2121
max_merge_region_size: 1048576 # 1MB
2222
max_merge_region_keys: 10000
23-
split_merge_interval: 3600 #1h
23+
split_merge_interval: 3600 #1h
2424
merge_size_ratio: 0.2
2525
merge_keys_ratio: 0.2
2626
merge_check_concurrency: 3
@@ -38,6 +38,7 @@ log:
3838
path: $BASE_PATH$/log
3939
store:
4040
path: $BASE_PATH$/data/db
41+
block_cache_size: 2147483648 # 2GB
4142
background_thread_num: 16 # background_thread_num priority background_thread_ratio
4243
# background_thread_ratio: 0.5 # cpu core * ratio
4344
stats_dump_period_s: 120

src/common/constant.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Constant {
109109
inline static const std::string kBlockSize = "block_size";
110110
inline static const std::string kBlockSizeDefaultValue = "131072"; // 128KB
111111
inline static const std::string kBlockCache = "block_cache";
112-
inline static const std::string kBlockCacheDefaultValue = "1073741824"; // 1GB
112+
inline static const std::string kBlockCacheDefaultValue = "2147483648"; // 2GB
113113
inline static const std::string kArenaBlockSize = "arena_block_size";
114114
inline static const std::string kArenaBlockSizeDefaultValue = "67108864"; // 64MB
115115
inline static const std::string kMinWriteBufferNumberToMerge = "min_write_buffer_number_to_merge";

0 commit comments

Comments
 (0)