From owner-freebsd-net@FreeBSD.ORG Thu Sep 20 10:09:23 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24DF91065672 for ; Thu, 20 Sep 2012 10:09:23 +0000 (UTC) (envelope-from ivsan@ngs.ru) Received: from smtpout.ngs.ru (smtpout25.ngs.ru [195.19.71.8]) by mx1.freebsd.org (Postfix) with ESMTP id B94758FC08 for ; Thu, 20 Sep 2012 10:09:22 +0000 (UTC) Received: from mx14.intranet.ru (mx14.intranet.ru [172.16.7.2]) by mail.ngs.ru (smtp) with ESMTP id 6863F209E11 for ; Thu, 20 Sep 2012 17:09:13 +0700 (NOVT) Received: from mx16.intranet.ru (mx16.intranet.ru [172.16.7.4]) by mx14.intranet.ru (mx14.intranet.ru) with ESMTP id 678CA110E4 for ; Thu, 20 Sep 2012 17:09:13 +0700 (NOVT) Received: from [80.242.66.33] (account ivsan@ngs.ru) by mx16.intranet.ru (CommuniGate Pro WebUser 4.3.11) with HTTP id 25413494 for freebsd-net@freebsd.org; Thu, 20 Sep 2012 17:09:13 +0700 From: "Ivan Alexandrovich" To: freebsd-net@freebsd.org Date: Thu, 20 Sep 2012 17:09:13 +0700 Message-ID: In-Reply-To: <20120919151806.GK85604@FreeBSD.org> References: <20120919151806.GK85604@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="KOI8-R"; format="flowed" Content-Transfer-Encoding: 8bit X-SpamTest-Envelope-From: ivsan@ngs.ru X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: NOTSPAM X-SpamTest-Info: Profiles 36850 [Sep 20 2012] X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status-Extended: not_detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release Subject: Re: getting counters for a plenty of vlan ifaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 10:09:23 -0000 On Wed, 19 Sep 2012 19:18:06 +0400 Gleb Smirnoff wrote: > That's strange. Per-minute read shouldn't induce > large CPU load. > > What snmp daemon do you use? I remember that several > years ago net-snmp daemon from ports used a single > linked list for all ARP entries, and thus it consumed a lot > of CPU when receiving a single ARP change from routing > socket. It was net-snmp-5.3.. port. Just checked on net-snmp-5.7.1 running on FreeBSD-9.0 and I see that things have changed significantly. And even # snmpbulkwalk -v2c -On -c 1.3.6.1.2.1.4.22.1.2 running in an endless loop doesn't seem to affect the number of context switches. Only the page faults count grow up to 50k per second. Don't know if this metric has some relation with router performance. # vmstat a 1 procs memory page faults cpu r b w avm fre flt re pi po fr sr in sy cs us sy id 1 0 0 1034M 108M 99 0 0 0 0 0 17175 3814 30714 2 12 86 0 0 0 1034M 108M 0 0 0 0 180 0 17230 945 31461 1 15 84 1 0 0 1034M 108M 28627 0 0 0 0 0 17268 1734 30860 2 25 73 1 0 0 1034M 108M 54835 0 0 0 0 0 17192 7084 31114 5 36 59 0 0 0 1034M 108M 52911 0 0 0 0 0 17300 3508 31402 3 32 65 ... Thanks for the helpful message. So my issue seems to be resolved. I've been too naive not to recheck an old observation on a contemporary versions. Even "/usr/sbin/arp -an" some time ago (pre 8.0?) affected the cpu load somewhat. Now even arp -an running continuosly seems to have little impact on it. Thanks, Ivan