plasma-umass / Mesh

A memory allocator that automatically reduces the memory footprint of C/C++ applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

improve free latency

bpowers opened this issue · comments

Free performance is bad:

screenshot from 2018-02-14 08-20-58

First, add stats collection. What fraction of the time do we hit a thread-local free?

Next, switch from iterating over buckets to (maybe) caching 1 or 2 buckets and then going through the global miniheap table.

Finally, add stats and look at whether we can more effectively batch calls to madvise and friends.

Free performance is much better:

image

We could still improve global frees, but closing this for now as we've picked the low hanging fruit