Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 1998 19:24:24 +0400
From:      "Mikhail A. Sokolov" <mishania@demos.su>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        dg@root.com, freebsd-current@FreeBSD.ORG
Subject:   Re: mbuf cluster problem continues!!
Message-ID:  <19980602192424.02082@demos.su>
In-Reply-To: <199806011626.MAA22057@khavrinen.lcs.mit.edu>; from Garrett Wollman <wollman@khavrinen.lcs.mit.edu> on Mon, Jun 01, 1998 at 12:26:41PM -0400
References:  <015b01bd8cf4$23f4da40$e34a05cb@alpine.iaccess> <199806010520.WAA09567@implode.root.com> <199806011626.MAA22057@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,

On Mon, Jun 01, 1998 at 12:26:41PM -0400, Garrett Wollman wrote:
# <<On Sun, 31 May 1998 22:20:10 -0700, David Greenman <dg@root.com> said:
 
# >    I've seen several reports of mbuf leaks in the specific case of running
# > squid proxy servers.
 
# Not seen here.

# root@xyz(4)$ netstat -m
# 825/1408 mbufs in use:

Oh well, it's not squid what is definite culprit here, not closing tcp 
connections: let's take a machine, which is attacked by clients, is being 
agressively used nfs server and doesn't even have any services besides nfs,
which could leave tcp connections not closed:

{zz}~/# netstat -m
10577/10688 mbufs in use:
 10057 mbufs allocated to data
 520 mbufs allocated to packet headers
451/728 mbuf clusters in use
2792 Kbytes allocated to network (79% in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines
{zz}~/# uptime
 6:44ÐÐ  up 1 day,  8:57, 21 users, load averages: 1.85, 1.80, 1.62

NMBCLUSTERS are 24k, and still the machine will leak mbuf's once a week.

{zz}~/# nfsstat -w 1
         Getattr   Lookup Readlink     Read    Write   Rename   Access  Readdir
Client:        0        0        0        0        0        0        0        0
Server:  4919834  3679844    37708  1306501  1102222    17918 121153149    48113
...

This machine usually runs some 20-200 simultaneous sendmails, 20-100 interactive
(read: ~shell) users, up to 5 nfs clients, ~50 simulateneous httpd's.

Taking a look at it's neighbour, a virtual web/ftp server: 
{xx}~/# netstat -m
1813/4256 mbufs in use:
1203 mbufs allocated to data
609 mbufs allocated to packet headers
1 mbufs allocated to socket names and addresses
1150/2802 mbuf clusters in use
6136 Kbytes allocated to network (41% in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines
{xx}~/# uptime
 7:07ÐÐ  up 40 days,  3:11, 11 users, load averages: 1.07, 0.89, 0.96
{xx}~/# nfsstat -w 1
         Getattr   Lookup Readlink     Read    Write   Rename   Access  Readdir
Client: 70935468 45165217   772137  7905938 20548126   358237 -2070886142   218656
                                                               ^^^^^^^^^^^ Ouch.

Interesting, eh? This one is the above mentioned zz nfs client, and the other
difference is that it doesn't handle pop clients and has less sendmail's. Plus,
which is important, it _is_ a caching server (read: squid), serves not that 
much, though, some 40k requests/day. Although, it does exceed mbuf's once
in a while, not once per week, though, as you might see from uptime.

{zz}~/# netstat -an 
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp        0      0  180.178.31.240.21491   128.50.150.242.64      -225392640
tcp        0      0  148.229.162.242.17651  128.121.206.242.206    -225392640
tcp        0      0  20.85.153.242.18419    128.179.223.242.19     -225392640
                                                                   ^^^^^^^^^^
Charming..

Btw, what's that?


# Of course, it's not really working that hard.
# --
#Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same

Of course, both are current, as of 1998/04/20. And yes, that's a machines in 
productions use; yes, we know we shouldn't... but -stable lacks SMP and
tons of other usefull features.

My 2 kopeks.

-- 
-mishania

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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