cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Dusbabek <>
Subject Re: cassandra out of heap space crash
Date Fri, 11 Jun 2010 16:09:39 GMT
On Fri, Jun 11, 2010 at 10:14, Julie <> wrote:
> Ran Tavory <rantav <at>> writes:
>> I can't say exactly how much memory is the correct amount, but surely 1G is
> very little. By replicating 3 times your cluster now makes 3 times more work
> than it used to do, both on reads and on writes while the readers/writers
> continue hammering it the same pace.
>> So once you've upped your memory (try 4g, if not enough 8g etc) if this still
> doesn't help, you want to look at either adding capacity or slowing down your
> writes.
>> Which consistency level are you writing with? You can try ALL, this will slow
> down your writes just as much needed by the cluster to catch its breath (or so I
> hope, I never actually tried that...)
> Thank you so much, Ran!  I am running on ec2-smalls and they have only 1.7GB
> of memory in total so 1GB of heap space is probably the highest I can go until
> we move to larger VMs.  But you bring up an EXCELLENT point -- changing the
> consistency level.  Because we are trying to populate the database as quickly
> as possible for our prototyping work, we use consistency of ZERO(!) I am going
> to try changing it to ALL as you suggest and also possibly throttle the writes.

Writing at CL.ZERO is an excellent way to run out of memory since the
operations have to be buffered until there are cycles to execute them.
 ONE would give you decent throughput without so much risk of OOM.

> Does this seem like a Cassandra bug or is it well known that Cassandra always
> needs more than 1GB of heap space?

Not a bug at all.  You were putting a lot of memory pressure on
Cassandra by writing at CL.ZERO.


View raw message