Bug 17868

Summary: no more buffers / can't allocate llinfo when running gated
Product: Base System Reporter: simon <simon>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description simon 2000-04-08 22:40:01 UTC
This problem occurs when running gated with a full routing table.  After 
20 minutes or so, when the routing table is just about done
downloading (75K routes nowadays), the system begins to complain
about "no more buffers."  A few minutes after that, the system
starts complaining "arpresolve: cannot allocate llinfo".  In order to 
attempt to fix this, I recompiled the kernel with MAXUSERS 256 and
NMBCLUSTERS 4096.  (The machine has 128 MB of RAM).  That didn't help.
I looked on newsgroups, and there were some other people reporting
this problem, but no solutions.  I am wondering if there is some kind
of hard limit to the size of the routing table or something like that.

How-To-Repeat: Setup a machine, compile and install gated.  (www.gated.org).  
Set the gated configuration to import all routes... point it at your
upstream (tell them to let you download all routes).  Run gated.
Wait 20 minutes.
Comment 1 Joe Greco 2000-05-07 13:45:38 UTC
GateD has nothing to do with this, fyi.

The kernel has a limit on the amount of kernel VM that can be allocated to
tables such as these.  You may do a "vmstat -m" to see.  Look at:

Memory statistics by type                          Type  Kern
        Type  InUse MemUse HighUse  Limit Requests Limit Limit Size(s)
     routetbl161703 22113K  22127K 40960K   240489    0     0  16,32,64,128,256

Memory Totals:  In Use    Free    Requests
                23618K     23K      255740

You will probably find your "Limit" field to be 20K.

It's not real obvious, but this limit is derived from hald of VM_KMEM_SIZE.
I compiled a kernel with

options         "VM_KMEM_SIZE=83886080"

and fixed it.  Alternatively, one could specify this in boot/loader.rc, as
I think someone stuck in a way to alter it in that manner.

> (75K routes nowadays)

# netstat -rn|wc
   78347  471979 5489863

Some internal routes probably present, but > 75K routes.

> Run gated.  Wait 20 minutes.

What speed connection do you have, anyways?  I wait maybe 20 seconds.  :-)

> I looked on newsgroups, and there were some other people reporting
> this problem, but no solutions.

If this fixes the issue for you, please take the time to help them as I've
taken the time to help you.  Much appreciated.
-- 
... Joe

-------------------------------------------------------------------------------
Joe Greco - Systems Administrator			      jgreco@ns.sol.net
Solaria Public Access UNIX - Milwaukee, WI			   414/342-4847
Comment 2 Poul-Henning Kamp freebsd_committer freebsd_triage 2000-06-01 23:44:17 UTC
State Changed
From-To: open->closed

resolved I pressume.