Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jun 2010 17:56:27 -0400
From:      Nick Rogers <ncrogers@gmail.com>
To:        Max Laier <max@love2party.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: arp(8) performance w/ many aliases assigned to an interface
Message-ID:  <AANLkTilr85LkICGxU0B-Bjr5cDcUhOYjEykOhzGRWRGQ@mail.gmail.com>
In-Reply-To: <201006092330.30750.max@love2party.net>
References:  <AANLkTikLZCREKNUdon_kRHtzvPkk-XbbXF9ghUuBjoGw@mail.gmail.com> <201006092321.05453.max@love2party.net> <201006092330.30750.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help
That worked great:

[root@ /usr/src/usr.sbin/arp]# time /usr/sbin/arp -na | wc -l
    4100

real 0m14.850s
user 0m3.187s
sys 0m11.416s
[root@ /usr/src/usr.sbin/arp]# time ./arp -na | wc -l
    4100

real 0m0.046s
user 0m0.022s
sys 0m0.023s

Thanks a lot, I have been trying to get a meaningful response on this issue
for about a week now. Guess I finally got the right list. Thanks again!

Can this change make it into 8.1-RELEASE?

On Wed, Jun 9, 2010 at 5:30 PM, Max Laier <max@love2party.net> wrote:

> On Wednesday 09 June 2010 23:21:05 Max Laier wrote:
> > Hello Nick,
> >
> > On Wednesday 09 June 2010 20:17:43 Nick Rogers wrote:
> > > Is there something that can be done to speedup the call to
> > > if_indextoname(), or would it be worthwhile for me to submit a patch
> that
> > > adds the ability to skip the interface lookup as an arp(8) option?
> >
> > how about the attached:
> >
> > # time arp -an > /dev/null
> > 0.171u 0.462s 0:00.63 100.0%    21+1538k 0+0io 0pf+0w
> > # time arp.patched -an > /dev/null
> > 0.005u 0.000s 0:00.00 0.0%      0+0k 0+0io 0pf+0w
> >
> > # arp -an | wc -l
> >     1095
> >
> > I'll commit this soon unless somebody objects.
>
> ... make that s/long/int64_t/ ... I keep forgetting that long is 32bit
> sometimes.
>



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