Top Banner
NUMA aware heap memory manager How to use our resources wisely in multi- thread and multi-proccessor systems Michael Shteinbok Shai Ben Nun Supervisor: Dmitri Perelman
10

NUMA aware heap memory manager

Feb 23, 2016

Download

Documents

ray

NUMA aware heap memory manager . How to use our resources wisely in multi-thread and multi - proccessor systems Michael Shteinbok Shai Ben Nun Supervisor: Dmitri Perelman. What’s the problem?. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: NUMA aware heap memory manager

NUMA aware heap memory manager

How to use our resources wisely in multi-thread and multi-proccessor systems

Michael ShteinbokShai Ben Nun

Supervisor: Dmitri Perelman

Page 2: NUMA aware heap memory manager

What’s the problem?While increasing number of cores/processors

seems to increase the performance in proportion, it usually increases in lower numbers and sometimes even slows us down.

Page 3: NUMA aware heap memory manager

Ok, But Why?Some physical issues can still cause a

bottleneck. For example Memory Access and Management.

UMA – Uniformed Memory Access

Page 4: NUMA aware heap memory manager

Solution - NUMA Non Uniform Memory Access - each CPU has it’s

own close memory with quick access. One processor can access the other memory units

but with slower BW. The NUMA API lets the programmer to manage the

memory.

Page 5: NUMA aware heap memory manager

How One Manages The Memory?When we allocate and free, we are blind to

the process in the background. For this need we have

different lib function. (glibc, TCMalloc, TCMalloc NUMA Aware)

The article refers to this management problem and offers the TCMalloc NUMA Aware heap manager

http://developer.amd.com/Assets/NUMA_aware_heap_memory_manager_article_final.pdf

Page 6: NUMA aware heap memory manager

Performance Change The Previous solutions(more BW, more local

access):

Page 7: NUMA aware heap memory manager

Project Goals Improving the current TCMalloc numa aware

in scenarios it losses performance Managing wisely the memory of different

cores and offer a new “read” function that will be faster (TBD)

Page 8: NUMA aware heap memory manager

Problem In Current SolutionWhen thread frees memory that was allocated by another

thread (on another numa node) we can get performance loss

X = malloc

Thread A

Thread AFree pool

Free (X)

X = Allocate

Thread A

Free (X)

Thread B

Page 9: NUMA aware heap memory manager

Our BenchmarkEach couple of threads on a different numa

node. 8 quad-cores processors => Total 16 couples.

Allocator Thread

Free Thread

Alloc Rand List (5000)

Access Memory

AllocQueue

First-touch policy

Page 10: NUMA aware heap memory manager

Achieving Project Goals Step By Step

Learn how does the TCMalloc workFind scenarios that makes current TCM to

loss performance.Sort the scenarios by most likely to occur in

real environmentImplement a support in these scenarios

Make new TCMalloc to get better performance!