From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/915 Path: news.gmane.org!not-for-mail From: Laurent Bercot Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Suggest documentation of "soft limit" logic for chpst Date: Tue, 22 Nov 2005 05:54:59 +0100 Message-ID: <20051122045459.GA1493@skarnet.org> References: <4382321B.9050700@wordzoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132635348 14876 80.91.229.2 (22 Nov 2005 04:55:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2005 04:55:48 +0000 (UTC) Original-X-From: supervision-return-1151-gcsg-supervision=m.gmane.org@list.skarnet.org Tue Nov 22 05:55:35 2005 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1EeQAw-0006Tg-9c for gcsg-supervision@gmane.org; Tue, 22 Nov 2005 05:54:38 +0100 Original-Received: (qmail 1662 invoked by uid 76); 22 Nov 2005 04:54:59 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 1656 invoked by uid 1000); 22 Nov 2005 04:54:59 -0000 Mail-Followup-To: supervision@list.skarnet.org Original-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <4382321B.9050700@wordzoo.com> User-Agent: Mutt/1.4i Xref: news.gmane.org gmane.comp.sysutils.supervision.general:915 Archived-At: > I had been trying to raise the limit on number of open files via 'chpst > -o 10000'. I thought this was working properly, so I was focused on > examining the daemon for bugs. Then I finally had the insight to test > whether 'chpst -o 10000 && ulimit -a' was doing what I expect. Now I'm > doing a 'ulimit -n 10000' instead of a 'chpst -o 10000'. chpst is not a shell builtin, and does not work the way ulimit does. It does not change the state in your shell ; it's impossible to do that with external programs on Unix, only builtins can. chpst only changes the _process state_ of the _current process_, i.e. chpst itself, which execs into the command line you're supposed to give. 'chpst -o 10000' does nothing, but 'chpst -o 10000 frob' will run 'frob' with a modified max number of open files. Only 'frob' can see the changes and that has nothing to do with soft or hard limits. By the way, 10000 is overkill. Even if your kernel has very high limits, any program that handles 10000 file descriptors will have serious performances issues, unless the kernel _and_ the program are specifically designed. for that case. See http://www.kegel.com/c10k.html for more information. -- Laurent