[jira] [Comment Edited] (CASSANDRA-6126) Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator

2014-08-05 Thread graham sanderson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14087238#comment-14087238
 ] 

graham sanderson edited comment on CASSANDRA-6126 at 8/6/14 4:43 AM:
-

I don't seem to be able to re-open this, but we just noticed when checking 
cassandra-env.sh diffs during upgrade (we already have MALLOC_ARENA_MAX=4 as 
our own change)

In the patch in the 2.0 codebase for this issue {{MALLOC_ARENA_MAX}} is not 
{{EXPORTed}}


was (Author: graham sanderson):
I don't seem to be able to re-open this, but we just noticed when checking 
cassandra-env.sh diffs during upgrade (we already have MALLOC_ARENA_MAX=4 as 
our own change)

In the patch in the 2.0 codebase for this issue {{MALLOC_ARENA_MAX}} is not 
{{EXPORT}}ed

 Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator
 ---

 Key: CASSANDRA-6126
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6126
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
 Environment: glibc = 2.10
Reporter: J. Ryan Earl
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.2


 Cassandra does not take into account particular GLIBC environment variables 
 and the nature of the JVM.  Cassandra should set the MALLOC_ARENA_MAX 
 variable, ideally in cassandra-env.sh, to have something like the following:
 {noformat}
 export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}
 {noformat}
 This will limit the number of per-thread memory allocation arenas (ie 
 separate memory ranges dedicated to each thread for memory allocation) for 
 the new per-thread GLIBC malloc found in distribution like Enterprise Linux 6 
 and newer.  The net effect is a performance gain, specifically through 
 reduced page-table size and kernel overhead of memory management.  Without 
 the setting, Cassandra will occupy more than double the amount of virtual 
 memory space, and due to increased pagetable size, the resident amount of 
 memory will also be somewhat larger (~10% or so).  For more discussion, see 
 HADOOP-7154.  Bottom line, cassandra-env.sh need to be setting 
 MALLOC_ARENA_MAX to better use system resources.
 In general it can be stated all JVMs should use this environment setting as 
 JVMs tend to be highly threaded and manage their own heap.  Cassandra and 
 Hadoop in particular seem to benefit from my testing.
 More background: 
 http://siddhesh.in/journal/2012/10/24/malloc-per-thread-arenas-in-glibc/



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (CASSANDRA-6126) Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator

2014-08-05 Thread graham sanderson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14087238#comment-14087238
 ] 

graham sanderson edited comment on CASSANDRA-6126 at 8/6/14 4:43 AM:
-

I don't seem to be able to re-open this, but we just noticed when checking 
cassandra-env.sh diffs during upgrade (we already have {{EXPORT 
MALLOC_ARENA_MAX=4}} as our own change)

In the patch in the 2.0 codebase for this issue {{MALLOC_ARENA_MAX}} is not 
{{EXPORTed}}


was (Author: graham sanderson):
I don't seem to be able to re-open this, but we just noticed when checking 
cassandra-env.sh diffs during upgrade (we already have MALLOC_ARENA_MAX=4 as 
our own change)

In the patch in the 2.0 codebase for this issue {{MALLOC_ARENA_MAX}} is not 
{{EXPORTed}}

 Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator
 ---

 Key: CASSANDRA-6126
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6126
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
 Environment: glibc = 2.10
Reporter: J. Ryan Earl
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.2


 Cassandra does not take into account particular GLIBC environment variables 
 and the nature of the JVM.  Cassandra should set the MALLOC_ARENA_MAX 
 variable, ideally in cassandra-env.sh, to have something like the following:
 {noformat}
 export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}
 {noformat}
 This will limit the number of per-thread memory allocation arenas (ie 
 separate memory ranges dedicated to each thread for memory allocation) for 
 the new per-thread GLIBC malloc found in distribution like Enterprise Linux 6 
 and newer.  The net effect is a performance gain, specifically through 
 reduced page-table size and kernel overhead of memory management.  Without 
 the setting, Cassandra will occupy more than double the amount of virtual 
 memory space, and due to increased pagetable size, the resident amount of 
 memory will also be somewhat larger (~10% or so).  For more discussion, see 
 HADOOP-7154.  Bottom line, cassandra-env.sh need to be setting 
 MALLOC_ARENA_MAX to better use system resources.
 In general it can be stated all JVMs should use this environment setting as 
 JVMs tend to be highly threaded and manage their own heap.  Cassandra and 
 Hadoop in particular seem to benefit from my testing.
 More background: 
 http://siddhesh.in/journal/2012/10/24/malloc-per-thread-arenas-in-glibc/



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (CASSANDRA-6126) Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator

2014-08-05 Thread graham sanderson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14087238#comment-14087238
 ] 

graham sanderson edited comment on CASSANDRA-6126 at 8/6/14 4:44 AM:
-

I don't seem to be able to re-open this, but we just noticed when checking 
cassandra-env.sh diffs during upgrade (we already have {{export 
MALLOC_ARENA_MAX=4}} as our own change)

In the patch in the 2.0 codebase for this issue {{MALLOC_ARENA_MAX}} is not 
exported


was (Author: graham sanderson):
I don't seem to be able to re-open this, but we just noticed when checking 
cassandra-env.sh diffs during upgrade (we already have {{EXPORT 
MALLOC_ARENA_MAX=4}} as our own change)

In the patch in the 2.0 codebase for this issue {{MALLOC_ARENA_MAX}} is not 
{{EXPORTed}}

 Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator
 ---

 Key: CASSANDRA-6126
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6126
 Project: Cassandra
  Issue Type: Improvement
  Components: Packaging
 Environment: glibc = 2.10
Reporter: J. Ryan Earl
Assignee: Brandon Williams
Priority: Minor
 Fix For: 2.0.2


 Cassandra does not take into account particular GLIBC environment variables 
 and the nature of the JVM.  Cassandra should set the MALLOC_ARENA_MAX 
 variable, ideally in cassandra-env.sh, to have something like the following:
 {noformat}
 export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-4}
 {noformat}
 This will limit the number of per-thread memory allocation arenas (ie 
 separate memory ranges dedicated to each thread for memory allocation) for 
 the new per-thread GLIBC malloc found in distribution like Enterprise Linux 6 
 and newer.  The net effect is a performance gain, specifically through 
 reduced page-table size and kernel overhead of memory management.  Without 
 the setting, Cassandra will occupy more than double the amount of virtual 
 memory space, and due to increased pagetable size, the resident amount of 
 memory will also be somewhat larger (~10% or so).  For more discussion, see 
 HADOOP-7154.  Bottom line, cassandra-env.sh need to be setting 
 MALLOC_ARENA_MAX to better use system resources.
 In general it can be stated all JVMs should use this environment setting as 
 JVMs tend to be highly threaded and manage their own heap.  Cassandra and 
 Hadoop in particular seem to benefit from my testing.
 More background: 
 http://siddhesh.in/journal/2012/10/24/malloc-per-thread-arenas-in-glibc/



--
This message was sent by Atlassian JIRA
(v6.2#6252)