Setting hard limits

From: Alyssa Ross <hi_at_alyssa.is>
Date: Sat, 06 Dec 2025 18:56:10 +0100

The documentation for s6-softlimit -H says:

        set the hard limit (as well as the soft limit). This is only
        usable by root if you're raising the limit, and should generally
        not be used, except once at boot time. The "hard limit" should
        be a system-wide setting that is never touched after being set
        once.

… but it doesn't really explain why? Could you perhaps elaborate? My
instinct would be that it's better to set both limits in as tight a
scope as possible. Usually, if I'm raising a limit, I have one specific
process in mind that needs the high limit, so raising the limit for only
that process protects against unexpected resource overuse by other
processes. That would of course be less likely if other processes still
had to raise their soft limit first, but the documentation also tells me
there's "virtually no reason" to ever raise the hard limit without also
raising the soft limit.

Received on Sat Dec 06 2025 - 18:56:10 CET

This archive was generated by hypermail 2.4.0 : Sat Dec 06 2025 - 18:57:11 CET