From owner-freebsd-stable@FreeBSD.ORG Sat Mar 21 00:16:14 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D50D7820; Sat, 21 Mar 2015 00:16:14 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4175E1B7; Sat, 21 Mar 2015 00:16:14 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2L0Fx0Q086042 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Mar 2015 02:15:59 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2L0Fx0Q086042 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2L0Fxsa086040; Sat, 21 Mar 2015 02:15:59 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 21 Mar 2015 02:15:59 +0200 From: Konstantin Belousov To: d@delphij.net Subject: Re: RELENG_10 performance regression (was Re: 35-40% performance drop releng9 vs releng10 openvpn Message-ID: <20150321001559.GB2379@kib.kiev.ua> References: <5506250A.2000506@sentex.net> <20150316132055.GQ32288@funkthat.com> <5509D6C6.4050204@sentex.net> <20150318211457.GL51048@funkthat.com> <550B6950.8060806@sentex.net> <550C5AAF.9060502@sentex.net> <550C8AEE.4090408@sentex.net> <550CB306.7030405@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <550CB306.7030405@delphij.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: John-Mark Gurney , FreeBSD-STABLE Mailing List , John Baldwin X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2015 00:16:14 -0000 On Fri, Mar 20, 2015 at 04:53:42PM -0700, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 03/20/15 14:02, Mike Tancsa wrote: > > OK, I think I found where the RELENG_10 performance loss happened. > > It seems > > https://lists.freebsd.org/pipermail/svn-src-stable-10/2015-March/004778.html > > > > is the issue. > > > > Testing with a kernel from r279796 I get 76-77Mb of throughput. > > With r279848 it drops to about 60Mb > > Hrm, looking at 'diffgraph.svg', it suggest that writing through devfs > have incurred a tax on writev(2), which is basically this codepath, if > my reading is correct, in sys/fs/devfs/devfs.c: > > 1676 static int > 1677 devfs_write_f(struct file *fp, struct uio *uio, struct ucred > *cred, > 1678 int flags, struct thread *td) > 1679 { > ... > 1703 if (uio->uio_resid != resid || (error == 0 && resid != > 0)) { > 1704 vfs_timestamp(&dev->si_ctime); > 1705 dev->si_mtime = dev->si_ctime; > 1706 } > > Further looking at the code, in devfs vfs_timestamp() is also called > when reading from a device node. When the setting was 0, the code > would return time_second directly instead of attempting to read the > timestamp. > > For the purpose of devfs, does it make sense to bump timestamps like > normal filesystems for each read/write operation? Looks like Mac OS X > will bump timestamps for each operation but Debian don't. First question is, what timecounter hardware is used. I would accept some slowdown from hardware like HPET, but it is indeed surprising if caused by TSC.