From 39dc8667731d8f820e1f3e7f650883aad55026ac Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Fri, 8 May 2015 15:59:23 +0800 Subject: [PATCH] common/config_opts.h: use string for rocksdb options. Now we can drop the ugly rocksdb interpret options, and have // rocksdb options that will be used for keyvaluestore(if backend is rocksdb) OPTION(keyvaluestore_rocksdb_options, OPT_STR, "") // rocksdb options that will be used for omap(if omap_backend is rocksdb) OPTION(omap_rocksdb_options, OPT_STR, "") // rocksdb options that will be used in monstore OPTION(mon_rocksdb_options, OPT_STR, "") Signed-off-by: Xiaoxi Chen --- src/common/config_opts.h | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 88c09f004dcc4..eacab3388e344 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -707,39 +707,12 @@ OPTION(kinetic_hmac_key, OPT_STR, "asdfasdf") // kinetic key to authenticate wit OPTION(kinetic_use_ssl, OPT_BOOL, false) // whether to secure kinetic traffic with TLS -//in memory write buffer configuration -OPTION(rocksdb_write_buffer_size, OPT_U64, 8*1024*1024) // rocksdb write buffer size, should be larger than average write size. -OPTION(rocksdb_write_buffer_num, OPT_INT, 2) // The maximum number of write buffers that are built up in memory. -OPTION(rocksdb_min_write_buffer_number_to_merge, OPT_INT, 1) // The min write buffers that will be merged together before writing to storage. -//on disk level0 configuration -OPTION(rocksdb_level0_file_num_compaction_trigger, OPT_INT, 4) // Number of files to trigger level-0 compaction -OPTION(rocksdb_level0_slowdown_writes_trigger, OPT_INT, -1) // number of level-0 files at which we start slowing down write. -1 means not set. -OPTION(rocksdb_level0_stop_writes_trigger, OPT_INT, -1) // number of level-0 files at which we stop writes. -1 means not set. -//on disk level1+ configuration -OPTION(rocksdb_max_bytes_for_level_base, OPT_U64, 10*1024*1024) // max total bytes for level 1 -OPTION(rocksdb_max_bytes_for_level_multiplier, OPT_INT, 10) // max total bytes for level 1 -OPTION(rocksdb_target_file_size_base, OPT_U64, 2*1024*1024) // target file size for level 1 -OPTION(rocksdb_target_file_size_multiplier, OPT_INT, 1) // target file size for Level-N = (multiplier)^(N-1) * file_size_base -OPTION(rocksdb_num_levels, OPT_INT, 7) // number of levels for this database,chang -OPTION(rocksdb_cache_size, OPT_U64, 0) // rocksdb cache size -OPTION(rocksdb_block_size, OPT_U64, 4*1024) // rocksdb block size -OPTION(rocksdb_bloom_bits_per_key, OPT_INT, 10) // rocksdb bloom bits per entry -//concurrency of compaction and flush -OPTION(rocksdb_max_background_compactions, OPT_INT, 1) // number for background compaction jobs -OPTION(rocksdb_compaction_threads, OPT_INT, 1) // number for background compaction jobs -OPTION(rocksdb_max_background_flushes, OPT_INT, 1) // number for background flush jobs -OPTION(rocksdb_flusher_threads, OPT_INT, 1) // number for background compaction jobs -//Other -OPTION(rocksdb_max_open_files, OPT_INT, 5000) // rocksdb max open files -OPTION(rocksdb_compression, OPT_STR, "snappy") // rocksdb uses compression : none, snappy, zlib, bzip2 -OPTION(rocksdb_compact_on_mount, OPT_BOOL, false) -OPTION(rocksdb_paranoid, OPT_BOOL, false) // RocksDB will aggressively check consistency of the data. -OPTION(rocksdb_log, OPT_STR, "/dev/null") // enable rocksdb log file -OPTION(rocksdb_info_log_level, OPT_STR, "info") // info log level : debug , info , warn, error, fatal -OPTION(rocksdb_wal_dir, OPT_STR, "") // rocksdb write ahead log file, put it to fast device will benifit wrtie performance -OPTION(rocksdb_disableDataSync, OPT_BOOL, false) // if true, data files are not synced to stable storage -OPTION(rocksdb_disableWAL, OPT_BOOL, false) // if true, writes will not first go to the write ahead log - +// rocksdb options that will be used for keyvaluestore(if backend is rocksdb) +OPTION(keyvaluestore_rocksdb_options, OPT_STR, "") +// rocksdb options that will be used for omap(if omap_backend is rocksdb) +OPTION(omap_rocksdb_options, OPT_STR, "") +// rocksdb options that will be used in monstore +OPTION(mon_rocksdb_options, OPT_STR, "") /** * osd_client_op_priority and osd_recovery_op_priority adjust the relative -- 2.39.5