/
comparative study on Memory Allocators in comparative study on Memory Allocators in

comparative study on Memory Allocators in - PDF document

myesha-ticknor
myesha-ticknor . @myesha-ticknor
Follow
413 views
Uploaded On 2016-05-09

comparative study on Memory Allocators in - PPT Presentation

x201CA Multicore and Multithreaded Applicationsx201D Ta ID: 312534

“A Multicore and Multithreaded Applications” Ta

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "comparative study on Memory Allocators i..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

“A comparative study on Memory Allocators in Multicore and Multithreaded Applications” Taís B.Ferreira , Rivalino Matias , Autran Macedo , Lucio B. Araujo Federal University of Uberlândia . Uberlândia – MG, Brazil Presented by : Luís Miguel Tomé Nóbrega Aveiro, 13/12/2011 1 Real - Time Systems, DETI - UA Introduction Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 2  Running computer programs involves a lot of procedures including many memory allocations and deallocations ;  Memory management is essential for the performance of programs ;  Even more important in Multicore and Multithreads applications ; Introduction: Memory allocation Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 3  There are two levels of memory allocation : 1. Kernel Level : memory management of OS sub - systems ; 2. User Level : implemented by UMA (user - level memory allocator) that is a library responsible to manage the heap area ;  There is always a default UMA but it can be replaced by another one in order to optimize certain system ; Introduction: choice of the allocator Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 4  Based on experimental tests, often on synthetic benchmarks that perform different and random memory allocation operations ;  Problem : hardly generalized for real application s ;  Solution : this paper presents an alternative way to perform the referred tests, using real applications to perform them . Allocators: basic operation Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 5 Fig.1:General structures of a UAM  Data structure (fig.1) is similar to all allocators nevertheless they differ in the way they manage the heap, thus they way they deal with issues like blowup, false sharing and memory contention . Process calls malloc /new 1. Request of a heap area 2.Creation and initialization of the heap header 3. If it is necessary more space, another heap is request (1) Allocators: Hoard (version 3.8) Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 6  High performance in multithreaded programs running on multicore processors;  3 types of heaps: 1. Thread - cache () 2. Local heap; 3. Global heap;  Minimize heap contention;  Minimize blowup;  Avoids false sharing; Fig.2: Hoard structures Allocators: Ptmalloc (version 2) Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 7  Also developed for multiprocessors running multithreaded programs;  Multiple heap areas;  Does not address false sharing neither blowup; Fig.3: Ptmalloc structures Allocators: Ptmalloc (version 3) Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 8  Improvement over Ptmallocv2;  Size of blocks is different;  Large bins are kept in tree that implements binary search; Allocators: TCMalloc Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 9  Local heap per thread (from 8B to 32kB);  Global heap shared by all threads �( 32kB);  Minimizes blowup;  Minimizes contention;  Does not address false sharing; Fig.4: TCMalloc structures Allocators: Jemalloc Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 10  Similar to Hoard, differing in the number of heaps and size of memory objects:  Thread cache (32 kB );  Heaps:  Small( between 2 and 4kB);  large( between 4 and 4MB);  huge( �4MB): one shared!!  Addresses all the issues. Local to threads and 4 per processor! Allocators: TSLE (version 2.4.6) Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 11  Focused on RT applications;  Objective is to keep the memory allocation response time constant;  Unique heap shared by all threads;  Does not address contention; Fig.5 TSLF structures Allocators: Miser Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 12  Based on Hoard, assumes that the majority of memory requests are up to 256 and try to meet that size fast;  1 local heap per thread;  Global heap;  Avoid false sharing;  Avoid blowup;  Does not solve requests for memory blocks larger then 256B; Fig.6 Miser structures Experimental study Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 13  Methodology: 1. Characterization of the memory usage in each application; 2. Linking applications to each allocator and analyze performance in terms of response time, memory consumption and memory fragmentation;  Instrumentation  3 Core Duo 2.4 GHz, 2 – gigabyte Ram 1. Running the middleware applications (3 applications); 2. Database; 3. Workload generator tools; Result Analysis Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 14  Request size distribution Fig.7 Request size distribution Result Analysis Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 15  Middleware performance per allocator Fig.8 Middleware performance per allocator Result Analysis Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 16  Memory consumption per allocator Fig.9 Memory consumption per allocator Result Analysis Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 17  Fragmentation level per allocator Fig.9 Fragmentation level per allocator Conclusions Aveiro, 13/12/2011 Real - Time Systems, DETI - UA 18  TCMalloc presents the best results followed by Ptmallocv3;  Jemalloc and Hoard show very good performance in terms of response time but high memory consumption and fragmentation;