SUMMARY: unlimited is not without limit

From: Daniel Clar <Daniel.Clar_at_supelec.fr>
Date: Tue, 09 Jun 1998 17:00:36 +0200

The original question was :

> Hello managers,
>
> When I issue the following command :
>
> limit datasize unlimited
>
> The result is :
>
> limit datasize
> datasize 1048576 kbytes
>
> Why is it always limited where cputime and filesize are well registered as
> unlimited ?

Thank you to the dozen of people who have answered, I give you here Tom
Blinn's answer.

From: "Dr. Tom Blinn, 603-884-0646" <tpb_at_zk3.dec.com>

As root, you can probably increase it for your process or any subprocess you
create. As a general user, the system limit has to be increased.

Looking at the code in the kernel, the hard limit appears to be taken from a
data structure called vm_initial_limit_data.rlim_max which is defined in
some other place in the kernel.

In fact, it's defined in kernel/conf/param.c, this way:

struct rlimit vm_initial_limit_data = { DFLDSIZ, MAXDSIZ };

in other words, it's set from the two parameters which can be in your kernel
configuration file. I believe it's also configurable with sysconfig; let me
look a bit further..

Yes, in the proc subsystem, there's a couple of parameters called
"per-proc-stack-size" and "max-per-proc-stack-size"

They can be set in /etc/sysconfigtab and queried with sysconfig, but you
have to reboot to change them.

So, use sysconfig -q proc to verify the names, then add the "max" one to
your /etc/sysconfigtab (use sysconfigdb to edit it if you're not used to
doing it correctly with a text editor) increasing the value to what you
need. You can increase the default if you want as well, but the default
affects every process. The max and default are probably the same unless you
change them.
Received on Tue Jun 09 1998 - 17:04:39 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT