ar performing abysmally

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ar performing abysmally

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

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ar performing abysmally

Brooks Davis-2
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
> 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?
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

attachment0 (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ar performing abysmally

Jim Bell


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


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"