ACM Home Page
Please provide us with feedback. Feedback
Analysis and reduction of memory inefficiencies in Java strings
Full text PdfPdf (337 KB)
Source
Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications table of contents
Nashville, TN, USA
SESSION: Performance table of contents
Pages 385-402  
Year of Publication: 2008
ISBN:978-1-60558-215-3
Also published in ...
Authors
Kiyokuni Kawachiya  IBM Tokyo Research Laboratory, Yamato, Kanagawa, Japan
Kazunori Ogata  IBM Tokyo Research Laboratory, Yamato, Kanagawa, Japan
Tamiya Onodera  IBM Tokyo Research Laboratory, Yamato, Kanagawa, Japan
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 16,   Downloads (12 Months): 177,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1449764.1449795
What is a DOI?

ABSTRACT

This paper describes a novel approach to reduce the memory consumption of Java programs, by focusing on their "string memory inefficiencies". In recent Java applications, string data occupies a large amount of the heap area. For example, about 40% of the live heap area is used for string data when a production J2EE application server is running. By investigating the string data in the live heap, we identified two types of memory inefficiencies -- "duplication" and "unused literals". In the heap, there are many string objects that have the same values. There also exist many string literals whose values are not actually used by the application. Since these inefficiencies exist as live objects, they cannot be eliminated by existing garbage collection techniques, which only remove dead objects. Quantitative analysis of Java heaps in real applications revealed that more than 50% of the string data in the live heap is wasted by these inefficiencies. To reduce the string memory inefficiencies, this paper proposes two techniques at the Java virtual machine level, "StringGC" for eliminating duplicated strings at the time of garbage collection, and "Lazy Body Creation" for delaying part of the literal instantiation until the literal's value is actually used. We also present an interesting technique at the Java program level, which we call "BundleConverter", for preventing unused message literals from being instantiated. Prototype implementations on a production Java virtual machine have achieved about 18% reduction of the live heap in the production application server. The proposed techniques could also reduce the live heap of standard Java benchmarks by 11.6% on average, without noticeable performance degradation.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
The Apache Software Foundation. Apache Harmony. http://harmony.apache.org/
 
2
The Apache Software Foundation. Apache Tomcat. http://tomcat.apache.org/
 
3
The Apache Software Foundation. Apache Tuscany. http://tuscany.apache.org/
 
4
A. W. Appel and M. J. R. Goncalves. Hash-consing garbage collection. Technical Report CS-TR-412-93, Department of Computer Science, Princeton University, 1993.
 
5
C. Bailey. Java Technology, IBM Style: Introduction to the IBM Developer Kit: An overview of the new functions and features in the IBM implementation of Java 5.0, 2006. http://www.ibm.com/developerworks/java/library/j-ibmjava1.html
6
 
7
P. Chan, R. Lee, and D. Kramer. The Java Class Libraries, Second Edition, Addison Wesley, 1998.
 
8
9
 
10
 
11
E. Goto. Monocopy and Associative Algorithms in an Extended Lisp. Technical Report 74-03, Information Science Laboratory, University of Tokyo, 1974.
 
12
 
13
IBM Corporation. IBM Trade Performance Benchmark. https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=trade6
 
14
IBM Corporation. WebSphere Application Server. http://www.ibm.com/software/webservers/appserv/was/
 
15
 
16
S. P. Jones. Haskell 98 Language and Libraries: The Revised Report, Cambridge University Press, 2003.
17
 
18
K. Kawachiya, K. Ogata, and T. Onodera. A Quantitative Analysis of Space Waste from Java Strings and its Elimination at Garbage Collection Time. Research Report RT0750, IBM Tokyo Research Laboratory, 2007.
 
19
20
 
21
N. Mitchell and G. 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.
22
 
23
Open SOA. Service Component Architecture Home. http://osoa.org/display/Main/Service+Component+Architecture+Home
 
24
Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks. http://www.spec.org/osg/jvm98/
 
25
Sun Microsystems. Java2 Platform Standard Edition 5.0 API Specification: java.lang.String. http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html
 
26
The Unicode Consortium. The Unicode Standard, Version 5.0, Addison Wesley, 2006.
 
27
M. Vaziri, F. Tip, S. Fink, and J. Dolby. Declarative Object Identity Using Relation Types. In Proceedings of the 21st European Conference on Object-Oriented Programming (ECOOP '07), pp. 54--78, 2007.


Collaborative Colleagues:
Kiyokuni Kawachiya: colleagues
Kazunori Ogata: colleagues
Tamiya Onodera: colleagues