From nobody  Fri May 30 08:59:53 1997
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.5/8.8.5) id IAA22223;
          Fri, 30 May 1997 08:59:53 -0700 (PDT)
Message-Id: <199705301559.IAA22223@hub.freebsd.org>
Date: Fri, 30 May 1997 08:59:53 -0700 (PDT)
From: bigfoot@stomped.com
To: freebsd-gnats-submit@freebsd.org
Subject: cached routes flushed too quickly on busy systems
X-Send-Pr-Version: www-1.0

>Number:         3719
>Category:       kern
>Synopsis:       cached routes flushed too quickly on busy systems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 30 09:00:02 PDT 1997
>Closed-Date:    Fri May 30 10:28:32 PDT 1997
>Last-Modified:  Fri May 30 10:29:49 PDT 1997
>Originator:     Guy Gustavson
>Release:        2.1.5
>Organization:
Reliant Net Services
>Environment:
FreeBSD stomped.com 2.1.5-RELEASE FreeBSD 2.1.5-RELEASE #1: Wed May 28 19:02:54 CDT 1997     bigfoot@stomped.com:/usr/src/sys/compile/BFKERNEL  i386
>Description:
In module /usr/src/sys/netinet/in_rmx.c
The maxium numbered of cached routes to allow before lowering the
maxium alouded time to live on a route is hard coded at 128.
This is probably to low for a heavily loaded system.

>How-To-Repeat:
Run a busy web server... like 50,000-100,000 page views a day.
Sorry, but varied and heavy traffic is about the only way to get the
expire messages.
>Fix:
On line 175 of /usr/src/sys/netinet/in_rmx.c Is have made this change

/* int rtq_toomany = 128;               /* 128 cached routes is ``too many'' 
int rtq_toomany = 512;          /* 512 cached routes is ``too many'' according to me. GWG.*/

This is too high for a lightly loaded system with little memory, and the orginal is too low for a heavily loaded system. I suggest that the limit should probably be based on amount of real memory in the system, and
somehow tied to the number of unique domains talked to each hour.
>Release-Note:
>Audit-Trail:

From: Bill Fenner <fenner@parc.xerox.com>
To: bigfoot@stomped.com, freebsd-gnats-submit@freebsd.org
Cc:  Subject: Re:  kern/3719: cached routes flushed too quickly on busy systems
Date: Fri, 30 May 1997 10:10:15 PDT

 This value is tunable via sysctl.  Put something like
 
 sysctl -w net.inet.ip.rtmaxcache=512
 
 in rc.local and you have the same effect as modifying the kernel.
 
   Bill
State-Changed-From-To: open->closed 
State-Changed-By: wollman 
State-Changed-When: Fri May 30 10:28:32 PDT 1997 
State-Changed-Why:  
This parameter is tweakable in more recent versions. 
>Unformatted:
