Date: Thu, 6 Sep 2001 14:23:39 +0200 From: Francesco Casadei <fcasadei@inwind.it> To: Jon Loeliger <jdl@jdl.com> Cc: Francesco Casadei <fcasadei@inwind.it>, questions@freebsd.org Subject: Re: No memory for rx list? Message-ID: <20010906142339.A2504@goku.kasby> In-Reply-To: <E15ehmV-0001oj-00@jdl.com>; from jdl@jdl.com on Wed, Sep 05, 2001 at 01:52:09PM -0500 References: <20010905203010.A1829@goku.kasby> <E15ehmV-0001oj-00@jdl.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010906142339.A2504>