Subject: Re: Netbsd as default-free router
To: None <itojun@iijlab.net>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: tech-net
Date: 08/21/2002 22:37:29
-----BEGIN PGP SIGNED MESSAGE-----


>>>>> "itojun" == itojun  <itojun@iijlab.net> writes:
    >> Stupid question... how can I find out how much memory is in use for
    >> the routing table(s)?
    >> 
    >> With a full dump, (110k routes), I get a crash with 64Mb of memory.  I
    >> am rebuilding with NMBCLUSTERS=2048 now, but want to verify what is
    >> up.  With 27K routes for prefixes larger than /21 only, it seems
    >> stable.  { ip prefix-list slash19 seq 10 deny 0.0.0.0/0 ge 21 }

    itojun> routing entries are not on mbufs.  see vmstat output, "routetbl"
    itojun> entry.

  Hmm. I've never used "vmstat -m" before.
  A shame that I can't use it like:
     vmstat -m routetbl -w 5 
  to monitor that value...

On a 64M physical ram machine, I have a 25Mb bgpd process:

14019 root       2    0    25M   20M sleep     0:36  0.68%  0.68% bgpd

(plus a 25Mb zebra process)

Memory statistics by type                        Type  Kern
         Type  InUse MemUse HighUse  Limit Requests Limit Limit Size(s)
     routetbl 110869  3356K   3356K 19661K   214667    0     0  16,32,64,128,256

gateway.sandelman.ca# show ip bgp summary
BGP router identifier 192.139.46.33, local AS number 26227
16444 BGP AS-PATH entries
0 BGP community entries

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
66.11.170.97    4 21936   40276       9        0    0    0 00:06:03   103285
2001:410:401:2::1
                4   818       0       0        0    0    0 00:01:33 Active     

I adjusted the NKMEMPAGES to be 8192. It was 4072 on the 64Mb machine.
This is a 5 port router. It currently also has squid and named, but squid, at
least, will get removed.

]       ON HUMILITY: to err is human. To moo, bovine.           |  firewalls  [
]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
] mcr@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Finger me for keys

iQCVAwUBPWROZoqHRg3pndX9AQGUdgP+Jnf5iq2fPSibc/y16gFbFI8HSTZMv9DU
trtYk8kywOFfg+zujlHyV+IONTmpTzPdMCqSwJrC15syClj4HAKhG15y8Wq7gufd
T/C3MtecDwuqMtUOV+fqhtmQdY+dLGH957Nu8qCOlZR6PJ14J717CK6zPocI9kiu
HPgabtc0JDo=
=TUPF
-----END PGP SIGNATURE-----