home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!uvaarpa!concert!borg!trantor!white
- From: white@trantor.cs.unc.edu (Brian T. White)
- Newsgroups: comp.unix.ultrix
- Subject: fix for 'cant get mbufs' problem
- Message-ID: <17837@borg.cs.unc.edu>
- Date: 23 Nov 92 17:22:57 GMT
- Sender: news@cs.unc.edu
- Lines: 67
-
- We were recently experiencing problems with a DECsystem 5000/240
- hanging after producing a long string of 'cant get mbufs' messages.
- The machine, which has 25 clients and about 5.2 GB of disk space,
- was crashing roughly daily, but since the fix it has been up two
- weeks with no problem.
-
- Our DEC technical rep, to whom we are eternally grateful, dug
- through some mail messages and found the following suggestion, which
- worked:
-
- ****************************************************************
- "cant get mbufs" means you ran out of km_alloc map space, or you
- ran short of physical memory (temporarily) and thus, dropped an
- input packet.
-
- You probably need to increase the km_alloc map on the system
- experiencing the problem. Adjust the value of KMEMUMAP in the
- sys/machine/vax/vmparam.h file. [we modified sys/machine/mips/vmparam.h]
-
- Background:
-
- The message "cant get mbufs" is printed to the console by the kernel
- when a call to kmalloc has failed. A kmalloc call can fail if there are
- not enough pte's [process table entries] available to map a given region
- of memory, or it can fail if there are pte's available but the physical
- memory is lacking at that particular instant. A number of calls to the
- kmalloc kernel routing specify that the call is to wait for resources to
- become available should there be a temporary shortage. The call in
- question, which results in the "cant get mbufs" message does not specify
- that a wait should take place. Thus, the kmalloc routine returns
- immediately with an error message, the kernel prints a message
- indicating the unavailability of resources, and the network packet is
- discarded.
-
- This most likely occurs during a network "spike" whereby a host is
- flooded with hundreds of incoming packets during a brief instant, and it
- is unable to process all of the packets.
-
- If this happens only randomly and without much frequency, you can ignore
- it. If the machine hangs or locks up following the message, or if you
- see this message often, you should increases the value of KMEMUMAP.
- ****************************************************************
-
- Note: KMEMUMAP is dependant on the value of PHYSMEM, which is set to 32 on
- our servers. The code in the vmparam.h file that specifies KMEMUMAP
- is as follows:
-
- #if (PHYSMEM/10 < LOW_WATER)
- #define KMEMUMAP (LOW_WATER*256+KMEMSLOP)
- #else
- #if (PHYSMEM/10 > HIGH_WATER)
- #define KMEMUMAP (HIGH_WATER*256+KMEMSLOP)
- #else
- #define KMEMUMAP (PHYSMEM/10*256+KMEMSLOP)
- #endif
- #endif
-
- I changed it to be just the following:
-
- #define KMEMUMAP (HIGH_WATER*256+KMEMSLOP)
-
-
- Our machine has 32 MB, and the physmem variable is set to 32, which
- seems intuitively correct. There have been suggestions that raising
- physical memory or the value of the physmem variable would fix the
- problem, but it would appear that those solutions owe their success
- to the dependence of KMEMUMAP on PHYSMEM.
-