zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lei Zhang <lzvoya...@gmail.com>
Subject java heap size
Date Tue, 16 Mar 2010 00:05:18 GMT
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


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message