Skip site navigation (1)Skip section navigation (2)
Date:      30 Sep 1999 09:44:11 -0000
From:      Ville-Pertti Keinonen <will@iki.fi>
To:        imp@village.org
Cc:        current@freebsd.org
Subject:   Re: just found this
Message-ID:  <19990930094411.5810.qmail@ns.oeno.com>
In-Reply-To: <199909291540.JAA03116@harmony.village.org> (message from Warner Losh on Wed, 29 Sep 1999 09:40:26 -0600)

next in thread | previous in thread | raw e-mail | index | archive | help

> It wasn't a problem in -current due to a different way that things
> were done there.

What things, exactly?  I haven't noticed any differences in
vfs_cache.c or vfs_subr.c that should affect the caching behavior, so
it must just be that the system survives a large amount of wired down
memory better.

> : Really large numbers of hardlinks are probably rare enough, but the
> : default limit of 4 seems a bit low, it should probably be at least as
> : high as the maximum link count encountered on a normal installation.
> : There are other ways to hold down at least as much memory per file you
> : can keep open as with the limit of 4.
> 
> I think phk's idea in this area are likely the best way to deal.

BTW: None of the solutions address this slower, but simpler attack,
easily described using a Bourne Shell command line:

    $ while mkdir t; do cd t; done

The shell version seems to waste lots of memory so it may die before
it has wired down a significant amount of vnodes (I've also managed to
create an unkillable process this way in 3.2, but I think this is
something that was recently fixed), but the equivalent C program runs
until the filesystem fills up, the user's quota is exeeded or, most
commonly, until too many vnodes have been allocated and the machine
locks up.

It can take quite a while, though.  Creating lots of directories seems
slow, even with softupdates.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990930094411.5810.qmail>