My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TLSFAllocator  
Performance evaluation of TLSF allocator
Phase-Design, Deprecated
Updated Nov 20, 2011 by nitingupta910@gmail.com

Introduction

This page provides performance evaluation of TLSF (Two Level Segregated Fit) allocator. Details of this allocator can be found here.

Details

Some changes have been made to this allocator to suite needs of this project:

  • Now 'Pool' can dynamically grow/shrink. Each pool consists of set of contiguous regions of memory. This also required change in TLSF interface.
  • Removed realloc()
  • Cleanups: Macros -> static inline functions etc.
  • Code:

This has now been ported to Linux kernel with some additional changes (code here).

A slight variation of this extended TLSF allocator is now included in Xen!

Performance

Performance evaluation is done by replaying this data over TLSF allocator.

Following plot shows effect on memory usage by allocator as region size was varied from 4K to 64K:

(Here are text data files plotted below).

Zooming on swap requests above 50K:

Data Summary

Following shows, number of times tlsf_alloc(), tlsf_free() is called along with average time per call spent in these functions. Also, get_mem(), put_mem() shows no. of times allocator had to go down to system allocator (for adding/freeing region).

This profiling is done with TLSF region size of 16k. Region size has almost no effect on allocator speed.

(System: Linux VM (VMware) with 512M RAM - underlying processor: Pentium4 2.8GHz)

Conclusions

  • TLSF allocator with region size of 16K looks most memory space efficient.
  • Region size has almost no effect on allocator speed.

Notes/Todo

  • Need to compare this with other allocators e.g. DLM Allocator
  • Run all above tests with many more different SwapReplay traces.

Sign in to add a comment
Powered by Google Project Hosting