From owner-freebsd-net@FreeBSD.ORG Mon Mar 20 17:10:28 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97C9816A533 for ; Mon, 20 Mar 2006 17:10:28 +0000 (UTC) (envelope-from amon@sockar.homeip.net) Received: from sockar.homeip.net (tourist.net8.nerim.net [213.41.176.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB18F43D46 for ; Mon, 20 Mar 2006 17:10:27 +0000 (GMT) (envelope-from amon@sockar.homeip.net) Received: from sockar.homeip.net (localhost [127.0.0.1]) by sockar.homeip.net (8.13.3/8.13.3) with ESMTP id k2KH1AkN053581 for ; Mon, 20 Mar 2006 18:01:10 +0100 (CET) (envelope-from amon@sockar.homeip.net) Received: (from amon@localhost) by sockar.homeip.net (8.13.3/8.13.3/Submit) id k2KH1Arb053580 for freebsd-net@freebsd.org; Mon, 20 Mar 2006 18:01:10 +0100 (CET) (envelope-from amon) Date: Mon, 20 Mar 2006 18:01:10 +0100 From: Herve Boulouis To: freebsd-net@freebsd.org Message-ID: <20060320170110.GC17399@ra.aabs> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: Question on protocol drain routines 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: Mon, 20 Mar 2006 17:10:28 -0000 [reposting on -net in the hope to attract the concerned people's attention :)] Hi, I'm starting to deploy 6.0-STABLE (from mid january) to progressively replace all the 4.9 servers we have here and I'm seeing a curious thing : On all 6.0 which get moderate to high network activity (ie webmail to inn), I see that the 'calls to protocol drain routines' statistic given by netstat -m is non zero : webmail box : archimonde:~# netstat -m 234/1641/1875 mbufs in use (current/cache/total) 201/557/758/25280 mbuf clusters in use (current/cache/total/max) 0/50/6576 sfbufs in use (current/peak/max) 460K/1524K/1984K bytes allocated to network (current/cache/total) 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 29 calls to protocol drain routines archimonde:~# uptime 8:26PM up 42 days, 15:07, 2 users, load averages: 0.00, 0.01, 0.02 inn box : ridley:~# netstat -m 886/719/1605 mbufs in use (current/cache/total) 774/494/1268/25600 mbuf clusters in use (current/cache/total/max) 86/728/6656 sfbufs in use (current/peak/max) 1769K/1167K/2937K bytes allocated to network (current/cache/total) 0 requests for sfbufs denied 0 requests for sfbufs delayed 1320 requests for I/O initiated by sendfile 95779 calls to protocol drain routines ridley:~# uptime 8:26PM up 20 days, 5:06, 2 users, load averages: 0.26, 0.24, 0.18 I have NBUF=0 and NMBCLUSTERS=8192 in all my kernels. (Is this wrong on 6.0 ?) I have taken a look at the sources and it seems that in 6.0 the mb_reclaim() handler is called on each iteration of vm_pageout() whereas in 4.9 the m_reclaim() function was only called when mbuf exhaustion occured so I suspect this is why I see the mbstat.m_drain counter != 0 in 6.0 and not in 4.9. My question is : does this regular draining have effects on network performance ? (got performance problems with the inn box that triggered this investigation) -- Herve Boulouis