On 2018/05/31 10:06, Marco van Hulten wrote:
> Stuart,
>
> On 29 May 14:18 Stuart Henderson wrote:
> > On 2018-05-28, Marco van Hulten <Marco.Hulten@uib.no> wrote:
> > >> Sounds like ether you're running out of system memory, or running
> > >> into ulimit limits.
> > >
> > > `ulimit` == unlimited
> >
> > ulimit [-acdfHlmnpSst
> > [value]] ... Display or set process limits. If no options are used,
> > the file size limit (-f) is assumed.
> >
> > What does ulimit -a say?
>
> I now see there are some limits (root, using ksh):
>
> # ulimit -a
> time(cpu-seconds) unlimited
> file(blocks) unlimited
> coredump(blocks) unlimited
> data(kbytes) 33554432
> stack(kbytes) 8192
> lockedmem(kbytes) 5303876
> memory(kbytes) 15888388
> nofiles(descriptors) 128
> processes 1310
>
> and as normal user, using Bash:
>
> $ ulimit -a
> core file size (blocks, -c) unlimited
> data seg size (kbytes, -d) 786432
> file size (blocks, -f) unlimited
> max locked memory (kbytes, -l) 5303876
> max memory size (kbytes, -m) 15888388
> open files (-n) 512
> pipe size (512 bytes, -p) 1
> stack size (kbytes, -s) 4096
> cpu time (seconds, -t) unlimited
> max user processes (-u) 128
> virtual memory (kbytes, -v) 790528
Limits are grouped by login class (5th field in master.passwd). root is
usually in "daemon" and the initial user created during install is in
"staff" (default 1.5GB for datasize-cur, no limit for datasize-max).
Users that you've added separately are likely to be in the default class
(768MB datasize-cur and datasize-max).
datasize-cur is a "soft limit", a user can increase it themselves with
"ulimit -d <value>" up to the hard limit in datasize-max.
I'd start by putting the relevant user/s into "staff" class (as root,
vipw, or "chsh <user>" and edit the Class: line), logout/login and
retry. If it needs more than this, it maybe better to raise the soft
limit for the individual program by using a shell alias or wrapper
script rather than raising it across the board (OpenBSD doesn't cope
very well if the entire system runs out of memory and this is a useful
brake on runaway processes). For example you could use an alias like
this:
alias firefox="(ulimit -d $((3*1024*1024)); /usr/local/bin/firefox)"
> Apropos, why doesn't "apropos ulimit" show up ksh(1)? Only shortly
> after typing "which ulimit", I realised that ulimit is part of the
> shell.
By default apropos searches in manual page names and descriptions,
but not the rest of the manual. OpenBSD manuals have rich semantic
layout and you can search on various types of identifier; try apropos or
"man -k" with either of these:
Ic=ulimit
any=ulimit
No comments:
Post a Comment