apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fuhrmann <stefan.fuhrm...@wandisco.com>
Subject [PATCH] APR pool scalability and efficiency
Date Sun, 11 May 2014 02:23:38 GMT
Hi there,

As part of my Subversion scalability testing, I ran into
two issues that were related to APR pools.

The first and more important one was getting an OOM
error because we hit the mmap region count limit on
Ubuntu (mmap seems to be enabled in the system libs
at least since 12.04 LTS). Its root cause was a large data
structure (many small allocations) being built up in a single
pool. That times multiple threads / concurrent requests
exceeded the ~0.5GB limit (~64k regions x 8kB).
[apr-pool-growth.*]

In a related scenario, we would allocate a large buffer
(e.g. 64kB) in a temporary pool, clear the pool and then
create another pool that is small (few allocations) but
relatively long-lived. The APR allocator would then tend
to reuse the large node for the new pool - wasting quite
a bit of memory. [apr-allocator-efficiency.*]

Attached are patches against apr/trunk to both issues plus
the corresponding commit messages. Neither should change
the behavior of "common" pool usage but rather improve
"worst-case" behavior.

-- Stefan^2.

Mime
View raw message