skip to main content
10.1145/1029873.1029881acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
Article

Automatic heap sizing: taking real memory into account

Published: 24 October 2004 Publication History

Abstract

Heap size has a huge impact on the performance of garbage collected applications. A heap that barely meets the application's needs causes excessive GC overhead, while a heap that exceeds physical memory induces paging. Choosing the best heap size <i>a priori</i> is impossible in multiprogrammed environments, where physical memory allocations to processes change constantly. We present an automatic heap-sizing algorithm applicable to different garbage collectors with only modest changes. It relies on an analytical model and on detailed information from the virtual memory manager. The model characterizes the relation between collection algorithm, heap size, and footprint. The virtual memory manager tracks recent reference behavior, reporting the current footprint and allocation to the collector. The collector uses those values as inputs to its model to compute a heap size that maximizes throughput while minimizing paging. We show that our adaptive heap sizing algorithm can substantially reduce running time over fixed-sized heaps.

References

[1]
R. Alonso and A. W. Appel. An advisor for flexible working sets. In Proceedings of the 1990 SIGMETRICS Conference on Measurement and Modeling of Computer Systems, pages 153--162, Boulder, CO, May 1990.
[2]
B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. F. Mergen, T. Ngo, Sarkar, M. J. Serrano, J. C. Shepherd, S. E. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalepeño virtual machine. IBM Systems Journal, 39(1):211--238, Feb. 2000.
[3]
B. Alpern, C. R. Attanasio, J. J. Barton, A. Cocchi, S. F. Hummel, D. Lieber, T. Ngo, M. Mergen, J. C. Shepherd, and S. Smith. Implementing Jalepeño in Java. In Proceedings of SIGPLAN 1999 Conference on Object-Oriented Programming, Languages, & Applications, volume 34(10) of ACM SIGPLAN Notices, pages 314--324, Denver, CO, Oct. 1999. ACM Press.
[4]
A. Appel. Simple generational garbage collection and fast allocation. Software: Practice and Experience, 19(2):171--183, Feb. 1989.
[5]
O. Babaoglu and D. Ferrari. Two-level replacement decisions in paging stores. IEEE Transactions on Computers, C-32(12):1151--1159, Dec. 1983.
[6]
J. A. Barnett. Garbage collection versus swapping. Operating Systems Review, 13(3):12--17, 1979.
[7]
BEA WebLogic. Technical white paper---JRockit: Java for the enterprise. http://www.bea.com/content/news_events/white_papers/BEA_JRockit_wp.pdf.
[8]
S. M. Blackburn, P. Cheng, and K. S. McKinley. Oil and Water? High Performance Garbage Collection in Java with MMTk. In ICSE 2004, 26th International Conference on Software Engineering, pages 137--146, May 2004.
[9]
H.-J. Boehm and M. Weiser. Garbage collection in an uncooperative environment. Software: Practice and Experience, 18(9):807--820, Sept. 1988.
[10]
T. Brecht, E. Arjomandi, C. i, and H. Pham. Controlling garbage collection and heap growth to reduce the execution time of Java applications. In Proceedings of the 2001 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages & Applications, pages 353--366, Tampa, FL, June 2001.
[11]
E. Cooper, S. Nettles, and I. Subramanian. Improving the performance of SML garbage collection using application-specific virtual memory management. In Conference Record of the 1992 ACM Symposium on Lisp and Functional Programming, pages 43--52, San Francisco, CA, June 1992.
[12]
M. Hertz, Y. Feng, and E. D. Berger. Page-level cooperative garbage collection. Technical Report TR-04-16, University of Massachusetts, 2004.
[13]
X. Huang, J. E. B. Moss, K. S. Mckinley, S. Blackburn, and D. Burger. Dynamic SimpleScala: Simulating Java Virtual Machines. Technical Report TR-03-03, University of Texas at Austin, Feb. 2003.
[14]
JavaSoft. J2SE 1.5.0 Documentation---Garbage Collector Ergonomics. Available at http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html.
[15]
S. F. Kaplan, Y. Smaragdakis, and P. R. Wilson. Trace reduction for virtual memory simulations. In Proceedings of the ACM SIGMETRICS 1999 International Conference on Measurement and Modeling of Computer Systems, pages 47--58,1999.
[16]
S. F. Kaplan, Y. Smaragdakis, and P. R. Wilson. Flexible reference trace reduction for VM simulations. ACM Transactions on Modeling and Computer Simulation (TOMACS), 13(1):1--38, Jan. 2003.
[17]
K.-S. Kim and Y. Hsu. Memory system behavior of Java programs: Methodology and analysis. In Proceedings of the ACM SIGMETRICS 2002 International Conference on Measurement and Modeling of Computer Systems, volume 28(1), pages 264--274, Santa Clara, CA, June 2000.
[18]
D. A. Moon. Garbage collection in a large LISP system. In Conference Record of the 1984 ACM Symposium on Lisp and Functional Programming, pages 235--245, 1984.
[19]
Novell. Documentation: NetWare 6---Optimizing Garbage Collection. Available at http://www.novell.com/documentation/index.html.
[20]
Y. Smaragdakis, S. F. Kaplan, and P. R. Wilson. The EELRU adaptive replacement algorithm. Performance Evaluation, 53(2):93--123, July 2003.
[21]
P. R. Wilson, S. F. Kaplan, and Y. Smaragdakis. The case for compressed caching in virtual memory systems. In Proceedings of The 1999 USENIX Annual Technical Conference, pages 101--116, Monterey, California, June 1999. USENIX Association.
[22]
T. Yang, E. D. Berger, M. Hertz, S. F. Kaplan, and J. E. B. Moss. Autonomic heap sizing: Taking real memory into account. Technical Report TR-04-14, University of Massachusetts, July 2004.

Cited By

View all
  • (2023)Heap Size Adjustment with CPU ControlProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622988(114-128)Online publication date: 19-Oct-2023
  • (2023)A novel approach to solve exact matching problem using multi-splitting of text patternsInternational Journal of System Assurance Engineering and Management10.1007/s13198-023-01948-714:4(1457-1466)Online publication date: 1-Jun-2023
  • (2022)Optimal heap limits for reducing browser memory useProceedings of the ACM on Programming Languages10.1145/35633236:OOPSLA2(986-1006)Online publication date: 31-Oct-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISMM '04: Proceedings of the 4th international symposium on Memory management
October 2004
182 pages
ISBN:1581139454
DOI:10.1145/1029873
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 October 2004

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. garbage collection
  2. paging
  3. virtual memory

Qualifiers

  • Article

Conference

ISMM04
Sponsor:

Acceptance Rates

Overall Acceptance Rate 72 of 156 submissions, 46%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Heap Size Adjustment with CPU ControlProceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3617651.3622988(114-128)Online publication date: 19-Oct-2023
  • (2023)A novel approach to solve exact matching problem using multi-splitting of text patternsInternational Journal of System Assurance Engineering and Management10.1007/s13198-023-01948-714:4(1457-1466)Online publication date: 1-Jun-2023
  • (2022)Optimal heap limits for reducing browser memory useProceedings of the ACM on Programming Languages10.1145/35633236:OOPSLA2(986-1006)Online publication date: 31-Oct-2022
  • (2019)Performance of Memory Virtualization Using Global Memory Resource BalancingInternational Journal of Cloud Applications and Computing10.4018/IJCAC.20190101029:1(16-32)Online publication date: 1-Jan-2019
  • (2018)The benefits and costs of writing a POSIX kernel in a high-level languageProceedings of the 13th USENIX conference on Operating Systems Design and Implementation10.5555/3291168.3291176(89-105)Online publication date: 8-Oct-2018
  • (2018)A new split based searching for exact pattern matching for natural textsPLOS ONE10.1371/journal.pone.020091213:7(e0200912)Online publication date: 26-Jul-2018
  • (2018)Dynamic vertical memory scalability for OpenJDK cloud applicationsACM SIGPLAN Notices10.1145/3299706.321056753:5(59-70)Online publication date: 18-Jun-2018
  • (2018)Dynamic vertical memory scalability for OpenJDK cloud applicationsProceedings of the 2018 ACM SIGPLAN International Symposium on Memory Management10.1145/3210563.3210567(59-70)Online publication date: 18-Jun-2018
  • (2016)Efficient Management for Hybrid Memory in Managed Language RuntimeNetwork and Parallel Computing10.1007/978-3-319-47099-3_3(29-42)Online publication date: 30-Sep-2016
  • (2015)Efficient MRC construction with SHARDSProceedings of the 13th USENIX Conference on File and Storage Technologies10.5555/2750482.2750490(95-110)Online publication date: 16-Feb-2015
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media