mirror of https://github.com/mkerrisk/man-pages
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:
parent
7829230a3a
commit
5ee0575d03
23
man7/epoll.7
23
man7/epoll.7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue