From owner-freebsd-questions Thu Sep 6 5:25: 5 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mailrelay3.inwind.it (mailrelay3.inwind.it [212.141.54.103]) by hub.freebsd.org (Postfix) with ESMTP id 3564637B403 for ; Thu, 6 Sep 2001 05:24:54 -0700 (PDT) Received: from [62.98.214.61] (62.98.214.61) by mailrelay3.inwind.it (5.5.029) id 3B83AF65004A126B for questions@freebsd.org; Thu, 6 Sep 2001 14:24:44 +0200 Received: (qmail 2623 invoked by uid 1000); 6 Sep 2001 12:23:39 -0000 Date: Thu, 6 Sep 2001 14:23:39 +0200 From: Francesco Casadei To: Jon Loeliger Cc: Francesco Casadei , questions@freebsd.org Subject: Re: No memory for rx list? Message-ID: <20010906142339.A2504@goku.kasby> References: <20010905203010.A1829@goku.kasby> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jdl@jdl.com on Wed, Sep 05, 2001 at 01:52:09PM -0500 X-Operating-System: FreeBSD 4.4-RC i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 05, 2001 at 01:52:09PM -0500, Jon Loeliger wrote: > So, like Francesco Casadei was saying to me just the other day: > >=20 > > from xl(4) manpage: > >=20 > > xl%d: no memory for rx list The driver failed to allocate an mbuf= for > > the receiver ring. > >=20 > > xl%d: no memory for tx list The driver failed to allocate an mbuf= for > > the transmitter ring when allocating a pad buffer or collapsing an= mbuf > > chain into a cluster. > >=20 > > You're running low on mbufs. What does netstat -m show? > >=20 > > Francesco Casadei >=20 > Yep, low mbufs. Good question. It shows: >=20 > www 1429 # netstat -m > 137/1248/4096 mbufs in use (current/peak/max): > 131 mbufs allocated to data > 6 mbufs allocated to packet headers > 129/1024/1024 mbuf clusters in use (current/peak/max) ^^^^ ^^^^ > 2360 Kbytes allocated to network (76% of mb_map in use) > 180 requests for memory denied ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 0 requests for memory delayed > 0 calls to protocol drain routines >=20 > This is currently a semi-quiet network. Is most of that 76% > now dead space? >=20 > At least we're not freeing free mbufs! >=20 > jdl >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message >=20 > end of the original message =46rom tuning(7) manpage: NMBCLUSTERS may be adjusted to increase the number of network mbufs the system is willing to allocate. Each cluster represents approximately = 2K of memory, so a value of 1024 represents 2M of kernel memory reserved = for network buffers. You can do a simple calculation to figure out how ma= ny you need. If you have a web server which maxes out at 1000 simultaneo= us connections, and each connection eats a 16K receive and 16K send buffe= r, you need approximate 32MB worth of network buffers to deal with it. A good rule of thumb is to multiply by 2, so 32MBx2 =3D 64MB/2K =3D 3276= 8. So for this case you would want to se NMBCLUSTERS to 32768. We recommend values between 1024 and 4096 for machines with moderates amount of mem= =AD ory, and between 4096 and 32768 for machines with greater amounts of m= em=AD ory. Under no circumstances should you specify an arbitrarily high va= lue for this parameter, it could lead to a boot-time crash. The -m option= to netstat(1) may be used to observe network cluster use. So do your own calculations to get a new value for network mbufs, let it be= n. Then put the following line in your kernel config file and recompile: options NMBCLUSTERS=3Dn Francesco Casadei --=20 You can download my public key from http://digilander.iol.it/fcasadei/ or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...) Key fingerprint is: 1671 9A23 ACB4 520A E7EE 00B0 7EC3 375F 164E B17B --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE7l2rLfsM3XxZOsXsRAiFOAKDNLUouS+jWUDga9ZLo/3U//XNgxgCdHlUr rCqA/vD+Brn96aewLPOyEe8= =w5oU -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message