Why swapping is not a good idea in zookeeper and kafka? -
i have read instructions on
do not use swap
both on zookeeper , kafka. know kafka depends on pagecaching keep parts of sequential logs cached in-memory written disk.
but can not understand how swapping can harm zk , kafka.
swapping may cause performance stability problems; in example, don't want linux kernel "mistakenly/accidentally" swap kafka or zookeeper processes.
also, swapping may particularly bad jvm processes such kafka , zookeeper, quoting:
[the] jvm won't full gc cycle until has run out of allowed heap, of heap occupied not-yet-collected garbage. since these pages aren't being touched (because garbage , unreferenced), os happily swaps them out. when gc runs, have ridiculous swap storm, pulling in these pages discover in fact filled garbage , should discarded; can make gc cycle take many minutes!
hence recommendation disable swapping setting vm.swappiness
0
, though operating systems rhel 6.5 should 1
(because semantics of value 0
changed on these os's). note swapping may still occur.
the following links may shed further light on question. explain why disable swapping hadoop , elasticsearch, respectively, , it's same reasons should disable swapping kafka , zookeeper:
- hadoop: two memory-related issues on apache hadoop cluster (memory swapping , oom killer) adam kawa; @ time of writing working in hadoop infrastructure team @ spotify.
- elasticsearch: why disable swapping machines running elasticsearch.
Comments
Post a Comment