From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 10:28:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEE7E106566C; Mon, 26 Dec 2011 10:28:21 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6078FC08; Mon, 26 Dec 2011 10:28:21 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pBQASKqL062162; Mon, 26 Dec 2011 11:28:20 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pBQASK1V062161; Mon, 26 Dec 2011 11:28:20 +0100 (CET) (envelope-from marius) Date: Mon, 26 Dec 2011 11:28:20 +0100 From: Marius Strobl To: Doug Barton Message-ID: <20111226102820.GT90831@alchemy.franken.de> References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF645D2.8080407@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2011 10:28:22 -0000 On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: > On 12/24/2011 04:16, Marius Strobl wrote: > > On FreeBSD just use the MD5 implementation of libmd rather than that of > > libcrypto so we don't need to relinquish csup when world is built without > > OpenSSL. > > Did you benchmark this at all? I agree that keeping csup available > absent openssl is a good goal, but csup is a prototypical "tool that > does the same thing many thousands of times" so even tiny regressions > could add up to a large cost in wall clock time. Well, in a real world test updating the same base on an amd64 machine connected to the Internet via Fast Ethernet from a national mirror with csup once linked against libcrypto and once against libmd and also with CVSup the csup linked against libmd actually was fasted with 29:51.37, followed by CVSup with 32:07.52 and csup linked against libcrypto with 34:49.88. This was with the libmd run done after the libcrypto run so in theory the former might even have picked up some more deltas than the latter. On the other hand the MD5 implementation of libmd is known to be 18-20% slower at least on x86 that that of libcrypto (probably due to its assembler implementation). I only can reliably reproduce that when checksumming files starting in the several hundreds MB range, at least when they are on disk. So in order to also see that slowdown with csup linked against libmd I guess you'd at least need some artificial setup with both server and client being on the LAN and having the repositories on memory backed disks, if at all possible. Using the libmd MD5 implementation for csup doesn't seem to have a real world impact though. > > If the openssl version is faster, then conditionalizing where to get md5 > is probably the right answer. > If we really cared about the MD5 performance of applications linked against libmd (including md5(1)), we should just optimize that MD5 implementation rather than working around it. Also for csup, fixing the problem that is causing it to fetch whole files over and over again likely would improve its performance way more than using a different MD5 implementation could do. Marius