Hey all,

I'm attempting to run Cassandra 2.1.2 on a smallish 2.GB ram instance over
at Digital Ocean. It's a CentOS 7 host.

But I'm having some difficulty there. Cassandra will start with no problems
and run for a while. But then choke on the lack of memory and crash. This
is what the system looks like after a reboot:

[root@web2:~] #free -m
             total       used       free     shared    buffers     cached
Mem:          2002        568       1433          8         20        207
-/+ buffers/cache:        340       1661
Swap:            0          0          0


After I start cassandra and leave it running for a few minutes, this is
what the memory situation looks like:

[root@web2:~] #free -m
             total       used       free     shared    buffers     cached
Mem:          2002       1669        332          8         21        359
-/+ buffers/cache:       1288        713
Swap:            0          0          0

I've been able to find this article on how to tune memory for Cassandra on
the datastax site:

http://www.datastax.com/documentation/cassandra/2.0/cassandra/operations/ops_tune_jvm_c.html

So I tried setting up the MAX_HEAP_SIZE and HEAP_NEW_SIZE like this in
cassandra-env.sh:

MAX_HEAP_SIZE="800M"
HEAP_NEWSIZE="200M"


And I gave the latter 200MB based on the fact that this VM has 2 cores:

[root@web2:/etc/alternatives/cassandrahome] #grep name /proc/cpuinfo
model name      : QEMU Virtual CPU version 1.0
model name      : QEMU Virtual CPU version 1.0

So, 100MB per core basically.

And I've found that this will run for a while.. like maybe 5 or 6 hours!!
So it does stay up a while. But then it finally will crash due to the lack
of memory.

Are there any tricks I can try or things I can do to get Cassandra to stay
runing happily in this amount of space? I'm just using test data and this
is an exercise to learn more about cassandra. I realize a 'real' data set
will require more resources in terms of memory.

Thanks!
Tim
-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Reply via email to