[illumos-Discuss] Resource limits for a service
Albert Lee
trisk at opensolaris.org
Fri May 13 17:28:34 PDT 2011
On Wed, May 11, 2011 at 6:01 AM, Andrej Podzimek <andrej at podzimek.org> wrote:
> Hello,
>
> there seems to be a 10MB hard limit on stack size. I could not find any
> documentation that would describe how to change this limit for selected SMF
> services. Of course, ulimit and prctl seem to be capable of setting these
> values for the current shell. However, SMF completely ignores all the
> settings and uses the default hard limit, no matter where svcadm is invoked.
>
svcadm is merely a remote control for SMF, its environment doesn't
affect the service.
> What I need to achieve:
> * keep the default limits for most of the system
> * relax some limits (stack size, shared segment size, ...) for some
> standard services launched via SMF
>
> How can this be done? A link to a piece of documentation would be very
> helpful.
>
The context for SMF "method" commands is specified in the SMF manifest
[1], but I think you have to use a project(4) project or "resource
pool" to define resource controls. Not sure why you can't directly set
resource controls, since it seems like an obvious thing to specify in
the context.
Alternatively (and possibly actually better since it doesn't rely on
external configuration), make the "start" method a script that runs
ulimit.
-Albert
[1] See smf_method(5).
More information about the Discuss
mailing list