Unix 5.4 and ulimit

john.urban urban at cbnewsl.att.com
Wed Apr 24 00:57:02 AEST 1991


In article <1186 at applix.com> scotte at applix.UUCP (Scott Evernden) writes:
>In article <1991Apr21.140740.6766 at gold.sub.org> root at gold.sub.org (Christian Seyb) writes:
>>Hello,
>>
>>I am using Unix 5.4 (4.0.2) and have a problem with ulimit.
>
>Upping your ulimit is described in the FAQ for this group.  I quote: "
>
>    1. If your desired limit is > 12288(6MB):
>
>        Edit /etc/conf/cf.d/mtune to change the following line:
>            ULIMIT          3072    2048    12288
>        to:
>            ULIMIT          3072    2048    xxxxx
>
>        where xxxxx is the limit you desire.
>
>    2. Edit /etc/conf/cf.d/stune to add/change the following line:
>
>        ULIMIT  xxxxx
>
>       where xxxxx is the limit you desire.  Note that this step can
>       be performed in the kernel configuration software (i.e.: kconfig
>       for 386/ix).
>
>    3. Edit /etc/default/login to delete the ULIMIT line.
>
>    4. Rebuild the kernel and reboot.
>

The FAQ answer for ulimit is not correct for UNIX System V Release 4.0.
In 4.0, ULIMIT has been replaced by [SH]FSZLIM.
SFSZLIM - Soft File SiZe LIMit  and
HFSZLIM - Hard File SiZe LIMit.

In the mtune file, SFSZLIM and HFSZLIM are in hex.  The currect values (for
UNIX System V/386 Release 4.0) are: 0x200000 -> 2097152.

So therefore these "rule" above change to ...
	1) If your desired limit is > 12288(6MB -> 6291456)
	   There is no need to modify your mtune file, since the maximum file
	   size is 0x7FFFFFFF (2147483647 bytes or 4194303 512 byte blocks)

	   As we recall the layout in the mtune file is:
		Kernel Variable<TAB>Current Value<TAB>Lowest Value<TAB>Highest Value
	   The values for SFSZLIM/HFSZLIM are:
		SFSZLIM	0x200000	0x100000	0x7FFFFFFF
		HFSZLIM	0x200000	0x100000	0x7FFFFFFF

	2) Run idtune(1M) (or edit /etc/conf/cf.d/stune directly)
		/etc/conf/bin/idtune SFSZLIM <new value in hex>
		/etc/conf/bin/idtune HFSZLIM <new value in hex>

	   e.g. to be able to make 10 Meg files ...
		/etc/conf/bin/idtune SFSZLIM 0xA00000
		/etc/conf/bin/idtune HFSZLIM 0xA00000

	3) Edit /etc/default/login to delete the ULIMIT line

	4) Rebuild the kernel and reboot
		cd /
		/etc/conf/bin/idbuild && /etc/conf/bin/idreboot


Sincerely,

John Urban



More information about the Comp.bugs.sys5 mailing list