Garbage collection: algorithms for automatic dynamic memory management
Garbage collection: algorithms for automatic dynamic memory management
On programming of arithmetic operations
Communications of the ACM
Java Virtual Machine Specification
Java Virtual Machine Specification
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
The DaCapo benchmarks: java benchmarking development and analysis
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Cork: dynamic memory leak detection for garbage-collected languages
Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
JavaTM just-in-time compiler and virtual machine improvements for server and middleware applications
VM'04 Proceedings of the 3rd conference on Virtual Machine Research And Technology Symposium - Volume 3
The causes of bloat, the limits of health
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Declarative object identity using relation types
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
Placement optimization using data context collected during garbage collection
Proceedings of the 2009 international symposium on Memory management
A study of Java's non-Java memory
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Smaller footprint for Java collections
Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion
An empirical comparison of Java remote communication primitives for intra-node data transmission
ACM SIGMETRICS Performance Evaluation Review
Smaller footprint for java collections
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
String deduplication for Java-based middleware in virtualized environments
Proceedings of the 10th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments
Hi-index | 0.01 |
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.