guix-commits
[Top][All Lists]
Advanced

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

05/06: doc: Add an example of how the open file descriptors limit can be


From: guix-commits
Subject: 05/06: doc: Add an example of how the open file descriptors limit can be raised.
Date: Fri, 19 Feb 2021 10:08:54 -0500 (EST)

apteryx pushed a commit to branch master
in repository guix.

commit 28a2c9c9e1ea7bc6a30dd610e6d1bcbe71a50047
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Thu Feb 18 18:07:53 2021 -0500

    doc: Add an example of how the open file descriptors limit can be raised.
    
    * doc/guix.texi (Base Services)[pam-limits-service]: Add an example and
    explanation of how the 'nofile', or open file descriptors value, can be
    configured.
---
 doc/guix.texi | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 6989716..5d28fca 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15612,13 +15612,15 @@ to add @var{device} to the kernel's entropy pool.  
The service will fail if
 @cindex priority
 @cindex realtime
 @cindex jackd
+@cindex nofile
+@cindex open file descriptors
 @deffn {Scheme Procedure} pam-limits-service [#:limits @code{'()}]
 
 Return a service that installs a configuration file for the
 @uref{http://linux-pam.org/Linux-PAM-html/sag-pam_limits.html,
 @code{pam_limits} module}.  The procedure optionally takes a list of
 @code{pam-limits-entry} values, which can be used to specify
-@code{ulimit} limits and nice priority limits to user sessions.
+@code{ulimit} limits and @code{nice} priority limits to user sessions.
 
 The following limits definition sets two hard and soft limits for all
 login sessions of users in the @code{realtime} group:
@@ -15634,6 +15636,22 @@ The first entry increases the maximum realtime 
priority for
 non-privileged processes; the second entry lifts any restriction of the
 maximum address space that can be locked in memory.  These settings are
 commonly used for real-time audio systems.
+
+Another useful example is raising the maximum number of open file
+descriptors that can be used:
+
+@lisp
+(pam-limits-service
+ (list
+  (pam-limits-entry "*" 'both 'nofile 100000)))
+@end lisp
+
+In the above example, the asterisk means the limit should apply to any
+user.  It is important to ensure the chosen value doesn't exceed the
+maximum system value visible in the @file{/proc/sys/fs/file-max} file,
+else the users would be prevented from login in.  For more information
+about the Pluggable Authentication Module (PAM) limits, refer to the
+@samp{pam_limits} man page from the @code{linux-pam} package.
 @end deffn
 
 @node Scheduled Job Execution



reply via email to

[Prev in Thread] Current Thread [Next in Thread]