Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Oct 2014 15:05:26 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Jim Bell <Jim@JC-Bell.com>
Cc:        freebsd-performance@freebsd.org
Subject:   Re: ar performing abysmally
Message-ID:  <20141014150526.GB32476@spindle.one-eyed-alien.net>
In-Reply-To: <543CBEB5.3020105@JC-Bell.com>
References:  <543CBEB5.3020105@JC-Bell.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141014150526.GB32476>