-
Notifications
You must be signed in to change notification settings - Fork 6
/
db_bench_enterprise.yaml
248 lines (248 loc) · 7.43 KB
/
db_bench_enterprise.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
http:
# normally parent path of db path
document_root: /dev/shm/db_bench_enterprise
listening_ports: '2011'
setenv:
DictZipBlobStore_zipThreads: 32
StrSimpleEnvNameNotOverwrite: StringValue
IntSimpleEnvNameNotOverwrite: 16384
OverwriteThisEnv:
#comment: overwrite is default to false
overwrite: true
value: force overwrite this env by overwrite true
Cache:
lru_cache:
class: LRUCache
params:
capacity: 16G
#num_shard_bits: -1 # max is 6, mostly is 6
#strict_capacity_limit: false
#high_pri_pool_ratio: 0.5 # default is 0
#use_adaptive_mutex: false
#metadata_charge_policy: kFullChargeCacheMetadata
Statistics:
stat:
class: default
params:
discard_tickers:
#comment: 可以仅指定前缀,必须是以 . 为边界的前缀,例如下面两个必须分别指定
- rocksdb.block.cache
- rocksdb.block.cachecompressed
# comment: 上面两个也可以用下面这一个概括
- rocksdb.block
# 精确指定
- rocksdb.memtable.payload.bytes.at.flush
- rocksdb.memtable.garbage.bytes.at.flush
# pika 未使用 txn
- rocksdb.txn
- rocksdb.blobdb
- rocksdb.row.cache
- rocksdb.number.block
- rocksdb.bloom.filter
- rocksdb.persistent
- rocksdb.sim.block.cache
discard_histograms:
# comment: ....
- rocksdb.blobdb
- rocksdb.bytes.compressed
- rocksdb.bytes.decompressed
- rocksdb.num.index.and.filter.blocks.read.per.level
- rocksdb.num.data.blocks.read.per.level
- rocksdb.compression.times.nanos
- rocksdb.decompression.times.nanos
- rocksdb.read.block.get.micros
- rocksdb.write.raw.block.micros
# comment end of array
#stats_level: kAll
stats_level: kDisableAll
MemTableRepFactory:
cspp:
#class: CSPPMemTab # canonical class name
class: cspp # "cspp" is simplified class name
params:
mem_cap: 3G # just reserve virtual address space
cspp_debug_level: 1
# vm_explicit_commit: true # default false
# vm_background_commit: false # default false
chunk_size: 256K # default 2M
use_vm: true # default is true
# use_hugepage: false # equivalent to kNone, default
# use_hugepage: true # equivalent to kMmap
# use_hugepage: kNone # default, dont use hugepage
# use_hugepage: kMmap # mmap(MAP_HUGETLB)
# use_hugepage: kTransparent # mmap(normal) + madvise(MADV_HUGEPAGE)
token_use_idle: true
read_by_writer_token: true
# convert_to_sst: kDontConvert
# convert_to_sst: kDumpMem
convert_to_sst: kFileMmap
sync_sst_file: false
chroot_dir: /dev/shm
skiplist:
class: SkipList
params:
lookahead: 0
FilterPolicy:
bloom:
class: BloomFilter
params:
bits_per_key: 10
use_block_based_builder: false
TableFactory:
fast:
class: SingleFastTable
params:
indexType: MainPatricia
keyPrefixLen: 0
zip:
class: ToplingZipTable
params:
localTempDir: /tmp
indexNestLevel: 1
enableStatistics: false
warmupLevel: kIndex
acceptCompressionRatio: 0.8
offsetArrayBlockUnits: 128
sampleRatio: 0.01
checksumLevel: 0
debugLevel: 0
minDictZipValueSize: 3000
minPreadLen: -1
bb:
class: BlockBasedTable
params:
#checksum: kCRC32c
#checksum: kXXH3 # default
block_size: 4K
block_restart_interval: 16
#block_size: 512 # small, makes block_cache nearly a row cache
#block_restart_interval: 1 # fit for small block_size
index_block_restart_interval: 1
metadata_block_size: 4K
#enable_index_compression: true
block_cache: "${lru_cache}"
block_cache_compressed:
persistent_cache:
filter_policy: bloom # use ~20% of raw ukey size in db_bench key_size=8
cspp_memtab_sst:
class: CSPPMemTabTable
params: # empty params
dispatch:
class: DispatcherTable
params:
default: fast
readers:
SingleFastTable: fast
ToplingZipTable: zip
BlockBasedTable: bb
CSPPMemTabTable: cspp_memtab_sst
level_writers: [fast, fast, zip, zip, zip, zip, zip, zip]
dispatch_all_fast:
class: DispatcherTable
params:
default: fast
readers:
SingleFastTable: fast
ToplingZipTable: zip
BlockBasedTable: bb
CSPPMemTabTable: cspp_memtab_sst
level_writers: [fast, fast, fast, fast, fast, fast, fast]
dispatch_fast_bb:
class: DispatcherTable
params:
default: fast
readers:
SingleFastTable: fast
ToplingZipTable: zip
BlockBasedTable: bb
CSPPMemTabTable: cspp_memtab_sst
level_writers: [fast, fast, bb, bb, bb, bb, bb]
WriteBufferManager:
wbm:
class: WriteBufferManager
params:
buffer_size: 4G
CFOptions:
default:
max_write_buffer_number: 3
#disable_auto_compactions: true
#memtable_factory: "${skiplist}"
memtable_factory: "${cspp}"
write_buffer_size: 2G # 64m, rocksdb recommend small, toplingdb recommend large
target_file_size_base: 32M
target_file_size_multiplier: 2
table_factory: dispatch
#table_factory: dispatch_all_fast
#table_factory: dispatch_fast_bb
#max_bytes_for_level_base: 512M # default = max(256M, write_buffer_size)
max_bytes_for_level_multiplier: 10
########
# For ToplingDB distributed compaction, this should set to false
level_compaction_dynamic_level_bytes: false # rocksdb-8.04 default true
#level_compaction_dynamic_level_bytes: true # rocksdb-8.04 default true
level0_slowdown_writes_trigger: 20
level0_stop_writes_trigger: 36
level0_file_num_compaction_trigger: 4
compression: kSnappyCompression
compression_per_level:
- kNoCompression
- kSnappyCompression
- kSnappyCompression
- kSnappyCompression
- kSnappyCompression
- kSnappyCompression
- kZSTD
FileSystem:
fs1:
class: ChrootFileSystem
params:
chroot_dir: /dev/shm
fs2: # should be a remote file system
class: ChrootFileSystem
params:
chroot_dir: /tmp
cat_fs:
class: CatFileSystem
params:
local: "${fs1}"
remote: "${fs2}"
Env:
cat_env:
class: CompositeEnv
params:
file_system: "$cat_fs"
DBOptions:
dbo:
env: "$cat_env"
allow_fallocate: false # default true
allow_fdatasync: false # default true
create_if_missing: true
create_missing_column_families: true
#enable_pipelined_write: true # must be false if unordered_write is true
unordered_write: true
#info_log_level: DEBUG_LEVEL
max_background_flushes: 2 # default is -1
max_background_compactions: 13 # default is -1
max_subcompactions: 1 # default is 1
max_level1_subcompactions: 7 # default 0 to use max_subcompactions
inplace_update_support: false # default is false
write_buffer_manager: "${wbm}"
WAL_size_limit_MB: 0
#statistics: "${stat}" # if defined, it incurs some overhead
databases:
db_bench_enterprise:
method: DB::Open
params:
db_options: "$dbo"
cf_options: "$default" # for single cf db
column_families: # for multi cf db
default: "$default"
dyna_cf_opt: "$default"
#path is optional, if not defined, use name as path
#last part of path must be same as name(here is 'db_bench_enterprise')
path: /db_bench_enterprise
db_test:
method: DB::Open
params:
db_options: "$dbo"
open: db_bench_enterprise