supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gildas <3ntr0p13@gmail.com>
To: supervision@list.skarnet.org
Subject: Re: suggest documentation of "soft limit" logic for chpst
Date: Fri, 21 Sep 2012 09:04:02 +0200	[thread overview]
Message-ID: <CAD8Sf6eJrH_4=L2aPieCwXv2zDZDP06ZsvZ0To+fx8Xz47+frw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

Hi,

I know it's weird to quote a subject from 2005, but I found this while I
was looking for a reason why chpst wasn't behaving the way it was expected
(when one assume you can raise the limit above the hard value).

It seems that chpst is very often used to raise the number of file limit
when starting a daemon as root, as the default file number limit in Linux
(1024) is not enough for a number of use cases.

To be able to do that, though, one as to do "ulimit -n 5000; chpst -o 5000
command", which seems to be like a waste of resources since the same
syscalls are called again and again.

It would be nice if you could raise the hard limit above its  previously
set value in a simpler way that would make it more efficient for the use
case above.

I've tested a naive patch (https:// <https://gist.github.com/3757463>
gist.github.com
<https://gist.github.com/3757463>/3757463<https://gist.github.com/3757463>)
that allows to set a higher value for both soft and hard values when the
given limit is over the hard value AND the effective uid is 0.

This would fix the use case above as your could run a command as root with
a higher file limit value than the default with a more concise "chpst -o
5000 command".

Does it makes sense? What have I overlooked? Thanks for your insights on
the matter!

If  it actually makes sense, and this modification could be merged, I'd be
glad to provide a patched version of the manpage as well!

Regards, Gildas

             reply	other threads:[~2012-09-21  7:04 UTC|newest]

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

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='CAD8Sf6eJrH_4=L2aPieCwXv2zDZDP06ZsvZ0To+fx8Xz47+frw@mail.gmail.com' \
    --to=3ntr0p13@gmail.com \
    --cc=supervision@list.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).