You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Nikolai Grigoriev (JIRA)" <ji...@apache.org> on 2013/09/11 15:26:52 UTC

[jira] [Created] (CASSANDRA-6006) Value of JVM_OPTS is partially lost when enabling JEMallocAllocator in cassandra-env.sh

Nikolai Grigoriev created CASSANDRA-6006:
--------------------------------------------

             Summary: Value of JVM_OPTS is partially lost when enabling JEMallocAllocator in cassandra-env.sh
                 Key: CASSANDRA-6006
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6006
             Project: Cassandra
          Issue Type: Bug
          Components: Config
         Environment: Linux, cassandra 2.0.0
            Reporter: Nikolai Grigoriev
            Priority: Minor


In conf/cassandra-env.sh I see this:

{code}
# Configure the following for JEMallocAllocator and if jemalloc is not available in the system
# library path (Example: /usr/local/lib/). Usually "make install" will do the right thing.
# export LD_LIBRARY_PATH=<JEMALLOC_HOME>/lib/
# JVM_OPTS="-Djava.library.path=<JEMALLOC_HOME>/lib/"
{code}


When I have enabled JEMalloc I have noticed that Cassandra complained about JAMM agent not being configured. Then I have realized that a bunch of JVM settings do not get passed to JVM, like heap size etc. This is because here the new argument replaces the previous value of JVM_OPTS instead of being added to it.

Here is the diff:
{code}
*** cassandra-env.sh.orig       2013-08-28 13:07:53.000000000 +0000
--- cassandra-env.sh    2013-09-11 13:25:12.904640141 +0000
***************
*** 227,233 ****
  # Configure the following for JEMallocAllocator and if jemalloc is not available in the system
  # library path (Example: /usr/local/lib/). Usually "make install" will do the right thing.
  # export LD_LIBRARY_PATH=<JEMALLOC_HOME>/lib/
! # JVM_OPTS="-Djava.library.path=<JEMALLOC_HOME>/lib/"

  # uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414
  # JVM_OPTS="$JVM_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1414"
--- 227,233 ----
  # Configure the following for JEMallocAllocator and if jemalloc is not available in the system
  # library path (Example: /usr/local/lib/). Usually "make install" will do the right thing.
  # export LD_LIBRARY_PATH=<JEMALLOC_HOME>/lib/
! # JVM_OPTS="$JVM_OPTS -Djava.library.path=<JEMALLOC_HOME>/lib/"

  # uncomment to have Cassandra JVM listen for remote debuggers/profilers on port 1414
  # JVM_OPTS="$JVM_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1414"
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira