From: "Canek Peláez Valdés" <caneko@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Persistent ulimit for daemons
Date: Wed, 1 Aug 2012 10:27:21 -0500 [thread overview]
Message-ID: <CADPrc80OPbjQcXH=LjQUCcp6HXFq=Ekmk4+P1Z_QM_010A3Sfg@mail.gmail.com> (raw)
In-Reply-To: <50194025.5010103@orlitzky.com>
On Wed, Aug 1, 2012 at 9:41 AM, Michael Orlitzky <michael@orlitzky.com> wrote:
> Is there a blessed method these days for setting the ulimit per-daemon?
>
> The best I've been able to do is a global setting in /etc/rc.conf:
>
> rc_ulimit="-s 1048576"
>
> The entries under /etc/security seem to be ignored when using
> `/etc/init.d/foo start`.
If you are willing to try, systemd allows you to set not only the
limits for opened files, but also for basically every knob the Linux
kernel has. And to set it per daemon (or unit, in systemd parlance),
of course; for what you want, you would only need to set:
LimitNOFILE=<limit>
in the [Service] section of your unit. If you are interested, all the
relevant documentation is in systemd.exec(5).
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
next prev parent reply other threads:[~2012-08-01 15:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 14:41 [gentoo-user] Persistent ulimit for daemons Michael Orlitzky
2012-08-01 15:27 ` Canek Peláez Valdés [this message]
2012-08-01 15:49 ` Michael Orlitzky
2012-08-02 5:52 ` Joost Roeleveld
2012-08-02 15:38 ` Michael Orlitzky
2012-08-03 4:44 ` Joost Roeleveld
2012-08-03 16:23 ` Michael Orlitzky
2012-08-03 5:08 ` Graham Murray
2012-08-03 16:29 ` Michael Orlitzky
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='CADPrc80OPbjQcXH=LjQUCcp6HXFq=Ekmk4+P1Z_QM_010A3Sfg@mail.gmail.com' \
--to=caneko@gmail.com \
--cc=gentoo-user@lists.gentoo.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