ABSTRACT
We present Streamflow, a new multithreaded memory manager designed for low overhead, high-performance memory allocation while transparently favoring locality. Streamflow enables low over-head simultaneous allocation by multiple threads and adapts to sequential allocation at speeds comparable to that of custom sequential allocators. It favors the transparent exploitation of temporal and spatial object access locality, and reduces allocator-induced cache conflicts and false sharing, all using a unified design based on segregated heaps. Streamflow introduces an innovative design which uses only synchronization-free operations in the most common case of local allocations and deallocations, while requiring minimal, non-blocking synchronization in the less common case of remote deallocations. Spatial locality at the cache and page level is favoredby eliminating small objects headers, reducing allocator-induced conflicts via contiguous allocation of page blocks in physical memory, reducing allocator-induced false sharing by using segregated heaps and achieving better TLB performance and fewer page faults via the use of superpages. Combining these locality optimizations with the drastic reduction of synchronization and latency overhead allows Streamflow to perform comparably with optimized sequential allocators and outperform--on a shared-memory systemwith four two-way SMT processors--four state-of-the-art multi-processor allocators by sizeable margins in our experiments. The allocation-intensive sequential and parallel benchmarks used in our experiments represent a variety of behaviors, including mostly local object allocation-deallocation patterns and producer-consumer allocation-deallocation patterns.
- N. Arora, R. Blumofe, and C. Greg-Plaxton. Thread Scheduling for Multiprogrammed Multiprocessors. In Proc. of the 10th ACM Symposium on Parallel Algorithms and Architectures, pages 119--129, Puerto Vallarta, Mexico, June 1998. Google ScholarDigital Library
- D. Barrett and B. Zorn. Using Lifetime Predictors to Improve Memory Allocation Performance. In Proc. of the 1993 ACM SIGPLAN Conference on Programming Languages Design and Implementation, pages 187--196, June 1993. Google ScholarDigital Library
- E. Berger, K. Mckinley, R. Blumofe, and P. Wilson. Hoard: A Scalable Memory Allocator for Multithreaded Applications. In Proc. of the 9th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 117--128, Cambridge, MA, November 2000. Google ScholarDigital Library
- E. Berger, B. Zorn, and K. McKinley. Reconsidering Custom Memory Allocation. In Proc. of the 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applpications, pages 1--12, Seattle, WA, November 2002. Google ScholarDigital Library
- Filip Blagojevic. Optimizing Irregular Adaptive Application on Multi-Threaded Processors: The Case of Medium-Grain Parallel Delaunay Mesh Generation. Master's thesis, The College of William and Mary, Williamsburg, VA, U.S.A., December 2005.Google Scholar
- C. Cascaval, E. Duesterwald, P. Sweeney, and R. Wisniewski. Multiple Page Size Modeling and Optimization. In Proc. of the 14th International Conference on Parallel Architectures and Compilation Techniques, pages 339--349, Saint Louis, MO, September 2005. Google ScholarDigital Library
- Y. Feng and E. Berger. A Locality-Improving Dynamic Memory Allocator. In Proceedings of the Third Annual ACM SIGPLAN Workshop on Memory Systems Performance, Chicago, IL, June 2005. Google ScholarDigital Library
- D. Gay and A. Aiken. Memory Management with Explicit Regions. In Proc. of the 1998 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 313--323, Montreal, Canada, June 1998. Google ScholarDigital Library
- Wolfram Gloger. Dynamic Memory Allocator Implementations in Linux System Libraries. http://www.dent.med.uni-muenchen.de/ wmglo/malloc-slides.html.Google Scholar
- Google. Google Performance Tools. http://goog-perftools.sourceforge.net/.Google Scholar
- D. Grunwald, B. Zorn, and R. Henderson. Improving the Cache Locality of Memory Allocation. In Proc. of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pages 177--186, Albuquerque, NM, June 1993. Google ScholarDigital Library
- P. Kamp. Malloc(3) Revisted. http://phk.freebsd.dk/pubs/malloc.pdf. Google ScholarDigital Library
- K. C. Knowlton. A Fast Storage Allocator. Communications of the ACM, 8(10):623--625, 1965. Google ScholarDigital Library
- D. E. Knuth. Dynamic Storage Allocation. In The Art of Computer Programming, volume 1. Addison-Wesley, 1968. Google ScholarDigital Library
- P. Larson and M. Krishnan. Memory Allocation for Long-Running Server Applications. In Proceedings of the First International Symposium on Memory Management, pages 176--185, Vancouver, BC, October 1998. Google ScholarDigital Library
- D. Lea. A Memory Allocator. http://gee.cs.oswego.edu/dl/html/malloc.html.Google Scholar
- L. McDowell, S. Eggers, and S. Gribble. Improving Server Software Support for Simultaneous Multithreaded Processors. In Proc. of the 2003 ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 37--48, San Diego, CA, June 2003. Google ScholarDigital Library
- M. Michael. Scalable Lock-free Dynamic Memory Allocation. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, pages 35--46, Washington, DC, June 2004. Google ScholarDigital Library
- J. Navarro, S. Iyer, and A. Cox. Practical, Transparent Operating System Support for Superpages. In Proc. of the Fifth Symposiumon Operating Systems Design and Implementation, pages 89--104, Boston, MA, December 2002. Google ScholarDigital Library
- T. Romer, W. Ohlrich, A. Karlin, and B. Bershad. Reducing TLB and Memory Overhead using Online Superpage Promotion. In Proc. of the 22nd International Symposium on Computer Architecture, pages 176--187, Santa Margherita Ligure, Italy, June 1995. Google ScholarDigital Library
- D. Ross. The AED Free Storage Package. Communications of the ACM, 10(8):481--492, 1967. Google ScholarDigital Library
- M. Seidl and B. Zorn. Segregating Heap Objects by Reference Behavior and Lifetime. In Proc. of the 8th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 12--23, San Jose, CA, October 1998. Google ScholarDigital Library
- Y. Shuf, M. Gupta, R. Bordawekar, and J. Pal Singh. Exploiting Prolific Types for Memory Management and Optimizations. In Proc.of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Lanugages, pages 295--306, Portland, OR, January 2002. Google ScholarDigital Library
- G. Steele. Data Representation in PDP-10 MACLISP. Technical Report AI Lab Memo 421, MIT, 1977.Google Scholar
- V. Vee and W. Hsu. A Scalable and Efficient Storage Allocator on Shared Memory Multiprocessors. In Proceedings of the 1999 International Symposium on Parallel Architectures, Algorithms and Networks, pages 230--235, Perth, Australia, June 1999. Google ScholarDigital Library
- K. Vo. Vmalloc: A General and Efficient Memory Allocator. Software Practice and Experience, 26(3):357--374, 1996.Google ScholarCross Ref
- P. Wilson, M. Johnstone, M. Neely, and D. Boles. Dynamic Storage Allocation: A Survey and Critical Review. In Proc. of the International Workshop on Memory Management, LNCS Vol. 986, pages 1--116, Kinross, UK, September 1995. Google ScholarDigital Library
Index Terms
- Scalable locality-conscious multithreaded memory allocation
Recommendations
Automatic memory reclamation for lock-free data structures
OOPSLA '15Lock-free data-structures are widely employed in practice, yet designing lock-free memory reclamation for them is notoriously difficult. In particular, all known lock-free reclamation schemes are ``manual'' in the sense that the developer has to ...
Cache-Conscious Thread Scheduling for Massively Multithreaded Processors
Highly multithreaded architectures introduce another dimension to fine-grained hardware cache management. The order in which the system's threads issue instructions can significantly impact the access stream seen by the caching system. This article ...
Making LRU Friendly to Weak Locality Workloads: A Novel Replacement Algorithm to Improve Buffer Cache Performance
Although the LRU replacement algorithm has been widely used in buffer cache management, it is well-known for its inability to cope with access patterns with weak locality. Previously proposed algorithms to improve LRU greatly increase complexity and/or ...
Comments