Set JVM stack size to 160k for Java 7

patch by slebresne; reviewed by jbellis for CASSANDRA-4275
This commit is contained in:
Sylvain Lebresne 2012-06-12 15:04:26 +02:00
parent 2d0b14e915
commit 26a087c901
2 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,7 @@
which is misleading (CASSANDRA-4319)
* (cql3) Reject (not yet supported) creation of 2ndardy indexes on tables with
composite primary keys (CASSANDRA-4328)
* Set JVM stack size to 160k for java 7 (CASSANDRA-4275)
Merged from 1.0:
* Set gc_grace on index CF to 0 (CASSANDRA-4314)

View File

@ -145,13 +145,21 @@ if [ "x$CASSANDRA_HEAPDUMP_DIR" != "x" ]; then
JVM_OPTS="$JVM_OPTS -XX:HeapDumpPath=$CASSANDRA_HEAPDUMP_DIR/cassandra-`date +%s`-pid$$.hprof"
fi
if [ "`uname`" = "Linux" ] ; then
java_version=`"${JAVA:-java}" -version 2>&1 | awk '/version/ {print $3}' | egrep -o '[0-9]+\.[0-9]+'`
# reduce the per-thread stack size to minimize the impact of Thrift
# thread-per-client. (Best practice is for client connections to
# be pooled anyway.) Only do so on Linux where it is known to be
# supported.
JVM_OPTS="$JVM_OPTS -Xss128k"
if [ "$java_version" = "1.7" ]
then
JVM_OPTS="$JVM_OPTS -Xss160k"
else
JVM_OPTS="$JVM_OPTS -Xss128k"
fi
fi
echo "xss = $JVM_OPTS"
# GC tuning options
JVM_OPTS="$JVM_OPTS -XX:+UseParNewGC"