how to change process limits?
Dan Nelson
dnelson at allantgroup.com
Thu Mar 10 13:46:45 PST 2005
In the last episode (Mar 09), Chad Leigh -- Shire.Net LLC said:
> The following is aon 5.3-RELEASE-p5
>
> If I do a limits command I get
>
> # limits
> Resource limits (current):
> datasize 524288 kb
> stacksize 65536 kb
> #
>
> However, login.conf has (and no other classes defined)
>
> default:\
> :datasize=unlimited:\
> :stacksize=unlimited:\
>
> I am wondering where the datasize and stacksize get set. These have
> limits when listed with "limits" but they do not appear to be getting
> set through login as the login.conf has unlimitged.
I believe those are extra-hard limits enforced by the kernel. You can
raise them by adding this to /boot/loader.conf:
kern.maxdsiz=2147483648
kern.maxssiz=2147483648
Then you can edit login.conf to set whatever soft and hard limits you
want (remember to run "cap_mkdb /etc/login.conf" when you're done).
I'm not exactly sure why those limits are boot-time tunables as opposed
to regular sysctls, or why they exist at all.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-questions
mailing list