[opensuse-packaging] [Proposal] Per service ulimits
/etc/systemd/system/${servicename}.service.d/limits.conf the fileformat will be from man 5 systemd.conf. For setting the maxfilehandles. the file would look like. [[[ [Service] LimitNOFILE=8192 ]]] Todos: 1. systemd 1.1 on 13.1 or later: nothing. systemd will automerge all files in /etc/systemd/system/${servicename}.service.d/ when handling ${servicename}.service. Support for this was introduced in v198. 1.2 12.3 and older. The user needs to create a file /etc/systemd/system/${servicename}.service with 2 lines: [[[ .include /usr/lib/systemd/system/${servicename}.service .include /etc/systemd/system/${servicename}.service.d/limits.conf ]]] If the unit author decides he wants to support this out of the box, they can ship the limits.conf and include it in the /usr/lib/systemd/system/${servicename}.service. 2. sysvinit Ideally if you introduce this way to support per service ulimits, it should also work with init scripts. For this we propose a patch to rc.status which converts the systemd syntax into ulimit calls. It will also handle translations like infinity -> unlimited. This is tracked now in https://bugzilla.novell.com/show_bug.cgi?id=846178 -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
while we are at it. the same can use used for setting umask and environment variables and such: see man systemd.exec for more. -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, Oct 16, 2013 at 01:02:56PM +0200, Marcus Rueckert wrote:
/etc/systemd/system/${servicename}.service.d/limits.conf
the fileformat will be from man 5 systemd.conf. For setting the maxfilehandles. the file would look like.
[[[ [Service] LimitNOFILE=8192 ]]]
Todos:
1. systemd
1.1 on 13.1 or later: nothing. systemd will automerge all files in /etc/systemd/system/${servicename}.service.d/ when handling ${servicename}.service. Support for this was introduced in v198.
1.2 12.3 and older. The user needs to create a file /etc/systemd/system/${servicename}.service with 2 lines:
[[[ .include /usr/lib/systemd/system/${servicename}.service .include /etc/systemd/system/${servicename}.service.d/limits.conf ]]]
If the unit author decides he wants to support this out of the box, they can ship the limits.conf and include it in the /usr/lib/systemd/system/${servicename}.service.
2. sysvinit
Ideally if you introduce this way to support per service ulimits, it should also work with init scripts.
For this we propose a patch to rc.status which converts the systemd syntax into ulimit calls. It will also handle translations like infinity -> unlimited.
This is tracked now in https://bugzilla.novell.com/show_bug.cgi?id=846178
Hi Marcus, I am afraid I did not get the point. I do expect you are interested in openSUSE default, but in this case what is the advantage over simple installation dovecot.service with LimitNOFILE=8192? BTW: using /etc/systemd is reserved for system admin and packages shall install their content to /usr/lib/systemd instead. IOW if you are thinking about snippets installed with packages - all such snippets belongs to us^W/usr/lib/systemd. Regards Mihal Vyskocil
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 2013-10-17 13:53:08 +0200, Michal Vyskocil wrote:
I am afraid I did not get the point. I do expect you are interested in openSUSE default, but in this case what is the advantage over simple installation dovecot.service with LimitNOFILE=8192?
no. A user wanted a way to set the ulimit to something else than the default.
BTW: using /etc/systemd is reserved for system admin and packages shall install their content to /usr/lib/systemd instead. IOW if you are thinking about snippets installed with packages - all such snippets belongs to us^W/usr/lib/systemd.
well we can do that too. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
Marcus Rueckert
-
Michal Vyskocil