epoll.7: Document /proc interfaces for limiting kernel memory usage

Document the following /proc files that were added in
Linux 2.6.28:
/proc/sys/fs/epoll/max_user_instances
/proc/sys/fs/epoll/max_user_watches

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2009-01-16 21:34:35 +13:00
parent 7829230a3a
commit 5ee0575d03
1 changed files with 22 additions and 1 deletions

View File

@ -18,7 +18,7 @@
.\"
.\" Davide Libenzi <davidel@xmailserver.org>
.\"
.TH EPOLL 7 2008-11-04 "Linux" "Linux Programmer's Manual"
.TH EPOLL 7 2009-01-17 "Linux" "Linux Programmer's Manual"
.SH NAME
epoll \- I/O event notification facility
.SH SYNOPSIS
@ -166,6 +166,27 @@ it is the caller's responsibility to rearm the file descriptor using
.BR epoll_ctl (2)
with
.BR EPOLL_CTL_MOD .
.SS /proc interfaces
The following interfaces can be used to limit the amount of
kernel memory consumed by epoll:
.TP
.IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)"
This specifies an upper limit on the number of epoll instances
that can be created per real user ID.
.TP
.IR /proc/sys/fs/epoll/max_user_watches " (since Linux 2.6.28)"
This specifies a limit on the total number of
file descriptors that a user can register across
all epoll instances on the system.
The limit is per real user ID.
Each registered file descriptor costs roughly 90 bytes on a 32-bit kernel,
and roughly 160 bytes on a 64-bit kernel.
Currently,
.\" 2.6.28
the default value for
.I max_user_watches
is 1/32 of the available low memory,
divided by the registration cost in bytes.
.SS Example for Suggested Usage
While the usage of
.B epoll