Memory allocation for long-running server applications

Prior work on dynamic memory allocation has largely neglected long-running server applications, for example, web servers and mail servers. Their requirements differ from those of one-shot applications like compilers or text editors. We investigated how to build an allocator that is not only fast and memory efficient but also scales well on SMP machines. We found that it is not sufficient to focus on reducing lock contention - higher speedups require a reduction in cache misses and bus traffic. We then designed and prototyped a new allocator, called LKmalloc, targeted for both traditional applications and server applications. LKmalloc uses several subheaps, each one with a separate set of free lists and memory arena. A thread always allocates from the same subheap but can free a block belonging to any subheap. A thread is assigned to a subheap by hashing on its thread ID. WC compared its performance with several other allocators on a server-like, simulated workload and found that it indeed scales well and is quite fast hut memory more efficiently.

[1]  C. J. Stephenson,et al.  New methods for dynamic storage allocation (Fast Fits) , 1983, SOSP '83.

[2]  Benjamin G. Zorn,et al.  Memory allocation costs in large C and C++ programs , 1994, Softw. Pract. Exp..

[3]  Bruce W. Leverett,et al.  An adaptive system for dynamic storage allocation , 1982, Softw. Pract. Exp..

[4]  Dirk Grunwald,et al.  Customalloc: Efficient synthesized memory allocators , 1993, Softw. Pract. Exp..

[5]  Dirk Grunwald,et al.  Evaluating models of memory allocation , 1994, TOMC.

[6]  Dirk Grunwald,et al.  Improving the cache locality of memory allocation , 1993, PLDI '93.

[7]  Jeffrey S. Fenton,et al.  Dynamic Storage Allocation of Arbitrary Sized Segments , 1974, IFIP Congress.

[8]  Arun Iyengar,et al.  Parallel dynamic storage allocation algorithms , 1993, Proceedings of 1993 5th IEEE Symposium on Parallel and Distributed Processing.

[9]  Paul E. McKenney,et al.  Efficient Kernel Memory Allocation on Shared-Memory Multiprocessors , 1993, USENIX Winter.

[10]  Paul R. Wilson,et al.  Dynamic Storage Allocation: A Survey and Critical Review , 1995, IWMM.

[11]  Kiem-Phong Vo Vmalloc: A General and Efficient Memory Allocator , 1996 .

[12]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[13]  Kiem-Phong Vo,et al.  Vmalloc: A General and Efficient Memory Allocator , 1996, Softw. Pract. Exp..

[14]  C. J. Stephenson Fast fits--new methods for dynamic storage allocation , 1983 .

[15]  A. Iyengar,et al.  Scalability of dynamic storage allocation algorithms , 1996, Proceedings of 6th Symposium on the Frontiers of Massively Parallel Computation (Frontiers '96).