Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2005 09:21:34 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        "Chad Leigh -- Shire.Net LLC" <chad@shire.net>
Cc:        List Free Bsd <freebsd-questions@freebsd.org>
Subject:   Re: how to change process limits?
Message-ID:  <20050311152134.GB92140@dan.emsphone.com>
In-Reply-To: <70c49547938734897f0b8d3376ce38f1@shire.net>
References:  <00ce60d0ae670341dbd028c4cab204ff@shire.net> <20050310214644.GH9663@dan.emsphone.com> <70c49547938734897f0b8d3376ce38f1@shire.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Mar 10), Chad Leigh -- Shire.Net LLC said:
> On Mar 10, 2005, at 2:46 PM, Dan Nelson wrote:
> >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
> 
> Should I be able to do a sysctl to look at their current values?  On my 
> 5.3 and my 4.9 systems, there are no kern.max%siz listed at all (% = d 
> or s) to inspect.

You would be able to if they were sysctls, but they're just tunables.
You can see what tunables are set by running "kenv", but that only
shows entries that you or the kernel have explicitly set.  Personally,
I think all the TUNABLE_*_FETCH variables in /sys/kern/subr_parm.c
should be sysctls with the CTLFLAG_TUN flag set, so they are visible as
both tunables and sysctls.  Some currently have sysctl nodes created in
other places (kern.maxfiles is in /sys/kern/kern_descrip.c, for
example), but many don't.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050311152134.GB92140>