From owner-freebsd-current@FreeBSD.ORG Sat Sep 4 17:23:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A870E16A4CE; Sat, 4 Sep 2004 17:23:44 +0000 (GMT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CF6043D3F; Sat, 4 Sep 2004 17:23:44 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) i84HNila046253; Sat, 4 Sep 2004 10:23:44 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id i84HNi4Q046252; Sat, 4 Sep 2004 10:23:44 -0700 (PDT) (envelope-from dillon) Date: Sat, 4 Sep 2004 10:23:44 -0700 (PDT) From: Matthew Dillon Message-Id: <200409041723.i84HNi4Q046252@apollo.backplane.com> To: Don Lewis References: <200409040709.i8479U79031043@gw.catspoiler.org> cc: freebsd-current@FreeBSD.org Subject: Re: what is fsck's "slowdown"? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2004 17:23:44 -0000 :This sort of thing was my initial thought, but the posted CPU usage :statistics show that fsck is burning up most of its CPU cycles in :userland. : :>> load: 0.99 cmd: fsck 67 [running] 15192.26u 142.30s 99% 184284k : :Increasing MAXBUFSPACE looks like it would make the problem worse :because getdatablk() does a linear search. Oh my. I didn't even notice. That code dates all the way back to 1994 so I wont bash the author too badly, but it is pretty aweful coding. Hashing the buffer cache is trivial. I'll do it for DragonFly and post the patch as a template for you guys to do it in FreeBSD (or you could just do it on your own, it really does look trivial). -Matt Matthew Dillon