Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 2006 20:30:57 +0100
From:      Herve Boulouis <amon@sockar.homeip.net>
To:        freebsd-stable@freebsd.org
Subject:   Question on protocol drain routines
Message-ID:  <20060314193057.GB17399@ra.aabs>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060314193057.GB17399>