Subject: Re: Speeding up "pstat -T"
To: David Laight <david@l8s.co.uk>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 10/03/2003 12:50:09
Thus spake David Laight ("DL> ") sometime Today...
DL>
DL> On Fri, Oct 03, 2003 at 09:42:37AM -0700, Jonathan Stone wrote:
DL> >
DL> > > |
DL> > > | The "fixed" is the unacceptable part. (Myself, I would support increasing
DL> > > | the current default limit, but that is *not* what you said.)
DL> > >
DL> > >I suspect the "fixed" in the original was not meant as you have interpreted
DL> > >it, but in contrast to "whatever max vnodes happens to be".
DL> >
DL> > If so, then someone needs a short sharp shock^H^H^H^H^H reminder that
DL> > sockets count as open fds, too. The apps I mentioned opening 6,000 to
DL> > 10,000 fds in a single process were opening thousands of network sockets.
DL>
DL> Yes, and you can arrange for that process to run with a higher limit.
DL> The problem at the moment is that it is possible for any user to write
DL> a program that uses all the files. This just shouldn't be allowed.
DL> Also the default default limit ought to be a netbsd constant, not depend
DL> on MAXUSERS.
Okay, I'm seeing two different things, here, vnodes and fds; which is
it at this point?
If it's vnodes, keep in mind that this is the size of the vnode *cache*,
last I knew (which was, admittedly, a few years back), in which case
it's not a bad thing for that to be full. It doesn't mean you can't
open anything.
On the other hand, if you're looking at descriptors, that *is* a limit,
and if you've got m/n files open where m -> n very closely, you should
probably tune your kernel/use sysctl to handle this.
MAXUSERS, from my POV, should probably be deprecated somehow, as
*very* few places timeshare anymore (yes, I know, "user" in this context
indicates "interactive session" -- one per app-window, and "one for the
pot").
With regard to usage limits, I note they do seem to apply per-process;
would it not make more sense to restrict them per-user as well? I
seem to remember that some resources were described in this manner,
but I don't know if it was ever really implemented this way.
["But I'm probably on crack again."]
--*greywolf;
--
NetBSD: We're so committed to it being free, we won't sell it to you
even if you ask!