skip to main content
10.1145/1542476.1542520acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

A study of memory management for web-based applications on multicore processors

Published:15 June 2009Publication History

ABSTRACT

More and more server workloads are becoming Web-based. In these Web-based workloads, most of the memory objects are used only during one transaction. We study the effect of the memory management approaches on the performance of such Web-based applications on two modern multicore processors. In particular, using six PHP applications, we compare a general-purpose allocator (the default allocator of the PHP runtime) and a region-based allocator, which can reduce the cost of memory management by not supporting per-object free. The region-based allocator achieves better performance for all workloads on one processor core due to its smaller memory management cost. However, when using eight cores, the region-based allocator suffers from hidden costs of increased bus traffics and the performance is reduced for many workloads by as much as 27.2% compared to the default allocator. This is because the memory bandwidth tends to become a bottleneck in systems with multicore processors.

We propose a new memory management approach, defrag-dodging, to maximize the performance of the Web-based workloads on multicore processors. In our approach, we reduce the memory management cost by avoiding defragmentation overhead in the malloc and free functions during a transaction. We found that the transactions in Web-based applications are short enough to ignore heap fragmentation, and hence the costs of the defrag-mentation activities in existing general-purpose allocators outweigh their benefits. By comparing our approach against the region-based approach, we show that a per-object free capability can reduce bus traffic and achieve higher performance on multicore processors. We demonstrate that our defrag-dodging approach improves the performance of all the evaluated applications on both processors by up to 11.4% and 51.5% over the default allocator and the region-based allocator, respectively.

References

  1. D. R. Hanson. Fast allocation and deallocation of memory based on object lifetimes. Software-Practice & Experience, 20(1), pp. 5--12, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. A. Barrett and B. G. Zorn. Using Lifetime Predictors to Improve Memory Allocation Performance. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pp. 187--196, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. Gay and A Aiken. Memory management with explicit regions. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pp. 313--323, 1998 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Grossman, G. Morrisett, T. Jim, M. Hicks, Y. Wang, and J. Cheney. Region-Based Memory Management in Cyclone. In Proceedings of the ACM Conference on Programming Language Design and Implementation, pp. 282--293, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Apache Software Foundation. The Apache Portable Runtime Project. http://apr.apache.org/ .Google ScholarGoogle Scholar
  6. R. Iyer, M. Bhat, L. Zhao, R. Illikkal, S. Makineni, M. Jones, K. Shiv, and D. Newell. Exploring Small-Scale and Large-Scale CMP Architectures for Commercial Java Servers. In Proceedings of the IEEE International Symposium on Workload Characterization, pp. 191--200, 2006.Google ScholarGoogle ScholarCross RefCross Ref
  7. Y. Chen, E. Li, W. Li, T. Wang, J. Li, X. Tong, P. P. Wang, W. Hu, Y. Zhang, Y. Chen. Media mining -- emerging tera-scale computing applications. Intel Technology Journal, 11(3), pp 239--250, 2007.Google ScholarGoogle ScholarCross RefCross Ref
  8. The PHP Group. PHP: Hypertext Preprocessor. http://www.php.net/ .Google ScholarGoogle Scholar
  9. E. D. Berger, B. G. Zorn, and K. S. McKinley. Reconsidering custom memory allocation. In Proceedings of the ACM Conference on Object Oriented Programming, Systems, Languages, and Applications, pp. 1--12, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Free Software Foundation, Inc. GNU C Library obstack. http://www.gnu.org/software/libc/manual/html_node/Obstacks.html.Google ScholarGoogle Scholar
  11. E. D. Berger, K. S. McKinley, R. D. Blumofe, and P. R. Wilson. Hoard: A Scalable Memory Allocator for Multithreaded Applications. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 117--128, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Ghemawat and P. Menage. TCMalloc : Thread-Caching Malloc. http://goog-perftools.sourceforge.net/doc/tcmalloc.html .Google ScholarGoogle Scholar
  13. Doug Lea. A Memory Allocator. http://g.oswego.edu/dl/html/malloc.html .Google ScholarGoogle Scholar
  14. M. S. Johnstone and P. R. Wilson. The memory fragmentation problem: Solved. In Proceedings of the International Symposium on Memory Management, pp. 26--36, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Wikimedia Foundation. MediaWiki. http://www.mediawiki.org .Google ScholarGoogle Scholar
  16. SugarCRM Inc. SugarCRM. http://www.sugarcrm.com .Google ScholarGoogle Scholar
  17. eZ Systems. eZ Publish. http://ez.no.Google ScholarGoogle Scholar
  18. The phpBB Group. phpBB. http://www.phpbb.com/.Google ScholarGoogle Scholar
  19. Cake Software Foundation, Inc. CakePHP. http://www.cakephp.org/.Google ScholarGoogle Scholar
  20. Standard Performance Evaluation Corporation. SPECweb2005. http://www.spec.org/web2005/.Google ScholarGoogle Scholar
  21. OProfile -- A System Profiler for Linux. http://oprofile.sourceforge.net/news/.Google ScholarGoogle Scholar
  22. D. H. Hansson. Ruby on Rails. http://www.rubyonrails.org.Google ScholarGoogle Scholar
  23. A. Shankar, M. Arnold, and R. Bodik. Jolt: lightweight dynamic analysis and removal of object churn. In Proceedings of the ACM Conference on Object Oriented Programming Systems Languages and Applications, pp. 127--142, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. F. Xian, W. Srisaan, and, H. Jiang. Microphase: an approach to proactively invoking garbage collection for improved performance. In Proceedings of the ACM Conference on Object Oriented Programming Systems Languages and Applications, pp. 77--96, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D. Detlefs, A. Dosser, and B. Zorn. Memory allocation costs in large C and C++ programs. Software-Practice & Experience, 24(6), pp. 527--542, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. P. R. Wilson, M. S. Johnstone, M. Neely, and D. Boles. Dynamic Storage Allocation: A Survey and Critical Review. In Proceedings of the International Workshop on Memory Management, pp. 1--116, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. L. Seidl, and B. G. Zorn. Segregating heap objects by reference behavior and lifetime. In Proceedings of the International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 12--23, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Y. Shuf, M. Gupta, R. Bordawekar, and J. P. Singh. Exploiting prolific types for memory management and optimizations. In Proceedings of the ACM Symposium on Principles of Programming Languages, pp. 295--306, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A study of memory management for web-based applications on multicore processors

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation
        June 2009
        492 pages
        ISBN:9781605583921
        DOI:10.1145/1542476
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 6
          PLDI '09
          June 2009
          478 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1543135
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 15 June 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate406of2,067submissions,20%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!