v0.82
-----
-- mon-specific leveldb options have been removed. From this point onward,
- users should use 'leveldb_' generic options and add the options in the
- appropriate sections of their configuration files.
- The monitors will still maintain the following monitor-specific defaults:
+- mon-specific and osd-specific leveldb options have been removed.
+ From this point onward users should use 'leveldb_' generic options and add
+ the options in the appropriate sections of their configuration files.
+ Monitors will still maintain the following monitor-specific defaults:
leveldb_write_buffer_size = 32*1024*1024 = 33554432 // 32MB
leveldb_cache_size = 512*1024*1204 = 536870912 // 512MB
leveldb_block_size = 64*1024 = 65536 // 64KB
leveldb_compression = false
leveldb_log = ""
+
+ OSDs will still maintain the following osd-specific defaults:
+
+ leveldb_log = ""
argv_to_vec(argc, argv, args);
env_to_vec(args);
- global_init(NULL, args, CEPH_ENTITY_TYPE_OSD, CODE_ENVIRONMENT_DAEMON, 0);
+ vector<const char*> def_args;
+ // We want to enable leveldb's log, while allowing users to override this
+ // option, therefore we will pass it as a default argument to global_init().
+ def_args.push_back("--leveldb-log=");
+
+ global_init(&def_args, args, CEPH_ENTITY_TYPE_OSD, CODE_ENVIRONMENT_DAEMON, 0);
ceph_heap_profiler_init();
// osd specific args
OPTION(osd_target_transaction_size, OPT_INT, 30) // to adjust various transactions that batch smaller items
OPTION(osd_failsafe_full_ratio, OPT_FLOAT, .97) // what % full makes an OSD "full" (failsafe)
OPTION(osd_failsafe_nearfull_ratio, OPT_FLOAT, .90) // what % full makes an OSD near full (failsafe)
-OPTION(osd_leveldb_write_buffer_size, OPT_U64, 0) // OSD's leveldb write buffer size
-OPTION(osd_leveldb_cache_size, OPT_U64, 0) // OSD's leveldb cache size
-OPTION(osd_leveldb_block_size, OPT_U64, 0) // OSD's leveldb block size
-OPTION(osd_leveldb_bloom_size, OPT_INT, 0) // OSD's leveldb bloom bits per entry
-OPTION(osd_leveldb_max_open_files, OPT_INT, 0) // OSD's leveldb max open files
-OPTION(osd_leveldb_compression, OPT_BOOL, true) // OSD's leveldb uses compression
-OPTION(osd_leveldb_paranoid, OPT_BOOL, false) // OSD's leveldb paranoid flag
-OPTION(osd_leveldb_log, OPT_STR, "") // enable OSD leveldb log file
// determines whether PGLog::check() compares written out log to stored log
OPTION(osd_debug_pg_log_writeout, OPT_BOOL, false)
LevelDBStore *omap_store = new LevelDBStore(g_ceph_context, omap_dir);
omap_store->init();
- if (g_conf->osd_leveldb_write_buffer_size)
- omap_store->options.write_buffer_size = g_conf->osd_leveldb_write_buffer_size;
- if (g_conf->osd_leveldb_cache_size)
- omap_store->options.cache_size = g_conf->osd_leveldb_cache_size;
- if (g_conf->osd_leveldb_block_size)
- omap_store->options.block_size = g_conf->osd_leveldb_block_size;
- if (g_conf->osd_leveldb_bloom_size)
- omap_store->options.bloom_size = g_conf->osd_leveldb_bloom_size;
- if (g_conf->osd_leveldb_compression)
- omap_store->options.compression_enabled = g_conf->osd_leveldb_compression;
- if (g_conf->osd_leveldb_paranoid)
- omap_store->options.paranoid_checks = g_conf->osd_leveldb_paranoid;
- if (g_conf->osd_leveldb_max_open_files)
- omap_store->options.max_open_files = g_conf->osd_leveldb_max_open_files;
- if (g_conf->osd_leveldb_log.length())
- omap_store->options.log_file = g_conf->osd_leveldb_log;
stringstream err;
if (omap_store->create_and_open(err)) {