A Comparison of Memory Allocators for Multicore and Multithread Applications: A Quantitative Approach
Resumo
The performance of memory allocation operations is a very important aspect to be considered in software design, however it is frequently neglected. This paper presents a comparative analysis of seven largely adopted memory allocators. Unlike other related works, based on artificial benchmark tests, we evaluate the selected allocators using real-world middleware applications. In order to compare the performance of the investigated allocators we consider the response time, memory consumption, and memory fragmentation. All tests are evaluated with respect to different combinations of processor cores. The results indicate that for workloads based on memory allocations up to 64 bytes and all combinations of processor cores up to four, the best average response time and memory usage is obtained using the TCMalloc memory allocator, followed by the Ptmalloc version 3.
Referências
GNU "GNU C Library" http://www.gnu.org/software/libc.
W. Gloger "Ptmalloc" http://www.malloc.de/en/
E.D. Berger K.S. McKinley R.D. Blumofe and P.R.Wilson "Hoard: a scalable memory allocator for multithreaded applications" ACM SIGARCH Computer Architecture News v.28:5 p.117-128 2000. (Pubitemid 32470891)
B. Zorn and D. Grunwald "Evaluating models of memory allocation" ACM Transactions on Modeling and Computer Simulation vol.4:1 p.107-131 1994.
J. Attardi and N. Nadgir "A Comparison of Memory Allocators in Multiprocessors" http://developers.sun.com/solaris/articles/multiproc/ multiproc.html 2003.
M. Masmano I. Ripoll and A. Crespo "A comparison of memory allocators for real-time applications" Proc of 4th Int'l workshop on Java technologies for real-time and embedded systems ACM Int'l Conference Proceeding Series vol. 177 p.68-76 2006. (Pubitemid 47158170)
J. Evans "A scalable concurrent malloc() implementation for FreeBSD" Proc. of the The BSD Conference 2006.
G. Carrozza D. Cotroneo R. Natella A. Pecchia S. Russo "Memory leak analysis of mission-critical middleware" Journal of Systems and Software v.83:9 2010.
D. Lea "A Memory Allocator " gee.cs.oswego.edu/dl/html/malloc. html 1996.
S. Ghemawat and P. Menage "TCMalloc: thread-Caching Malloc" http://googperftools.sourceforge.net/doc/tcmalloc.html.
M. Masmano I. Ripoll and A. Crespo J. Real "TLSF: A New Dynamic Memory Allocator for Real-Time Systems" Proc. of the 16th Euromicro Conference on Real-Time Systems 2004.
T. Tannenbaum "Miser: A dynamically loadable memory allocator for multithreaded applications" http://software.intel.com/en-us/articles/miser- adynamically-loadable-memory-allocator-for-multi-threadedapplications.
GNU "Memory allocation hooks" http://www.gnu.org.
G. Kroah-Hartman "Modifying a dynamic library without changing the source code" Linux Journal Nov 02 2004.
B. Jacob P. Larson B. Leitao S. A. Silva "SystemTap: instrumenting the Linux kernel for analyzing performance and functional problems" IBM Redbook 2008.
D. C. Montgomery Design and Analysis of Experiments 5th ed. J.W. Sons 2000