md_config_t g_debug_after_conf;
md_config_t g_conf;
-#if 0
-md_config_t g_conf = {
- num_mon: 1,
- num_mds: 1,
- num_osd: 4,
- num_client: 1,
-
- monmap_file: ".ceph_monmap",
- mon_host: 0,
- daemonize: false,
-
- // profiling and debugging
- logger: true,
- logger_interval: 1,
- logger_calc_variance: true,
- logger_subdir: 0,
- logger_dir: INSTALL_PREFIX "/var/log/ceph/stat",
-
- log_dir: INSTALL_PREFIX "/var/log/ceph", // if daemonize == true
- log_sym_dir: INSTALL_PREFIX "/var/log/ceph", // if daemonize == true
- log_to_stdout: true,
-
- pid_file: 0,
-
- conf_file: INSTALL_PREFIX "/etc/ceph/ceph.conf",
-
- dump_conf: false,
-
- chdir_root: true, // chdir("/") after daemonizing. if true, we generate absolute paths as needed.
-
- fake_clock: false,
- fakemessenger_serialize: true,
-
- kill_after: 0,
-
- debug: 0,
- debug_lockdep: 0,
- debug_mds: 1,
- debug_mds_balancer: 1,
- debug_mds_log: 1,
- debug_mds_log_expire: 1,
- debug_mds_migrator: 1,
- debug_buffer: 0,
- debug_timer: 0,
- debug_filer: 0,
- debug_objecter: 0,
- debug_journaler: 0,
- debug_objectcacher: 0,
- debug_client: 0,
- debug_osd: 0,
- debug_ebofs: 1,
- debug_filestore: 1,
- debug_journal: 1,
- debug_bdev: 1, // block device
- debug_ns: 0,
- debug_ms: 0,
- debug_mon: 1,
- debug_paxos: 0,
- debug_tp: 0,
-
- debug_after: 0,
-
- // --- clock ---
- clock_lock: false,
- clock_tare: false,
-
- // --- messenger ---
- ms_tcp_nodelay: true,
- ms_retry_interval: 2.0, // how often to attempt reconnect
- ms_fail_interval: 15.0, // fail after this long
- ms_die_on_failure: false,
- ms_nocrc: false,
-
-
- // --- mon ---
- mon_tick_interval: 5,
- mon_osd_down_out_interval: 5, // seconds
- mon_lease: 5, // seconds // lease interval
- mon_lease_renew_interval: 3, // on leader, to renew the lease
- mon_lease_ack_timeout: 10.0, // on leader, if lease isn't acked by all peons
- mon_lease_timeout: 10.0, // on peon, if lease isn't extended
- mon_accept_timeout: 10.0, // on leader, if paxos update isn't accepted
- mon_stop_on_last_unmount: false,
- mon_stop_with_last_mds: false,
- mon_allow_mds_bully: false, // allow a booting mds to (forcibly) claim an mds # .. FIXME
- mon_pg_create_interval: 30.0, // no more than every 30s
-
- paxos_propose_interval: 1.0, // gather updates for this long before proposing a map update
- paxos_observer_timeout: 5*60, // gather updates for this long before proposing a map update
-
- // --- client ---
- client_cache_size: 1000,
- client_cache_mid: .5,
- client_cache_stat_ttl: 0, // seconds until cached stat results become invalid
- client_cache_readdir_ttl: 1, // 1 second only
- client_use_random_mds: false,
- client_mount_timeout: 10.0, // retry every N seconds
- client_tick_interval: 1.0,
- client_hack_balance_reads: false,
- client_trace: 0,
- client_readahead_min: 128*1024, // readahead at _least_ this much.
- client_readahead_max_bytes: 0,//8 * 1024*1024,
- client_readahead_max_periods: 4, // as multiple of file layout period (object size * num stripes)
- client_snapdir: ".snap",
- fuse_direct_io: 0,
- fuse_ll: true,
-
- // --- objectcacher ---
- client_oc: true,
- client_oc_size: 1024*1024* 64, // MB * n
- client_oc_max_dirty: 1024*1024* 48, // MB * n (dirty OR tx.. bigish)
- client_oc_target_dirty: 1024*1024* 8, // target dirty (keep this smallish)
- // note: the max amount of "in flight" dirty data is roughly (max - target)
- client_oc_max_sync_write: 128*1024, // sync writes >= this use wrlock
-
- // --- objecter ---
- objecter_buffer_uncommitted: true, // this must be true for proper failure handling
- objecter_map_request_interval: 15.0, // request a new map every N seconds, if we have pending io
- objecter_tick_interval: 5.0,
- objecter_timeout: 10.0, // before we ask for a map
-
- // --- journaler ---
- journaler_allow_split_entries: true,
- journaler_safe: true, // wait for COMMIT on journal writes
- journaler_write_head_interval: 15,
- journaler_cache: false, // cache writes for later readback
- journaler_prefetch_periods: 50, // * journal object size (1~MB? see above)
- journaler_batch_interval: .001, // seconds.. max add'l latency we artificially incur
- //journaler_batch_max: 16384, // max bytes we'll delay flushing
- journaler_batch_max: 0, // disable, for now....
-
- // --- mds ---
- mds_cache_size: 300000,
- mds_cache_mid: .7,
-
- mds_decay_halflife: 5,
-
- mds_beacon_interval: 4, //30.0,
- mds_beacon_grace: 15, //60*60.0,
- mds_blacklist_interval: 24.0*60.0, // how long to blacklist failed nodes
-
- mds_session_timeout: 60, // cap bits and leases time out if client idle
- mds_session_autoclose: 300, // autoclose idle session
- mds_client_lease: 120, // (assuming session stays alive)
- mds_reconnect_timeout: 30, // seconds to wait for clients during mds restart
- // make it (mds_session_timeout - mds_beacon_grace)
-
- mds_tick_interval: 5,
- mds_scatter_nudge_interval: 5, // how quickly dirstat changes propagate up the hierarchy
-
- mds_client_prealloc_inos: 1000,
- mds_early_reply: true,
-
- mds_rdcap_ttl_ms: 60*1000,
-
- mds_log: true,
- mds_log_unsafe: false, // only wait for log sync, when it's mostly safe to do so
- mds_log_max_events: -1,
- mds_log_max_segments: 100, // segment size defined by FileLayout, above
- mds_log_max_expiring: 20,
- mds_log_pad_entry: 128,//256,//64,
- mds_log_eopen_size: 100, // # open inodes per log entry
-
- mds_bal_sample_interval: 3.0, // every 5 seconds
- mds_bal_replicate_threshold: 8000,
- mds_bal_unreplicate_threshold: 0,//500,
- mds_bal_frag: true,
- mds_bal_split_size: 10000,
- mds_bal_split_rd: 25000,
- mds_bal_split_wr: 10000,
- mds_bal_merge_size: 50,
- mds_bal_merge_rd: 1000,
- mds_bal_merge_wr: 1000,
- mds_bal_interval: 10, // seconds
- mds_bal_fragment_interval: -1, // seconds
- mds_bal_idle_threshold: 0, //.1,
- mds_bal_max: -1,
- mds_bal_max_until: -1,
-
- mds_bal_mode: 0,
- mds_bal_min_rebalance: .1, // must be this much above average before we export anything
- mds_bal_min_start: .2, // if we need less than this, we don't do anything
- mds_bal_need_min: .8, // take within this range of what we need
- mds_bal_need_max: 1.2,
- mds_bal_midchunk: .3, // any sub bigger than this taken in full
- mds_bal_minchunk: .001, // never take anything smaller than this
-
- mds_trim_on_rejoin: true,
- mds_shutdown_check: 0, //30,
-
- mds_verify_export_dirauth: true,
-
- mds_local_osd: false,
-
- mds_thrash_exports: 0,
- mds_thrash_fragments: 0,
- mds_dump_cache_on_map: false,
- mds_dump_cache_after_rejoin: true,
-
- mds_hack_log_expire_for_better_stats: false,
-
- // --- osd ---
- osd_balance_reads: false, // send from client to replica
- osd_flash_crowd_iat_threshold: 0,//100,
- osd_flash_crowd_iat_alpha: 0.125,
- osd_balance_reads_temp: 100,
-
- osd_shed_reads: false, // forward from primary to replica
- osd_shed_reads_min_latency: .01, // min local latency
- osd_shed_reads_min_latency_diff: .01, // min latency difference
- osd_shed_reads_min_latency_ratio: 1.5, // 1.2 == 20% higher than peer
-
- osd_immediate_read_from_cache: false,//true, // osds to read from the cache immediately?
- osd_exclusive_caching: true, // replicas evict replicated writes
-
- osd_stat_refresh_interval: .5,
-
- osd_min_pg_size_without_alive: 2, // smallest pg we allow to activate without telling the monitor
-
- osd_pg_bits: 6, // bits per osd
- osd_lpg_bits: 1, // bits per osd
- osd_object_layout: CEPH_OBJECT_LAYOUT_HASHINO,//LINEAR,//HASHINO,
- osd_pg_layout: CEPH_PG_LAYOUT_CRUSH,//LINEAR,//CRUSH,
- osd_min_rep: 2,
- osd_max_rep: 3,
- osd_min_raid_width: 3,
- osd_max_raid_width: 2, //6,
-
- osd_maxthreads: 2, // 0 == no threading
- osd_max_opq: 10,
- osd_age: .8,
- osd_age_time: 0,
- osd_heartbeat_interval: 1,
- osd_mon_heartbeat_interval: 30, // if no peers, ping monitor
- osd_heartbeat_grace: 20,
- osd_mon_report_interval: 5, // pg stats, failures, up_thru, boot.
- osd_replay_window: 45,
- osd_max_pull: 2,
- osd_preserve_trimmed_log: true,
-
- osd_recovery_delay_start: 15,
- osd_recovery_max_active: 5,
-
- osd_auto_weight: false,
-
-
- // --- filestore ---
- filestore: false,
- filestore_sync_interval: .2, // seconds
- filestore_fake_attrs: false,
- filestore_fake_collections: false,
- filestore_dev: 0,
- filestore_btrfs_trans: true,
-
- // --- ebofs ---
- ebofs: false,
- ebofs_cloneable: true,
- ebofs_verify: false,
- ebofs_commit_ms: 200, // 0 = no forced commit timeout (for debugging/tracing)
- ebofs_oc_size: 10000, // onode cache
- ebofs_cc_size: 10000, // cnode cache
- ebofs_bc_size: (50 *256), // 4k blocks, *256 for MB
- ebofs_bc_max_dirty: (30 *256), // before write() will block
- ebofs_max_prefetch: 1000, // 4k blocks
- ebofs_realloc: false, // hrm, this can cause bad fragmentation, don't use!
- ebofs_verify_csum_on_read: true,
-
- // journal
- journal_dio: false,
- journal_max_write_bytes: 0,
- journal_max_write_entries: 100,
-
- // --- block device ---
- bdev_lock: true,
- bdev_iothreads: 1, // number of ios to queue with kernel
- bdev_idle_kick_after_ms: 100, // ms
- bdev_el_fw_max_ms: 10000, // restart elevator at least once every 1000 ms
- bdev_el_bw_max_ms: 3000, // restart elevator at least once every 300 ms
- bdev_el_bidir: false, // bidirectional elevator?
- bdev_iov_max: 512, // max # iov's to collect into a single readv()/writev() call
- bdev_debug_check_io_overlap: true, // [DEBUG] check for any pending io overlaps
- bdev_fake_mb: 0,
- bdev_fake_max_mb: 0
-
-#ifdef USE_OSBDB
- ,
- bdbstore: false,
- debug_bdbstore: 1,
- bdbstore_btree: false,
- bdbstore_ffactor: 0,
- bdbstore_nelem: 0,
- bdbstore_pagesize: 0,
- bdbstore_cachesize: 0,
- bdbstore_transactional: false
-#endif // USE_OSBDB
-};
-#endif
#include <stdlib.h>
#include <string.h>