A/UX 1.0: The "m_expand returning to 0" Kernel Message (8/93)


This article describes a solution to the "m_expand returning to 0" Kernel
message.


When you encounter the "m_expand returning to 0" kernel message, perform
the following command:

  netstat -m

An example of output from this command:

  56/500 mbufs in use:
           21 mbufs allocated to socket structures
           29 mbufs allocated to protocol control blocks
           4  mbufs allocated to routing table entries
           2  mbufs allocated to interface addresses
  0/32 mapped pages in use
  157 Kbytes allocated to network (8% in use)
  0 requests for memory denied

This lets you see how many "mbufs" (memory space) are allocated in your
networked system versus the total mbufs allocated. In the example, 500
mbufs are allocated in the system, 56 mbufs are currently used, and 157
Kbytes (256 bytes/mbuf x 500) are allocated to the network.  Note  the last
line: "n requests for memory denied".

If the currently used mbufs are almost equal to or greater than the total
allocated mbufs, and/or there are any memory requests denied, you should
adjust your kernel parameter on NMBUFS (number of buffers for networking).


Use "kconfig -av" to display the current kernel parameters before modifying
them.

Depending on the amount of RAM in your system and network activities, the
NMBUFS can be adjusted with the "kconfig" command.  For example:

  # kconfig -n /unix
  NMBUFS=1024
  <Control-d>
  # sync
  # sync
  # sync
  # reboot

You also should check these kernel parameters (which may or may not affect
your network:

* NBUF (number of system block I/O buffers),
* NINODE (size of system inode table), and
* NFILE (size of system file table pool)

The distributed A/UX 1.0 is configured for a system with 2MB of memory. If you
have 5MB RAM installed, you should change the values of NBUF, NINODE, and NFILE
to 1000, 200, and 200, respectively.  This is mentioned in the A/UX Release
Notes 1.0.

Article Change History:
20 Aug 1993 - Cleaned up to format.
31 Aug 1992 - Reviewed for technical accuracy.


Published Date: Feb 18, 2012