I am puzzled by the Zookeeper Admin Guide's advice on choosing Java heap

"Set the Java heap size. This is very important to avoid swapping, which
will seriously degrade ZooKeeper performance. To determine the correct
value, use load tests, and make sure you are well below the usage limit that
would cause you to swap. Be conservative - use a maximum heap size of 3GB
for a 4GB machine."

My understanding is size of heap directly affects how many objects you can
keep in memory, how soon you get "OutOfMemory" exception. Can somebody
explain how this affects swapping - which I believe is controlled by OS, not


Reply via email to