[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#758068: libapr1: mmap allocator severely limites apache scalability



Package: libapr1
Version: 1.5.0-1
Severity: normal

Dear Maintainer,

Please disable the experimental --enable-mmap-allocator option in the
Debian libapr build.

The mmap allocator forces APR to perform a huge number of tiny (1-2
page) mmap() calls.

On Linux, the process address space is protected in the kernel by a
read-write semaphore that is shared across all threads in the
process. In a heavily-loadede multithreaded mpm_worker process, all
the worker threads will share the mmap semaphore, and any allocations
via apr that call mmap() will contest over that semaphore.

In our environment, using apache2 with mod_security as a reverse-proxy
with the Debian default configuration of ThreadsPerChild=25, at around
100-200 requests per second, we see huge amount of contention on the
mmap semaphore and performance tanking. The system load average climbs
to 90+ as all the workers block on the mmap semaphore. Rebuilding
libapr1 without --enable-allocator-uses-mmap dramatically improved our
observed performance.

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: jessie/sid
  APT prefers trusty-updates
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty'), (100, 'trusty-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13.0-30-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libapr1 depends on:
ii  libc6              2.19-0ubuntu6.1
ii  libuuid1           2.20.1-5.1ubuntu20.1
ii  multiarch-support  2.19-0ubuntu6.1

libapr1 recommends no packages.

libapr1 suggests no packages.

-- no debconf information


Reply to: