From owner-freebsd-current Thu Sep 30 2:44:17 1999 Delivered-To: freebsd-current@freebsd.org Received: from ns.oeno.com (ns.oeno.com [194.100.99.145]) by hub.freebsd.org (Postfix) with SMTP id C9C6514E82 for ; Thu, 30 Sep 1999 02:44:13 -0700 (PDT) (envelope-from will@ns.oeno.com) Received: (qmail 5814 invoked by uid 1001); 30 Sep 1999 09:44:12 -0000 Date: 30 Sep 1999 09:44:11 -0000 Message-ID: <19990930094411.5810.qmail@ns.oeno.com> From: Ville-Pertti Keinonen To: imp@village.org Cc: current@freebsd.org In-reply-to: <199909291540.JAA03116@harmony.village.org> (message from Warner Losh on Wed, 29 Sep 1999 09:40:26 -0600) Subject: Re: just found this Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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