# share memory type, shm or mmap # shm for SystemV pure shared memory # mmap for POSIX shared memory based file # default value is shm # Note: when type is shm, the shm limit is too small in FreeBSD and MacOS, # you should increase following kernel parameters: # kern.sysv.shmmax # kern.sysv.shmall # kern.sysv.shmseg # you can refer to http://www.unidata.ucar.edu/software/mcidas/2008/users_guide/workstation.html type = shm # the lock filename filename = /tmp/shmcache # the memory limit # the oldest memory will be recycled when this max memory reached max_memory = 256M # the min memory # default: 0, means do NOT set min memory min_memory = 0 # the memory segment size for incremental memory allocation segment_size = 8M # the key number limit max_key_count = 200000 # the size limit for one value max_value_size = 256K # the hash function in libfastcommon/src/hash.h # default: simple_hash hash_function = simple_hash # recycle key number once when reach max keys # <= 0 means recycle one memory striping # default: 0 recycle_key_once = 0 # value allocator policy # avg. key TTL threshold for recycling memory # <= 0 for never recycle memory until reach memory limit (max_memory) # unit: second # default: 0 value_policy.avg_key_ttl = 5400 # when the remain memory <= this parameter, discard it value_policy.discard_memory_size = 128 # when a value allocator allocate fail times > this parameter, # means it is almost full, discard it # default: 5 value_policy.max_fail_times = 5 # sleep time to avoid other processes read dirty data when # recycle more than one valid (in TTL / not expired) KV entries # 0 for never sleep # unit: microsecond (us) # default: 0 value_policy.sleep_us_when_recycle_valid_entries = 1000 # try lock interval in us, must great than zero # unit: microsecond (us) # default value is 200 us lock_policy.trylock_interval_us = 200 # the interval to detect deadlock caused by the crushed process # must great than zero # unit: millisecond (ms) # default value is 1000 ms lock_policy.detect_deadlock_interval_ms = 1000 # standard log level as syslog, case insensitive, value list: ## emerg for emergency ## alert ## crit for critical ## error ## warn for warning ## notice ## info ## debug log_level = info