Re: ulimit with openbsd problem

From: Jérémie Courrèges-Anglas <jca_at_wxcvbn.org>
Date: Mon, 19 May 2014 14:03:54 +0200

Mike Jackson <mj_at_netauth.com> writes:

> Hi,

Hi,

> I've replaced /sbin/init with runit's init, and starting every other
> service (ssh, getty, etc) with runsv.

I wish you good luck at 5.5 upgrade time. ;)

> Following instructions on this page to raise open file limit to 4096:
>
> https://code.google.com/p/go-wiki/wiki/OpenBSD
>
>
> The result has actually decreased nofiles from the default of 128 to 64:
>
> ulimit -a
> time(cpu-seconds) unlimited
> file(blocks) unlimited
> coredump(blocks) unlimited
> data(kbytes) 8388608
> stack(kbytes) 8192
> lockedmem(kbytes) 1012212
> memory(kbytes) 3032028
> nofiles(descriptors) 64
> processes 1310
>
>
> # sysctl kern.maxfiles
> kern.maxfiles=12328
>
> Any advice as how to actually raise the limit? Of course running
> ulimit -n 4096 as root at the command line works, so I am guessing the
> reason it's not taking effect with login is runit related...

I don't think so.

The wiki page you're reading is about OpenBSD 5.4-current, I assume it
has been written before this change:

  http://www.openbsd.org/faq/upgrade54.html#login.conf

Add an "openfiles-max" entry (>= 4096) or just use "openfiles" to
specify both. Note that the value for "default" and "staff" have since
been bumped to 512.

Also I'd advise against using /etc/login.conf.db, it's only useful for
very large sites, it just gets in the way elsewhere.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
Received on Mon May 19 2014 - 12:03:54 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC