Subject: Re: what's the right default for RLIMIT_NPROC?
To: None <tech-kern@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-kern
Date: 12/07/2002 17:49:14
[ On Saturday, December 7, 2002 at 01:13:47 (-0500), Thor Lancelot Simon wrote: ]
> Subject: Re: Fork bomb protection patch
>
> Have you _really_ seen more than 80 processes consumed by a single desktop?
> I'd be curious to know what was running.

At the moment I happen to have 28 procs on my workstation and 54 on my
CPU server, which for other people might be combined onto one machine.
This is while just running "idle" with some xterms, mozilla, and my
editor, a few X11 toys, etc. (i.e. while not compiling and not doing CVS
stuff and not reading manuals, etc.).  I use ctwm and don't run anything
like OpenOffice or what have you.

I.e. 80 wasn't enough for me, though 160 probably would be (I currently
grant myself a max of 500, but then I'm quite a process pig sometimes
when running tests and multiple compiles and such! ;-)

>  In any case, generally speaking
> one does not run huge numbers of X applications on a timesharing host;

Well I suppose it depends on just what you have on the desktops....

Here at home I have Xterms where everything but Xserver runs on the CPU
host, and even on my diskless workstation I generally don't run anything
but the xclocks and window manager and such on the desktop host.

As another example I did some work for a week or two on the big Pyramid
OSx and DC/OSx development servers at Pyramid a bunch of years ago.  At
Pyramid almost every developer was quite a power user and IIRC everyone
had something like an NCD or two on their desk and they all used one or
both of these two machines for at least some of their tasks.  Everyone
ran at least some of their X applications on the servers.

They were slow enough at times though, and the LAN conjested enough (it
may even have only been 10baseT, though I don't remember for sure), that
I generally either ran the NCD window manager on the terminal, or else
ran it on one machine while working on the other, and often I used the
terminal's telnet client instead of xterm, and one of the sysadmins once
chastised me for running xclock with one-second updates. ;-)

I don't remember what the rlimits on those systems were, or what the
kernel tuning parameters and table sizes were, but the entire process
list on each machine was usually quite long and sometimes sky-rocketed
to quite amazing sizes (I seem to remember counting close to twenty
thousand processes, though I may be mistaken).  Those two machines were
no slouches for their day, but in some ways (namely CPU speed and memory
capacity) don't even compare to high-end desktops of today.  Meanwhile
they chugged along quite well even when pushed to the limit.

I don't know how common Xterminal-only shops are these days though....

> and
> we have login classes to apply resource limits for different kinds of users.

exactly!  ;-)

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>