You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Something Something <ma...@gmail.com> on 2012/05/30 07:36:53 UTC

Java heap size for Zookeeper?

The Administrator's guide (
http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_zkMulitServerSetup)
says this:  Set the Java heap size..... Be conservative - use a maximum
heap size of 3GB for a 4GB machine.

So if on the production box the output from cat /proc/meminfo is as given
below, what would be recommended java heap size?

MemTotal:     61657476 kB
MemFree:      25867796 kB
Buffers:        239928 kB
Cached:       33076988 kB
SwapCached:          0 kB
Active:       15040672 kB
Inactive:     19581768 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     61657476 kB
LowFree:      25867796 kB
SwapTotal:    10125304 kB
SwapFree:     10124980 kB
Dirty:             424 kB
Writeback:           0 kB
AnonPages:     1305620 kB
Mapped:          33688 kB
Slab:          1104288 kB
PageTables:      10092 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  40954040 kB
Committed_AS:  2629492 kB
VmallocTotal: 34359738367 kB
VmallocUsed:      5272 kB
VmallocChunk: 34359733031 kB
HugePages_Total:     0
HugePages_Free:      0
HugePages_Rsvd:      0
Hugepagesize:     2048 kB

Re: Java heap size for Zookeeper?

Posted by Patrick Hunt <ph...@apache.org>.
It's more dependent on your workload than anything. If you're storing
on order of hundreds of small znodes then 1gb is going to more then
fine.

Patrick

On Tue, May 29, 2012 at 10:36 PM, Something Something
<ma...@gmail.com> wrote:
> The Administrator's guide (
> http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html#sc_zkMulitServerSetup)
> says this:  Set the Java heap size..... Be conservative - use a maximum
> heap size of 3GB for a 4GB machine.
>
> So if on the production box the output from cat /proc/meminfo is as given
> below, what would be recommended java heap size?
>
> MemTotal:     61657476 kB
> MemFree:      25867796 kB
> Buffers:        239928 kB
> Cached:       33076988 kB
> SwapCached:          0 kB
> Active:       15040672 kB
> Inactive:     19581768 kB
> HighTotal:           0 kB
> HighFree:            0 kB
> LowTotal:     61657476 kB
> LowFree:      25867796 kB
> SwapTotal:    10125304 kB
> SwapFree:     10124980 kB
> Dirty:             424 kB
> Writeback:           0 kB
> AnonPages:     1305620 kB
> Mapped:          33688 kB
> Slab:          1104288 kB
> PageTables:      10092 kB
> NFS_Unstable:        0 kB
> Bounce:              0 kB
> CommitLimit:  40954040 kB
> Committed_AS:  2629492 kB
> VmallocTotal: 34359738367 kB
> VmallocUsed:      5272 kB
> VmallocChunk: 34359733031 kB
> HugePages_Total:     0
> HugePages_Free:      0
> HugePages_Rsvd:      0
> Hugepagesize:     2048 kB