supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Laurent Bercot <ska-supervision@skarnet.org>
Subject: Re: Suggest documentation of "soft limit" logic for chpst
Date: Tue, 22 Nov 2005 05:54:59 +0100	[thread overview]
Message-ID: <20051122045459.GA1493@skarnet.org> (raw)
In-Reply-To: <4382321B.9050700@wordzoo.com>

> 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


  reply	other threads:[~2005-11-22  4:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-21 20:46 Jared Rhine
2005-11-22  4:54 ` Laurent Bercot [this message]
2005-11-23  5:47   ` Jared Rhine
2005-11-23 13:35     ` Laurent Bercot
2012-09-21  7:04 suggest " Gildas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051122045459.GA1493@skarnet.org \
    --to=ska-supervision@skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).