From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 9 21:56:29 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 986C7106564A for ; Wed, 9 Jun 2010 21:56:29 +0000 (UTC) (envelope-from ncrogers@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E80E18FC13 for ; Wed, 9 Jun 2010 21:56:28 +0000 (UTC) Received: by iwn7 with SMTP id 7so2986290iwn.13 for ; Wed, 09 Jun 2010 14:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=nq+FU1sLVfsDEECnSuMkbNay8KlkVdAJzLUcBCRa2Ho=; b=t7ZdoOj4wb6Mi6pSAdjxCohwpECMM46otBoZazP2VNEeWzveoYKoic6k3qjZDYwwJW xxpA+FeseSr6J6RYJYa7Iwiu2wQJ/l1Js0aGJccBro+dkmYUHTSGPwIggzN88RedjXMW HLA2+PyuTqD3053HqCzTlgsIPJQrUEn/hJKnY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Y6BRuFXzhJwjkizKLYL4g5ZwNctk5f08pWIXc2UwmfuxOUF1d1ITSaaRpA7v/N30x0 LFKxV16LxlQ7CXMtiiIwXw6wN1Rwcj9dCRVX0FU6n/Nf9IbY8ZNFmmgsDuU60joN58Ri buB/I1+9h+JfNnMoOoUcXEGKwxHVIvpilc+AI= MIME-Version: 1.0 Received: by 10.231.186.161 with SMTP id cs33mr3679892ibb.65.1276120587207; Wed, 09 Jun 2010 14:56:27 -0700 (PDT) Received: by 10.231.190.131 with HTTP; Wed, 9 Jun 2010 14:56:27 -0700 (PDT) In-Reply-To: <201006092330.30750.max@love2party.net> References: <201006092321.05453.max@love2party.net> <201006092330.30750.max@love2party.net> Date: Wed, 9 Jun 2010 17:56:27 -0400 Message-ID: From: Nick Rogers To: Max Laier Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: arp(8) performance w/ many aliases assigned to an interface X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2010 21:56:29 -0000 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 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. >