Heap usage: Some clarification
Hi guys, Users frequently ask questions regarding memory tuning and heap usage; one of the more common being: "why does top report resident memory usage larger than -Xmx?". I'd like to get some clarification on the usage patterns in Cassandra so I write something up in the Wiki and generally answer questions better. I understand that the -Xm(s|x) flags only affect the JVM managed heap, and that memory is also allocated for the stack (per-thread), program code and native heap. Of these, I can only see the native heap being a major contributor to memory usage. Would I be right in saying that this is due to Cassandra's liberal use of NIO direct ByteBuffers? I couldn't find a whole lot of information on JVM memory usage, but what I did find[1] suggests that these are allocated outside of the native heap (with only a pointer object in the JVM heap). If that's correct, what specifically are direct ByteBuffers used for and when were they introduced? I seem to recall a lot of porting to ByteBuffers in 0.7, yet our production 0.6 cluster exhibits a high non-JVM heap usage that indicates otherwise. If I'm way off the mark, please could you guys point me in the right direction. [1]: http://www.ibm.com/developerworks/java/library/j-nativememory-linux/ Cheers, Nick Telford
Re: Heap usage: Some clarification
by default cassandra will use mmap data access on 64 bit environments. meaning, we don't _allocate_ anything off heap, but mmapped data counts towards resident memory as reported by top. the OS manages paging it in on demand. On Fri, Feb 4, 2011 at 5:06 AM, Nick Telford wrote: > Hi guys, > > Users frequently ask questions regarding memory tuning and heap usage; one > of the more common being: "why does top report resident memory usage larger > than -Xmx?". > > I'd like to get some clarification on the usage patterns in Cassandra so I > write something up in the Wiki and generally answer questions better. > > I understand that the -Xm(s|x) flags only affect the JVM managed heap, and > that memory is also allocated for the stack (per-thread), program code and > native heap. Of these, I can only see the native heap being a major > contributor to memory usage. Would I be right in saying that this is due to > Cassandra's liberal use of NIO direct ByteBuffers? I couldn't find a whole > lot of information on JVM memory usage, but what I did find[1] suggests that > these are allocated outside of the native heap (with only a pointer object > in the JVM heap). > > If that's correct, what specifically are direct ByteBuffers used for and > when were they introduced? I seem to recall a lot of porting to ByteBuffers > in 0.7, yet our production 0.6 cluster exhibits a high non-JVM heap usage > that indicates otherwise. > > If I'm way off the mark, please could you guys point me in the right > direction. > > > [1]: http://www.ibm.com/developerworks/java/library/j-nativememory-linux/ > > Cheers, > > Nick Telford > -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
Re: [VOTE] 0.7.1 (attempt #2)
On Mon, 2011-01-31 at 09:18 -0600, Jonathan Ellis wrote: > -1, CASSANDRA-1951 broke startup when propertyfilesnich is configured Alright, consider this one a bust; A new vote starts soon! > On Fri, Jan 28, 2011 at 2:32 PM, Eric Evans wrote: > > SVN: > > https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7@r1064845 > > 0.7.1 artifacts: http://people.apache.org/~eevans > > > > The vote will be open for 72 hours. > > > > > > [1]: https://issues.apache.org/jira/browse/CASSANDRA-2058 > > [2]: http://goo.gl/5Tafg (CHANGES.txt) > > [3]: http://goo.gl/PkreZ (NEWS.txt) -- Eric Evans eev...@rackspace.com
[VOTE] 0.7.1 (3 times the charm?)
Lather. Rinse. Repeat. Ya'll know the drill. SVN: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7@r1067260 0.7.1 artifacts: http://people.apache.org/~eevans The vote will be open for 72 hours. [1]: http://goo.gl/axEK0 (CHANGES.txt) [2]: http://goo.gl/66yGY (NEWS.txt) -- Eric Evans eev...@rackspace.com
Re: [VOTE] 0.7.1 (3 times the charm?)
On 4 February 2011 19:40, Eric Evans wrote: > > Lather. Rinse. Repeat. Ya'll know the drill. > > SVN: > https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7@r1067260 > 0.7.1 artifacts: http://people.apache.org/~eevans > > The vote will be open for 72 hours. > > > [1]: http://goo.gl/axEK0 (CHANGES.txt) > [2]: http://goo.gl/66yGY (NEWS.txt) > > -- > Eric Evans > eev...@rackspace.com > > Here are the artifacts staged for publishing to repository.apache.org (which will be synced to maven central) https://repository.apache.org/content/repositories/orgapachecassandra-036/ Description: apache cassandra 0.7.1 take 3 Details: The following artifacts have been staged to the org.apache.cassandra-036 (u:stephenc) repository. apache-cassandra-0.7.1-src.tar.gz apache-cassandra-0.7.1-bin.tar.gz.asc apache-cassandra-0.7.1.pom.asc apache-cassandra-0.7.1.pom apache-cassandra-0.7.1-bin.tar.gz apache-cassandra-0.7.1-src.tar.gz.asc cassandra-all-0.7.1.pom cassandra-all-0.7.1-sources.jar cassandra-all-0.7.1-sources.jar.asc cassandra-all-0.7.1.pom.asc cassandra-all-0.7.1.jar cassandra-all-0.7.1-javadoc.jar cassandra-all-0.7.1.jar.asc cassandra-all-0.7.1-javadoc.jar.asc https://repository.apache.org/content/repositories/orgapachecassandra-081/ Description: apache cassandra 0.7.1 Details: The following artifacts have been staged to the org.apache.cassandra-081 (u:stephenc) repository. cassandra-javautils-0.7.1.pom cassandra-javautils-0.7.1-sources.jar.asc cassandra-javautils-0.7.1.jar cassandra-javautils-0.7.1-sources.jar cassandra-javautils-0.7.1.jar.asc cassandra-javautils-0.7.1-javadoc.jar.asc cassandra-javautils-0.7.1.pom.asc cassandra-javautils-0.7.1-javadoc.jar -Stephen
Re: [VOTE] 0.7.1 (3 times the charm?)
Just wondering - how does the distributed test framework fit into votes? Does it get run each time a vote happens to check for bugs/regressions? On Feb 4, 2011, at 1:40 PM, Eric Evans wrote: > > Lather. Rinse. Repeat. Ya'll know the drill. > > SVN: > https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7@r1067260 > 0.7.1 artifacts: http://people.apache.org/~eevans > > The vote will be open for 72 hours. > > > [1]: http://goo.gl/axEK0 (CHANGES.txt) > [2]: http://goo.gl/66yGY (NEWS.txt) > > -- > Eric Evans > eev...@rackspace.com >