From owner-freebsd-questions@FreeBSD.ORG Tue Feb 26 11:50:58 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5723A106570A for ; Tue, 26 Feb 2008 11:50:58 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from smtp.teledomenet.gr (smtp.teledomenet.gr [213.142.128.2]) by mx1.freebsd.org (Postfix) with ESMTP id B660C13F0CD for ; Tue, 26 Feb 2008 09:49:18 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: by smtp.teledomenet.gr (Postfix, from userid 58) id 66ECF142F94; Tue, 26 Feb 2008 11:49:17 +0200 (EET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on smtp.teledomenet.gr X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.3 Received: from iris (unknown [192.168.1.71]) by smtp.teledomenet.gr (Postfix) with ESMTP id 6090E142D8C; Tue, 26 Feb 2008 11:49:10 +0200 (EET) From: Nikos Vassiliadis To: freebsd-questions@freebsd.org Date: Tue, 26 Feb 2008 11:48:47 +0200 User-Agent: KMail/1.9.7 References: <47C1645D.1040703@lightray.org> In-Reply-To: <47C1645D.1040703@lightray.org> X-NCC-RegID: gr.telehouse MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802261148.47946.nvass@teledomenet.gr> Cc: Dylan Smith Subject: Re: Normal CPU usage with a PPP connection X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2008 11:51:04 -0000 On Sunday 24 February 2008 14:34:37 Dylan Smith wrote: > Hey guys, i'm running 6.3-R with (i think) userland ppp to connect to my > ADSL provider over PPPoE. > I build a number of graphs(mrtg) for system stats and i am noticing that > under heavy load on my ppp connection, that is sustained 150KB/s for an > hour or so my cpu usage, based on my graph, hovers around 20% (haven't > looked at it in top yet but if there isn't a simple solution/reason for > this i will look into what sort of usage it is). You should check top and tcpdump, it might be a big number of small packets causing the load. > The box is a home > router/server so at any 1 time isn't doing anything else that i can see > would account for this. I also noticed that this usage increase does not > occur with traffic coming/going on the inward facing interface, which > regularly has transfer speeds around 10 MB/s. > > I'm running a AMD X2 3800+ with 2GB ram. Is this sort of usage normal? Can't really tell if it's normal, but it is known that userland ppp uses much resources. I have seen it too using 20% CPU time running on a much slower machine(I faintly remember that it was a Pentium Celeron at 300MHz) and a much slower(384/128?) ADSL line. > Is there something i can do to bring it down? Fortunately yes, you could use net/mpd. The CPU load then, will probably be near zero for normal traffic, the 150KB/s you mention. If a million of small packets arrive at your router the load will be higher, nevertheless orders of magnitude lower than the load caused by userland ppp. HTH, Nikos