Re: [RFC PATCH 3/3] mm: increase scalability of global memory commitment accounting

From: Dave Hansen
Date: Thu Feb 11 2016 - 14:45:21 EST


On 02/11/2016 10:20 AM, Tim Chen wrote:
> The brk1 test is also somewhat pathologic. It
> does nothing but brk which is unlikely for real workload.
> So we have to be careful when we are tuning our system
> behavior for brk1 throughput. We'll need to make sure
> whatever changes we made don't impact other more useful
> workloads adversely.

Yeah, there are *so* many alternatives to using brk() or mmap()/munmap()
frequently.

glibc has tunables to tune how tightly coupled malloc()/free() are with
virtual space allocation. Raising those can reduce the brk() frequency.

There are also other allocators that take much larger chunks of virtual
address space and then "free" memory with MADV_FREE instead of brk(). I
think jemalloc does this, for instance.