Re: [PATCH 1/3] epoll: increase default max_user_instances to 1024

From: Davide Libenzi
Date: Tue Jan 27 2009 - 23:00:43 EST

On Wed, 28 Jan 2009, Bron Gondwana wrote:

> Both Postfix and Apache use an epoll instance per child, which
> leads to significant scalability issues with max_user_instances
> set so low. Bump the default to 1024 so medium sized sites are
> not impacted.

NACK. Epoll allocates globally about 100 to 160 bytes (32/64 bit) for each
file added to the interface:

for i 1..1024
for j 1..1024
if i!=j
add j -> i

That's (N^2 * {100, 160}) = 100MB to 160MB of pinned kernel memory,
explotable by simple users with untouched NFILES.
This is the reason such limit was introduced in the first place. Again,
for the 10th time, if you have a loaded server with multiple processes
using epoll:

$ echo NN > /proc/sys/fs/epoll/max_user_instances

Note that NN does not consume any resource "per se", so if you feel
threatened by such limit, you can go wild with it.

- Davide

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at