MySQL · MyRocks · MyRocks参数介绍

  1. 云栖社区>
  2. 博客>
  3. 正文

MySQL · MyRocks · MyRocks参数介绍

技术小能手 2018-02-02 16:39:10 浏览1739
展开阅读全文

以下参数是db级别的,全局有效

10


以上参数可以通过show variables查看

更详细可以参考代码 db_options_type_info

include/rocksdb/options.h

以下参数是column family级别的,可以分别对每个column family设置

12


以上参数可以通过select * from information_schema.rocksdb_cf_options查看

更详细可以参考代码ParseColumnFamilyOption, cf_options_type_info

include/rocksdb/table.h
rocksdb/util/options_helper.h
rocksdb/options/options_helper.cc
include/rocksdb/advanced_options.h

参数配置示例

rocksdb_default_cf_options=memtable=vector;
arena_block_size=10M;
disable_auto_compactions=1;
min_write_buffer_number_to_merge=1;
write_buffer_size=100000m;
target_file_size_base=32m;
max_bytes_for_level_base=512m;
level0_file_num_compaction_trigger=20;
level0_slowdown_writes_trigger=30;
level0_stop_writes_trigger=30;
max_write_buffer_number=5;
compression_per_level=kNoCompression:kNoCompression:kNoCompression:kNoCompression:kNoCompression:kNoCompression;
bottommost_compression=kNoCompression;
block_based_table_factory={cache_index_and_filter_blocks=1;filter_policy=bloomfilter:10:false;whole_key_filtering=1};
level_compaction_dynamic_level_bytes=false;
optimize_filters_for_hits=true

参数修改示例

SET @@global.rocksdb_update_cf_options='cf1={write_buffer_size=8m;target_file_size_base=2m};cf2={write_buffer_size =16m;max_bytes_for_level_multiplier=8};cf3={target_file_size_base=4m};';

注意:此方式可以动态修改,但没有持久化到OPTIONS文件中, 需手动修改OPTIONS文件

网友评论

登录后评论
0/500
评论
技术小能手
+ 关注