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.
- D. R. Hanson. Fast allocation and deallocation of memory based on object lifetimes. Software-Practice & Experience, 20(1), pp. 5--12, 1990. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Apache Software Foundation. The Apache Portable Runtime Project. http://apr.apache.org/ .Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Cross Ref
- The PHP Group. PHP: Hypertext Preprocessor. http://www.php.net/ .Google Scholar
- 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 Scholar
Digital Library
- Free Software Foundation, Inc. GNU C Library obstack. http://www.gnu.org/software/libc/manual/html_node/Obstacks.html.Google Scholar
- 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 Scholar
Digital Library
- S. Ghemawat and P. Menage. TCMalloc : Thread-Caching Malloc. http://goog-perftools.sourceforge.net/doc/tcmalloc.html .Google Scholar
- Doug Lea. A Memory Allocator. http://g.oswego.edu/dl/html/malloc.html .Google Scholar
- 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 Scholar
Digital Library
- Wikimedia Foundation. MediaWiki. http://www.mediawiki.org .Google Scholar
- SugarCRM Inc. SugarCRM. http://www.sugarcrm.com .Google Scholar
- eZ Systems. eZ Publish. http://ez.no.Google Scholar
- The phpBB Group. phpBB. http://www.phpbb.com/.Google Scholar
- Cake Software Foundation, Inc. CakePHP. http://www.cakephp.org/.Google Scholar
- Standard Performance Evaluation Corporation. SPECweb2005. http://www.spec.org/web2005/.Google Scholar
- OProfile -- A System Profiler for Linux. http://oprofile.sourceforge.net/news/.Google Scholar
- D. H. Hansson. Ruby on Rails. http://www.rubyonrails.org.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
A study of memory management for web-based applications on multicore processors
Recommendations
A study of memory management for web-based applications on multicore processors
PLDI '09More 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 ...
Management and optimization for nonvolatile memory-based hybrid scratchpad memory on multicore embedded processors
Regular PapersThe recent emergence of various Non-Volatile Memories (NVMs), with many attractive characteristics such as low leakage power and high-density, provides us with a new way of addressing the memory power consumption problem. In this article, we target ...
Shared heap management for memory-limited java virtual machines
One scarce resource in embedded systems is memory. Multitasking makes the lack of memory problem even worse. Most current embedded systems, which do not provide virtual memory, simply divide physical memory and evenly assign contiguous memory chunks to ...







Comments