From owner-freebsd-current@FreeBSD.ORG Thu Aug 25 03:57:23 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org 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 BC11016A41F for ; Thu, 25 Aug 2005 03:57:23 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A2DE43D49 for ; Thu, 25 Aug 2005 03:57:21 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id j7P3vEWM040961 for ; Wed, 24 Aug 2005 20:57:18 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200508250357.j7P3vEWM040961@gw.catspoiler.org> Date: Wed, 24 Aug 2005 20:57:14 -0700 (PDT) From: Don Lewis To: freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: Subject: Witness should be faster now :-) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 25 Aug 2005 03:57:23 -0000 I just committed a change to the witness code in HEAD (subr_witness.c 1.198) that speeds it up considerably. I ran three different tasks as benchmarks: cd /usr/src; make buildworld cd /usr/ports; make index cd /usr/ports/x11/gnome2; make clean I ran the benchmarks without the WITNESS options, with the original witness code, and with the new witness code. My test hardware is an Athlon XP 2400+ box with 1G of RAM, SCSI disks, NFS client, and the DEBUG_NFS_LOCKS kernel option. With this change, I'm seeing anywhere from a factor of 5.4 to a factor of 10.3 reduction in the system CPU time in the witness code. Enabling the original witness code increased the system CPU time by anywhere from 330% to 615%. With the new witness code, the system CPU time penalty for enabling witness dropped to about 60%, which was fairly consistent across the three benchmarks. Enabling the original witness code increased the wall time for these benchmarks anywhere from 69% (make buildworld) to 260%. With the new witness code, the wall time penalty decreased to the range 12% to 26%. If you've been disabling witness because of the large performance penalty, you may find that this is no longer necessary. I've got another potential performance boost in the hopper. I'll release it if it pans out. I'm planning on doing an MFC after 6.0-RELEASE.