Re: bsnmpd & BGP full view



Hartmut Brandt wrote:

Is there a way to reduce bsnmpd's CPU & memory usage
for BGP router using full view?

I do not need to deal with routing table via SNMP.
SNMP is needed to monitor interface byte counters only via mrtg.

bsnmpd grows upto 18Mb for FreeBSD 6.4 and worse,
it hogs CPU while bgpd obtains full view.


Hmm. I just had a look and the version in 6.4 already has the optimized
route table (you may confirm that:
contrib/bsnmp/snmp_mibII/mibII_route.c should include sys/tree.h).
It takes 36 byte per route on a 32-bit machine and should take 52 byte
on a 64-bit one. The only way to reduce memory consumption considerably
that I can see is to use the kernel routing table directly, but this
requires to implement the GETNEXT operation in kernel.

In any case it should re-read the kernel table only every 10 minutes and
in the mean time monitor the routing socket to update its copy of the
table. If of course someone is doing a lot of updates on
the kernel table it will receive all these changes and apply them to its
copy of the routing table. If the latter is a problem you could disable
the routing socket interface and could just rely on the 10
minute re-reads.

Thank you very much. How do I disable this interface for bsnmpd?

Between these re-reads you would not see changes to the
routing table through SNMP.

That's OK for me - I don't look at routing table through SNMP at all :-)

BTW: how many routes do you have? When I introduced the optimized
routing table I tested with 150k routes which was reported to be
reasonable at that time.

More than 271k prefixes.

Eugene Grosbein
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Traffic NOT moving through the correct network interface?
    ... Kernel IP routing table ... loopback interface, but that's not part of this problem. ... Everything is done by the kernel. ... Policy based routing requires you ...
    (alt.os.linux)
  • Re: Network dies
    ... > maybe taking the interface down and up again without an address. ... > On reason could be a DHCP lease running out and no refresh available. ... Kernel IP routing table ...
    (comp.os.linux.networking)
  • Re: ipforwarding enabled, what can I do
    ... There might be a snmp option for setting ... > routing but did not find any tools (Net::RawIP does not seem ... This list is provided by the SecurityFocus Security Intelligence Alert ... For more information on SecurityFocus' SIA service which ...
    (Pen-Test)
  • Re: cvs commit: src/sys/net if_vlan.c
    ... BD>> JE>with the ifnum in a hash) then we could just keep the ifnum in the mbuf ... BD>> This would be helpful for the SNMP daemon, ... BD>> to reuse the ifnum if the same interface is plugged in back. ... It's too complex to handle in the kernel. ...
    (freebsd-net)
  • Re: cvs commit: src/sys/net if_vlan.c
    ... JE>> BD>removes the interface from the ifnet list. ... JE>> interface index you see via SNMP has nothing to do with the interface index ... JE>with the ifnum in a hash) then we could just keep the ifnum in the mbuf ... It's too complex to handle in the kernel. ...
    (freebsd-net)