|
143 | 143 | merge |
144 | 144 | ]}. |
145 | 145 |
|
146 | | -%% VM scheduler collapse, part 1 of 2 |
| 146 | +%% @doc Riak changes the VM default wakeup interval in order to reduce the |
| 147 | +%% risk of scheduler collapse, prior to the availability of Dirty NIFs in |
| 148 | +%% later OTP versions. When using the leveled backend exclusively (either for |
| 149 | +%% AAE or object storage) this change is likely unnecessary, and the VM default |
| 150 | +%% of 0 can be used. |
147 | 151 | {mapping, "erlang.schedulers.force_wakeup_interval", "vm_args.+sfwi", [ |
148 | 152 | {default, 500}, |
149 | 153 | {datatype, integer}, |
150 | 154 | merge |
151 | 155 | ]}. |
152 | 156 |
|
153 | | -%% VM scheduler collapse, part 2 of 2 |
| 157 | +%% @doc Riak changes the compaction_of_load default from true to false. This |
| 158 | +%% is part of the strategy for preventing scheduler collapse in older VMs. |
| 159 | +%% When using the leveled backend exclusively (either for AAE or object |
| 160 | +%% storage), this change from the standard BEAM defaults is likely unnecessary |
| 161 | +%% - and compaction_of_load can be re-enabled. |
154 | 162 | {mapping, "erlang.schedulers.compaction_of_load", "vm_args.+scl", [ |
155 | 163 | {default, "false"}, |
156 | 164 | merge |
157 | 165 | ]}. |
158 | 166 |
|
| 167 | +%% @doc Sets the number of threads in async thread pool, valid range |
| 168 | +%% is 0-1024. If thread support is available, the default is 64. |
| 169 | +%% |
| 170 | +%% More information at: http://erlang.org/doc/man/erl.html |
| 171 | +%% |
| 172 | +%% Large async_thread pools are likely now unnecessary if exclusively using |
| 173 | +%% the leveled backend due to dirty NIFs, and so can be set to a much smaller |
| 174 | +%% value (potentially 1). |
| 175 | +{mapping, "erlang.async_threads", "vm_args.+A", [ |
| 176 | + {default, 64}, |
| 177 | + {datatype, integer}, |
| 178 | + {validators, ["range:0-1024"]}, |
| 179 | + merge |
| 180 | +]}. |
| 181 | + |
159 | 182 | %% VM emulator ignore break signal (prevent ^C / ^Gq) |
160 | 183 | {mapping, "erlang.vm.ignore_break_signal", "vm_args.+Bi", [ |
161 | 184 | {default, "true"}, |
162 | 185 | merge |
163 | 186 | ]}. |
164 | 187 |
|
| 188 | +%% @doc The VM single block carrier threshold (KB) for process heap |
| 189 | +{mapping, "erlang.eheap_memory.sbct", "vm_args.+MHsbct", [ |
| 190 | + {commented, 512}, |
| 191 | + {datatype, integer}, |
| 192 | + merge |
| 193 | +]}. |
| 194 | + |
| 195 | +%% @doc The VM single block carrier threshold (KB) for binary heap |
| 196 | +{mapping, "erlang.binary_memory.sbct", "vm_args.+MBsbct", [ |
| 197 | + {commented, 512}, |
| 198 | + {datatype, integer}, |
| 199 | + merge |
| 200 | +]}. |
| 201 | + |
| 202 | +%% @doc The VM multi block carrier large size for process heap |
| 203 | +{mapping, "erlang.eheap_memory.lmbcs", "vm_args.+MHlmbcs", [ |
| 204 | + {commented, 5120}, |
| 205 | + {datatype, integer}, |
| 206 | + merge |
| 207 | +]}. |
| 208 | + |
| 209 | +%% @doc The VM multi block carrier large size for binary heap |
| 210 | +{mapping, "erlang.binary_memory.lmbcs", "vm_args.+MBlmbcs", [ |
| 211 | + {commented, 5120}, |
| 212 | + {datatype, integer}, |
| 213 | + merge |
| 214 | +]}. |
| 215 | + |
| 216 | +%% @doc The VM multi block carrier small size for process heap |
| 217 | +{mapping, "erlang.eheap_memory.smbcs", "vm_args.+MHsmbcs", [ |
| 218 | + {commented, 256}, |
| 219 | + {datatype, integer}, |
| 220 | + merge |
| 221 | +]}. |
| 222 | + |
| 223 | +%% @doc The VM multi block carrier small size for binary heap |
| 224 | +{mapping, "erlang.binary_memory.smbcs", "vm_args.+MBsmbcs", [ |
| 225 | + {commented, 256}, |
| 226 | + {datatype, integer}, |
| 227 | + merge |
| 228 | +]}. |
| 229 | + |
| 230 | + %% @doc Set allocation strategy for binary multiblock carriers. Default is |
| 231 | +%% not predictable - do not rely on aoffcbf being the default. For more info |
| 232 | +%% see: |
| 233 | +%% https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/CarrierMigration.md |
| 234 | +{mapping, "erlang.binary_memory.as", "vm_args.+MBas", [ |
| 235 | + {commented, "aoffcbf"}, |
| 236 | + {datatype, {enum, [bf, aobf, aoff, aoffcbf, aoffcaobf, ageffcaoff, ageffcbf, ageffcaobf, gf]}}, |
| 237 | + merge |
| 238 | +]}. |
| 239 | + |
| 240 | +%% @doc Set allocation strategy for process multiblock carriers. Default is |
| 241 | +%% not predictable - do not rely on aoffcbf being the default. For more info |
| 242 | +%% see: |
| 243 | +%% https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/CarrierMigration.md |
| 244 | +{mapping, "erlang.eheap_memory.as", "vm_args.+MHas", [ |
| 245 | + {commented, "aoffcbf"}, |
| 246 | + {datatype, {enum, [bf, aobf, aoff, aoffcbf, aoffcaobf, ageffcaoff, ageffcbf, ageffcaobf, gf]}}, |
| 247 | + merge |
| 248 | +]}. |
| 249 | + |
| 250 | +%% @doc Set scheduler binding. This is either unbound (default - u) or can be |
| 251 | +%% set to whatever the default binding condition is, in the deployed release of |
| 252 | +%% OTP (db). |
| 253 | +%% For more info see: https://www.erlang.org/doc/man/erl.html#+sbt |
| 254 | +%% Note that if non-Riak work is activated on the same node - e.g. as part |
| 255 | +%% of batch operational jobs, or monitoring - allowing schedulers to be bound |
| 256 | +%% can result in significant and unpredictable negative outcomes. There may be |
| 257 | +%% other ways of achieving similar performance improvements - e.g. by |
| 258 | +%% right-sizing scheduler counts - that are lower risk than scheduler binding. |
| 259 | +%% If a CPU topology cannot be determined, the binding will default to unbound |
| 260 | +%% even when a binding is configured. To confirm binding, use `remote_console` |
| 261 | +%% and view: |
| 262 | +%% `erlang:system_info(scheduler_bindings).` |
| 263 | +{mapping, "erlang.schedulers_binding", "vm_args.+stbt", [ |
| 264 | + {commented, "u"}, |
| 265 | + {datatype, {enum, [u, db]}}, |
| 266 | + merge |
| 267 | +]}. |
| 268 | + |
| 269 | +%% @doc Busy wait of schedulers |
| 270 | +%% Sets scheduler busy wait threshold. Defaults to medium. The threshold |
| 271 | +%% determines how long schedulers are to busy wait when running out of work |
| 272 | +%% before going to sleep. |
| 273 | +%% Significant improvements in efficiency may be gained by disabling busy |
| 274 | +%% waiting |
| 275 | +{mapping, "erlang.schedulers_busywait", "vm_args.+sbwt", [ |
| 276 | + {commented, "none"}, |
| 277 | + {datatype, {enum, [none, very_short, short, medium, long, very_long]}}, |
| 278 | + merge |
| 279 | +]}. |
| 280 | + |
| 281 | +%% @doc Busy wait of dirty cpu schedulers |
| 282 | +%% Sets scheduler busy wait threshold. Defaults to short. The threshold |
| 283 | +%% determines how long schedulers are to busy wait when running out of work |
| 284 | +%% before going to sleep. |
| 285 | +%% Significant improvements in efficiency may be gained by disabling busy |
| 286 | +%% waiting |
| 287 | +{mapping, "erlang.schedulers_busywait_dirtycpu", "vm_args.+sbwtdcpu", [ |
| 288 | + {commented, "none"}, |
| 289 | + {datatype, {enum, [none, very_short, short, medium, long, very_long]}}, |
| 290 | + merge |
| 291 | +]}. |
| 292 | + |
| 293 | +%% @doc Busy wait of dirty io schedulers |
| 294 | +%% Sets scheduler busy wait threshold. Defaults to short. The threshold |
| 295 | +%% determines how long schedulers are to busy wait when running out of work |
| 296 | +%% before going to sleep. |
| 297 | +%% Significant improvements in efficiency may be gained by disabling busy |
| 298 | +%% waiting |
| 299 | +{mapping, "erlang.schedulers_busywait_dirtyio", "vm_args.+sbwtdio", [ |
| 300 | + {commented, "none"}, |
| 301 | + {datatype, {enum, [none, very_short, short, medium, long, very_long]}}, |
| 302 | + merge |
| 303 | +]}. |
| 304 | + |
| 305 | +%% @doc Set the Percentage of Schedulers to be online |
| 306 | +%% For every vCPU in the system, what percentage should have a scheduler, and |
| 307 | +%% what percentage of those schedulers should be online by default. |
| 308 | +%% Do not set unless guided by perfomance tests for the specific setup and |
| 309 | +%% workload. |
| 310 | +{mapping, "erlang.schedulers_online_percentage", "vm_args.+SP",[ |
| 311 | + {commented, "100:75"}, |
| 312 | + {validators, ["scheduler_percentage"]}, |
| 313 | + merge |
| 314 | +]}. |
| 315 | + |
| 316 | +%% @doc Set the Percentage of Dirty CPU Schedulers to be online |
| 317 | +%% When using the leveled backend a relatievly low number of dirty schedulers |
| 318 | +%% (e.g. 25%) are likely to be required due to the low proportion of NIFs in |
| 319 | +%% use. |
| 320 | +%% The percentages cannot exceed those of the schedulers_online_percentage |
| 321 | +%% which will default to 100% of CPU. |
| 322 | +%% Do not set unless guided by perfomance tests for the specific setup and |
| 323 | +%% workload. |
| 324 | +{mapping, "erlang.schedulers_dirtycpu_online_percentage", "vm_args.+SDPcpu",[ |
| 325 | + {commented, "50:25"}, |
| 326 | + {validators, ["scheduler_percentage"]}, |
| 327 | + merge |
| 328 | +]}. |
| 329 | + |
| 330 | +%% @doc Set the absolute limit of Dirty IO Schedulers to be online |
| 331 | +%% When using the leveled backend a relatievly high number of dirty schedulers |
| 332 | +%% may be required relative to the CPU count, depending on the concurrent disk |
| 333 | +%% throughput possible. |
| 334 | +%% Unlike the scheduler percentages, this is set as an abolute number between |
| 335 | +%% 1 and 1024 (default is 10). |
| 336 | +%% Do not set unless guided by perfomance tests for the specific setup and |
| 337 | +%% workload. |
| 338 | +{mapping, "erlang.schedulers_dirtyio_online", "vm_args.+SDio",[ |
| 339 | + {commented, 10}, |
| 340 | + {datatype, integer}, |
| 341 | + {validators, ["scheduler_absolute"]}, |
| 342 | + merge |
| 343 | +]}. |
| 344 | + |
| 345 | +{validator, |
| 346 | + "scheduler_percentage", |
| 347 | + "must be A:B when B =< A and both A and B 1 < x =< 100", |
| 348 | + fun(PercPerc) -> |
| 349 | + case string:tokens(PercPerc, ":") of |
| 350 | + [A, B] -> |
| 351 | + AV = list_to_integer(A), |
| 352 | + BV = list_to_integer(B), |
| 353 | + AV =< 100 andalso AV > 0 andalso BV =< 100 andalso BV > 0; |
| 354 | + _ -> |
| 355 | + false |
| 356 | + end |
| 357 | + end}. |
| 358 | + |
| 359 | +{validator, |
| 360 | + "scheduler_absolute", |
| 361 | + "must be 1 to 1024", |
| 362 | + fun(Value) -> |
| 363 | + is_integer(Value) andalso Value =< 1024 andalso Value >= 1 |
| 364 | + end}. |
| 365 | + |
165 | 366 | {{#devrel}} |
166 | 367 | %% Because of the 'merge' keyword in the proplist below, the docs and datatype |
167 | 368 | %% are pulled from the leveldb schema. |
|
0 commit comments