Abstract
A Java application sometimes raises an out-of-memory ex-ception. This is usually because it has exhausted the Java heap. However, a Java application can raise an out-of-memory exception when it exhausts the memory used by Java that is not in the Java heap. We call this area non-Java memory. For example, an out-of-memory exception in the non-Java memory can happen when the JVM attempts to load too many classes. Although it is relatively rare to ex-haust the non-Java memory compared to exhausting the Java heap, a Java application can consume a considerable amount of non-Java memory.
This paper presents a quantitative analysis of non-Java memory. To the best of our knowledge, this is the first in-depth analysis of the non-Java memory. To do this we cre-ated a tool called Memory Analyzer for Redundant, Unused, and String Areas (MARUSA), which gathers memory statis-tics from both the OS and the Java virtual machine, break-ing down and visualizing the non-Java memory usage.
We studied the use of non-Java memory for a wide range of Java applications, including the DaCapo benchmarks and Apache DayTrader. Our study is based on the IBM J9 Java Virtual Machine for Linux. Although some of our results may be specific to this combination, we believe that most of our observations are applicable to other platforms as well.
- }}The Apache Software Foundation. Apache JMeter. http://jakarta.apache.org/jmeter/Google Scholar
- }}The Apache Software Foundation. Apache DayTrader Benchmark Sample. http://cwiki.apache.org/GMOxDOC20/daytrader.html.Google Scholar
- }}Chris Bailey. Java technology, IBM style: Introduction to the IBM Developer Kit, 2006. http://www.ibm.com/developerworks/java/library/j-ibmjava1.html.Google Scholar
- }}Helen Beeken, Daniel Julin, Julie Stalley and Martin Trotter. Java diagnostics, IBM style, Part 1: Introducing the IBM Di-agnostic and Monitoring Tools for Java - Dump Analyzer. http://www.ibm.com/developerworks/java/library/j-ibmtools1/index.htmlGoogle Scholar
- }}John Berthels. Exmap memory analysis tool. http://www.berthels.co.uk/exmap/Google Scholar
- }}Stephen M. Blackburna, et al. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In Proceed-ings of the 21st ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '06), pp. 169--190, 2006. Google Scholar
Digital Library
- }}Sumit Chawla. Getting more memory in AIX for your Java applications, 2003. http://www.ibm.com/developerworks/ eserver/articles/aix4java1.htmlGoogle Scholar
- }}Yi Feng and Emery D. Berger. A Locality-Improving Dynamic Memory Allocator. In Proceedings of the 2005 work-shop on Memory system performance (MSP '05), pp. 68--77, 2005. Google Scholar
Digital Library
- }}Sanjay Ghemawat. TCMalloc : Thread-Caching Malloc. 2007. http://google-perftools.googlecode.com/svn/trunk/doc/tcmalloc.htmlGoogle Scholar
- }}Nikola Grcevski, Allan Kielstra, Kevin Stoodley, Mark Stoodley, and Vijay Sundaresan. Java Just-In-Time Compiler and Virtual Machine Improvements for Server and Middle-ware Applications. In Proceedings of the 3rd USENIX Vir-tual Machine Research and Technology Symposium (VM '04), pp. 151--162, 2004. Google Scholar
Digital Library
- }}Filip Hanik. Inside the Java Virtual Machine, 2007 http://www.springsource.com/files/Inside_the_JVM.pdfGoogle Scholar
- }}Matthew Hertz, Yi Feng, and Emery D. Berger. Garbage Collection Without Paging. In Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation (PLDI '05), pp. 143--153, 2005. Google Scholar
Digital Library
- }}IBM Corporation. AIX 6.1 information, Multiple page size support. http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/multiple_page_size_support.htmGoogle Scholar
- }}IBM Corporation. IBM Support Assistant. http://www.ibm.com/software/support/isa/Google Scholar
- }}IBM Corporation. WebSphere Application Server. http://www.ibm.com/software/webservers/appserv/was/.Google Scholar
- }}Intel Corporation. Intel 64 and IA-32 Architectures Software Developer's Manual. Volume 1: Basic Architecture. Order Number: 253665-033US. 2009.Google Scholar
- }}The Jikes RVM Project. Jikes RVM. http://jikesrvm.org/Google Scholar
- }}Maria Jump and Kathryn S. McKinley. Cork: Dynamic Memory Leak Detection for Garbage-Collected Languages. In Proceedings of the 34th ACM Symposium on Principles of Programming Languages (POPL '07), pp. 31--38, 2007. Google Scholar
Digital Library
- }}Kiyokuni Kawachiya, Kazunori Ogata, and Tamiya Onodera. Analysis and Reduction of Memory Inefficiencies in Java Strings. In Proceedings of the 23rd ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '08), pp. 385--401, 2008. Google Scholar
Digital Library
- }}Sheng Liang and Deepa Viswanathan. Comprehensive Profiling Support in the Java Virtual Machine. In Proceedings of the 5th USENIX Conference on Object-Oriented Technologies and Systems (COOTS '99), pp. 229--242, 1999. Google Scholar
Digital Library
- }}Nick Mitchell and Gary Sevitsky. LeakBot: An Automated and Lightweight Tool for Diagnosing Memory Leaks in Large Java Applications. In Proceedings of the 17th European Conference on Object-Oriented Programming (ECOOP '03), pp. 351--377, 2003.Google Scholar
- }}Nick Mitchell and Gary Sevitsky. The Causes of Bloat, The Limits of Health. In Proceedings of the 22nd ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '07), pp. 245--260, 2007. Google Scholar
Digital Library
- }}Oracle. JRockit. http://www.oracle.com/appserver/jrockit/index.htmlGoogle Scholar
- }}Indrajit Poddar and Robbie John Minshall. Memory leak detection and analysis in WebSphere Application Server: Part 1: Overview of memory leaks. http://www.ibm.com/developerworks/websphere/library/techarticles/0606_poddar/0606_poddar.htmlGoogle Scholar
- }}Power.org. http://www.power.org/Google Scholar
- }}Sun Microsystems. HPROF: A Heap/CPU Profiling Tool in J2SE 5.0. http://java.sun.com/developer/technicalArticles/Programming/HPROF.htmlGoogle Scholar
- }}Sun Microsystems. The Java HotSpot Virtual Machine, v1.4.1. http://java.sun.com/products/hotspot/docs/whitepaper/Java_Hotspot_v1.4.1/Java_HSpot_WP_v1.4.1_1002_1.htmlGoogle Scholar
- }}Sun Microsystems. Java API reference, java.nio.ByteBuffer. http://java.sun.com/j2se/1.4.2/docs/api/java/nio/ByteBuffer.htmlGoogle Scholar
- }}Sun Microsystems. Java SE HotSpot at a Glance. http://java.sun.com/javase/technologies/hotspot/Google Scholar
- }}Sun Microsystems. jhat - Java Heap Analysis Tool. http://java.sun.com/javase/6/docs/technotes/tools/share/jhat.htmlGoogle Scholar
- }}Sun Microsystems. JVM Tool Interface (JVM TI). http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/Google Scholar
- }}Madhusudhan Talluri and Mark D. Hill. Surpassing the TLB Performance of Superpages with Less Operating System Support. In Proceedings of the sixth international conference on Architectural support for programming languages and operating systems (ASPLOS-VI), pp. 171--182, 1994. Google Scholar
Digital Library
- }}Peter W. Wong and Bill Buros. A Performance Evaluation of 64KB Pages on Linux for Power Systems. http://www.ibm.com/developerworks/wikis/display/hpccentral/A+Performance+Evaluation+of+64KB+Pages+on+Linux+for+Power+SystemsGoogle Scholar
Index Terms
A study of Java's non-Java memory
Recommendations
A study of Java's non-Java memory
OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsA Java application sometimes raises an out-of-memory ex-ception. This is usually because it has exhausted the Java heap. However, a Java application can raise an out-of-memory exception when it exhausts the memory used by Java that is not in the Java ...
Evaluating the Java Native Interface JNI: Leveraging Existing Native Code, Libraries and Threads to a Running Java Virtual Machine
This article aims to explore JNI features and to discover fundamental operations of the Java programming language, such as arrays, objects, classes, threads and exception handling, and to illustrate these by using various algorithms and code samples. ...
Evaluating the Java Native Interface JNI: Data Types and Strings
This article describes how the java native interface JNI is a powerful feature of the java platform that started to draw attention in the latter years as an efficient programming framework for building and delivering innovative technological ...







Comments