From owner-freebsd-performance@FreeBSD.ORG Tue Oct 14 06:22:04 2014 Return-Path: Delivered-To: freebsd-performance@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 ABBD0BD6 for ; Tue, 14 Oct 2014 06:22:04 +0000 (UTC) Received: from jc-bell.com (jc-bell.com [199.233.228.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 839E7CAD for ; Tue, 14 Oct 2014 06:22:04 +0000 (UTC) Received: from [10.0.0.6] (c-71-201-200-75.hsd1.il.comcast.net [71.201.200.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jim@jc-bell.com) by jc-bell.com (Postfix) with ESMTPSA id 9E6CEEDECB for ; Tue, 14 Oct 2014 01:12:27 -0500 (CDT) Message-ID: <543CBEB5.3020105@JC-Bell.com> Date: Tue, 14 Oct 2014 01:12:05 -0500 From: Jim Bell Organization: J. C. Bell & Associates, Inc. User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: freebsd-performance@freebsd.org Subject: ar performing abysmally Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 06:22:04 -0000 Upgraded to FreeBSD-10/gcc48. One project puts a dozen object files in a static lib via ar, but now that takes a long time, and it's not CPU. “time ar -v -c -u -q ...” : 362.62 real 0.11 user 0.82 sys. “time ar -v -c -r -u -s ...”: 407.94 real 0.13 user 0.80 sys iostat's numbers don't look to impressive to me, but my ISP says they're normal. 'dd' writes to the disk plenty fast. I moved off the RAID-1 but it made no difference. I have 64G swap and it doesn't get touched. Truss shows it reading the input files and writing the output, but write times are all over the place. truss -D ... 0.000031869 write(3,...,10240) = 10240 (0x2800) 0.083054581 write(3,...,10240) = 10240 (0x2800) 0.000029723 write(3,...,10240) = 10240 (0x2800) 0.841429575 write(3,...,10240) = 10240 (0x2800) <-- seems pretty slow! 0.000015954 write(3,...,10240) = 10240 (0x2800) 0.000022723 write(3,...,10240) = 10240 (0x2800) Truss shows 800 write's that take over 0.7 sec, similar to the above. Where's my problem? What to try next? Is it even the disk? Thanks in Advance, -Jim From owner-freebsd-performance@FreeBSD.ORG Tue Oct 14 15:05:33 2014 Return-Path: Delivered-To: freebsd-performance@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 86190BF2 for ; Tue, 14 Oct 2014 15:05:33 +0000 (UTC) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) by mx1.freebsd.org (Postfix) with ESMTP id 626109D1 for ; Tue, 14 Oct 2014 15:05:33 +0000 (UTC) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id E41625A9F24; Tue, 14 Oct 2014 15:05:26 +0000 (UTC) Date: Tue, 14 Oct 2014 15:05:26 +0000 From: Brooks Davis To: Jim Bell Subject: Re: ar performing abysmally Message-ID: <20141014150526.GB32476@spindle.one-eyed-alien.net> References: <543CBEB5.3020105@JC-Bell.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2B/JsCI69OhZNC5r" Content-Disposition: inline In-Reply-To: <543CBEB5.3020105@JC-Bell.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-performance@freebsd.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 15:05:33 -0000 --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 14, 2014 at 01:12:05AM -0500, Jim Bell wrote: > Upgraded to FreeBSD-10/gcc48. One project puts a dozen object files in a= =20 > static lib via ar, but now that takes a long time, and it's not CPU. >=20 > ?time ar -v -c -u -q ...? : 362.62 real 0.11 user 0.82 sys. > ?time ar -v -c -r -u -s ...?: 407.94 real 0.13 user 0.80 sys >=20 > iostat's numbers don't look to impressive to me, but my ISP says they're= =20 > normal. 'dd' writes to the disk plenty fast. I moved off the RAID-1 but= =20 > it made no difference. I have 64G swap and it doesn't get touched. >=20 > Truss shows it reading the input files and writing the output, but write= =20 > times are all over the place. truss -D ... > 0.000031869 write(3,...,10240) =3D 10240 (0x2800) > 0.083054581 write(3,...,10240) =3D 10240 (0x2800) > 0.000029723 write(3,...,10240) =3D 10240 (0x2800) > 0.841429575 write(3,...,10240) =3D 10240 (0x2800) <-- seems pretty slow! > 0.000015954 write(3,...,10240) =3D 10240 (0x2800) > 0.000022723 write(3,...,10240) =3D 10240 (0x2800) >=20 > Truss shows 800 write's that take over 0.7 sec, similar to the above. >=20 > Where's my problem? What to try next? Is it even the disk? If you want to eliminate the disk as possible source I'd try doing the ar run on a memory disk if the inputs will fit (you should be able to send the output to /dev/null). It's worth noting that ar doesn't really do anything particularly complicated, the FreeBSD one is implemented in libarchive. With newer gcc ports it is possiable that you're using the GNU ar from devel/binutils which may be doing something more complex for some reason. -- Brooks --2B/JsCI69OhZNC5r Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlQ9O7YACgkQXY6L6fI4GtSxLgCgrpspEI/uCg0zOUSo8xHLeBaf cVcAoMW1YJKfU4lZKfh3BlZOx7dY1hYg =WLmF -----END PGP SIGNATURE----- --2B/JsCI69OhZNC5r-- From owner-freebsd-performance@FreeBSD.ORG Wed Oct 15 03:23:13 2014 Return-Path: Delivered-To: freebsd-performance@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 79C7E1AC; Wed, 15 Oct 2014 03:23:13 +0000 (UTC) Received: from jc-bell.com (jc-bell.com [199.233.228.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 534C410F; Wed, 15 Oct 2014 03:23:13 +0000 (UTC) Received: from [10.0.0.6] (c-71-201-200-75.hsd1.il.comcast.net [71.201.200.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jim@jc-bell.com) by jc-bell.com (Postfix) with ESMTPSA id 84308ED590; Tue, 14 Oct 2014 22:23:11 -0500 (CDT) Message-ID: <543DE88F.1050608@JC-Bell.com> Date: Tue, 14 Oct 2014 22:22:55 -0500 From: Jim Bell Organization: J. C. Bell & Associates, Inc. User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Brooks Davis Subject: Re: ar performing abysmally References: <543CBEB5.3020105@JC-Bell.com> <20141014150526.GB32476@spindle.one-eyed-alien.net> In-Reply-To: <20141014150526.GB32476@spindle.one-eyed-alien.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 03:23:13 -0000 On 2014-10-14 10:05 AM, Brooks Davis wrote: > On Tue, Oct 14, 2014 at 01:12:05AM -0500, Jim Bell wrote: >> ... >> >> ?time ar -v -c -u -q ...? : 362.62 real 0.11 user 0.82 sys. >> ?time ar -v -c -r -u -s ...?: 407.94 real 0.13 user 0.80 sys >> >> ... > If you want to eliminate the disk as possible source I'd try doing the ar > run on a memory disk if the inputs will fit (you should be able to send > the output to /dev/null). Thanks for the input! ar doesn't like /dev/null, but I set up a ramdisk and that works great! time ar -v -c -r -u -s ... 0.70 real 0.10 user 0.34 sys Not bad for a 77MB lib.a file. > It's worth noting that ar doesn't really do anything particularly > complicated, ... Yeah, truss indicated it wasn't doing much but writing. Any pointers for what's killing my disk writes? I'll hound my ISP, but would love help from folks here. Thanks again, -Jim