I am trying to insert records in cassandra using cassandra-stress tool.
cassandra-stress -d xx.xx.xx.xx -t 500 -c 1 -S 10240000
But I keep running into the following error:
Exception in thread "Thread-159" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuilder.append(Unknown Source)
at org.apache.cassandra.stress.util.Operation.multiplyString(Operation.java:211)
at org.apache.cassandra.stress.util.Operation.generateValues(Operation.java:92)
at org.apache.cassandra.stress.operations.Inserter.run(Inserter.java:45)
at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:275)
I tried increasing the heap by changing java invocation in /usr/bin/cassandra-stress :
$JAVA -server -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms8033M -Xmx8033M -Xmn400M -cp $CLASSPATH org.apache.cassandra.stress.Stress $@
Please note, cassandra itself is not showing any errors.
I have a quad-core machine with 32 GB running running Ubuntu 12.04.3 LTS(GNU/Linux 3.2.0-55-generic x86_64).