cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6126) Set MALLOC_ARENA_MAX in cassandra-env.sh for new glibc per-thread allocator
Date Thu, 07 Aug 2014 19:16:15 GMT

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

Jonathan Ellis commented on CASSANDRA-6126:
-------------------------------------------

/cc [~brandon.williams]

> 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)

Mime
View raw message