From owner-freebsd-current@FreeBSD.ORG Thu Aug 25 12:28:26 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 A665716A41F; Thu, 25 Aug 2005 12:28:26 +0000 (GMT) (envelope-from marcus@corp.grupos.com.br) Received: from mail.grupos.com.br (mail.grupos.com.br [200.203.183.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 358BD43D53; Thu, 25 Aug 2005 12:28:25 +0000 (GMT) (envelope-from marcus@corp.grupos.com.br) Received: from corp.grupos.com.br (unknown [150.162.166.55]) by mail.grupos.com.br (Postfix) with ESMTP id 369E011E141; Thu, 25 Aug 2005 09:28:24 -0300 (BRT) Received: from [150.162.166.51] (unknown [150.162.166.51]) by corp.grupos.com.br (Postfix) with ESMTP id 002AC5666; Thu, 25 Aug 2005 09:28:23 -0300 (BRT) Message-ID: <430DB967.9090704@corp.grupos.com.br> Date: Thu, 25 Aug 2005 09:28:23 -0300 From: Marcus Grando User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050722) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Don Lewis References: <200508250357.j7P3vEWM040961@gw.catspoiler.org> <050825142457E.10162@www.mmlab.cse.yzu.edu.tw> In-Reply-To: <050825142457E.10162@www.mmlab.cse.yzu.edu.tw> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: Re: 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 12:28:26 -0000 MFC to RELENG_6? Regards Tai-hwa Liang wrote: > On Wed, 24 Aug 2005, Don Lewis wrote: > >> 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. > > > Thank you. This patch _does_ help me a lot! Before this change, copying > files over smbfs was really a PITA -- about 22x slowdown from my > observation > (1.6GHz Pentium M laptop): > > smbhost> ls -la nostalgia.pdf > -rw-r--r-- 1 avatar users 1247512 2005-06-06 09:27 nostalgia.pdf > > * WITNESS disabled(cvsup'ed on Aug-23-2005) > > bsdhost /mnt/samba# dd if=nostalgia.pdf of=/mnt/mfs/x 2436+1 records in > 2436+1 records out > 1247512 bytes transferred in 1.346903 secs (926208 bytes/sec) > bsd host /mnt/samba# dd if=nostalgia.pdf of=/mnt/mfs/x > 2436+1 records in > 2436+1 records out > 1247512 bytes transferred in 1.318945 secs (945841 bytes/sec) > > * WITNESS enabled(same source tree) > > bsdhost /mnt/samba# dd if=nostalgia.pdf of=/mnt/mfs/x > 2436+1 records in > 2436+1 records out > 1247512 bytes transferred in 30.512210 secs (40886 bytes/sec) > bsdhost /mnt/samba# dd if=nostalgia.pdf of=/mnt/mfs/x > 2436+1 records in > 2436+1 records out > 1247512 bytes transferred in 30.111005 secs (41430 bytes/sec) > > * WITNESS enabled(same source tree + subr_witness.c:1.198) > > bsdhost /mnt/samba# dd if=nostalgia.pdf of=/mnt/mfs/x > 2436+1 records in > 2436+1 records out > 1247512 bytes transferred in 1.629300 secs (765674 bytes/sec) > bsdhost /mnt/samba# dd if=nostalgia.pdf of=/mnt/mfs/x > 2436+1 records in > 2436+1 records out > 1247512 bytes transferred in 1.636264 secs (762415 bytes/sec) > -- Marcus Grando Grupos Internet S/A marcus(at)corp.grupos.com.br