From owner-freebsd-current@FreeBSD.ORG Tue Jan 22 20:06:08 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBC6D16A420 for ; Tue, 22 Jan 2008 20:06:08 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from smtp803.mail.ird.yahoo.com (smtp803.mail.ird.yahoo.com [217.146.188.63]) by mx1.freebsd.org (Postfix) with SMTP id 26CC913C458 for ; Tue, 22 Jan 2008 20:06:07 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: (qmail 52699 invoked from network); 22 Jan 2008 20:06:06 -0000 Received: from unknown (HELO ?192.168.1.2?) (thomasjudge@btinternet.com@86.140.145.126 with plain) by smtp803.mail.ird.yahoo.com with SMTP; 22 Jan 2008 20:06:06 -0000 X-YMail-OSG: Hl5lk.cVM1mhDD4o8HbrMTr6IZGMzqZZseTuyid6CH2tc6ONCIxl3NKKmD_33XsenC5byq7clQ-- X-Yahoo-Newman-Property: ymail-3 Message-ID: <47964CBA.6020603@tomjudge.com> Date: Tue, 22 Jan 2008 20:06:18 +0000 From: Tom Judge User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: Bartosz Giza References: <200801221438.53254.gizmen@blurp.pl> <20080122172058.Y94121@knop-beagle.kn.op.dlr.de> <200801221934.20774.gizmen@blurp.pl> In-Reply-To: <200801221934.20774.gizmen@blurp.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-current@freebsd.org, Harti Brandt Subject: Re: bsnmpd daemon eating all cpu X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 20:06:08 -0000 Bartosz Giza wrote: > Tuesday 22 of January 2008 17:25:15 Harti Brandt napisaƂ(a): >> Hi, >> >> On Tue, 22 Jan 2008, Bartosz Giza wrote: >> >> BG>I am using dell poweredge sc440 router with one xeon dual core cpu. >> BG>This is basicly only router for dummynet firewall dhcpd and named. >> BG>I want to run bsnmpd daemon but when i start it it starts eating all cpu >> from BG>one core. >> BG>I have run truss to check what it is doing and i have got huge amount of >> such BG>syscalls >> BG>gettimeofday({1201008182.366354},0x0) = 0 (0x0) >> BG> >> BG>I want to use this daemon because it is in base system but if i could >> not run BG>this daemon in normal way i will be forced to use net-snmpd >> port. BG>I have basic config with hotres module added. >> BG>I am running freebsd 7.0-prerelease. >> BG>Alsa what is strange i have exactly the same machine with freebsd >> BG>7.0-prerelase but with only one network card for testing and bsnmpd >> behaves BG>normal. >> BG>Could some one help me with this. I can send dump from truss or even do >> some BG>more testing. >> >> Could you please disable all modules? Just comment out all lines starting >> from the Load MIB-2 module line. What does it do then? > > When i turn off all modules bsnmpd uses 0% of cpu. When i have added this > snmp_mibII.so module it started again to use 100% of one core. > On other UP kernels with 7-PRE bsnmpd behaves good. And also when i was trying > to find what is going on i found that it happens when there is quite bit of > traffic on interfaces. > For test purposes i have downed lan interface and bsnmpd stopped to use 100% > of cpu. And when i have brought up lan interface bsnmpd started again to use > 100% od cpu. So it is related to IP traffic. > Right now i am using net-snmpd daemon and it uses almoust nothing of cpu. > > There is a problem with net-snmp in that it does not support the ifXTable mib on FreeBSD so you are stuck with 32bit counters on the network interfaces, which can easily overflow on GBit nics between polls. We where about to deploy bsnmpd behind net-snmpd and proxy the ifXTable mib to bsnmpd to try to avoid overflows, but if there is a problem with bsnmpd this may not be a good idea. Has anyone come across this problem on RELENG_6_2 ? Tom