[quagga-dev 9491] Re: [RFC] AgentX support for Quagga

Renato Westphal renatowestphal at gmail.com
Tue Jun 26 18:47:52 BST 2012


2012/6/26 David Lamparter <equinox at opensourcerouting.org>:
> On Tue, Jun 26, 2012 at 08:06:12AM -0700, Stephen Hemminger wrote:
>> On Tue, 26 Jun 2012 11:01:18 -0300
>> Renato Westphal <renatowestphal at gmail.com> wrote:
>>
>> > 2012/6/25 Vincent Bernat <bernat at luffy.cx>:
>> > > The upgrade is already done. The specific code to each daemon is
>> > > compatible (and already was) with both SMUX and AgentX (except the trap
>> > > part but I have already upgraded it). This is also why SMUX/AgentX is a
>> > > compile time option.
>> >
>> > Thanks for the clarification. Everything makes sense for me now.
>> >
>> > Just one note. I have to run Quagga (any daemon) with root privileges
>> > in order to use agentx. Otherwise I get an "snmp[warning]: Warning:
>> > Failed to connect to the agentx master agent ([NIL]):".
>> >
>> > > AgentX won't improve the situation from the performance point of view.
>> > >
>> > > For bgpd, I suspect the problem to be fairly simple: snmpwalk is a serie
>> > > of GETNEXT requests. For each GETNEXT request, we need to locate the
>> > > appropriate element to return and for this, we need to walk each route
>> > > table from the beginning.
>> > >
>> > > An easy fix would be to remember where we were the last time we got a
>> > > GETNEXT.
>> >
>> > I don't think that's the problem. I did some profiling with
>> > callgrind[1] and found out that the libnetsnmp is inherently slow. I
>> > did a snmpwalk over a table with 10k routes and only a small
>> > percentage of the execution time (~ 1.3%) was to gather information
>> > from the BGP table (in the bgp4PathAttrTable function). I might be
>> > wrong, but I think there's nothing we can do about this problem.
>> >
>> > [1] http://www.inf.ufrgs.br/~rwestphal/files/callgrind.png
>> >
>> > > I will try to work on this. Is there some way to get a huge BGP
>> > > table (with exabgp maybe?)?
>> >
>> > I'm using the bgp_simple.pl script. I followed this tutorial to get
>> > started with it:
>> > http://evilrouters.net/2009/08/21/getting-bgp-routes-into-dynamips-with-video/
>> >
>> > > You are right, I didn't retest SMUX when I added trap support. I have
>> > > added your patch and rebased my stack of patches (to make all patches
>> > > compile, since David did not merge them yet). I have therefore "broken"
>> > > your tree. You can get it right with something like (assuming the remote
>> > > name for my repository is "rvincent")
>> > >
>> > > git fetch rvincent
>> > > git rebase --onto rvincent/feature/agentx vincent~1 vincent
>> > >
>> > > (or you can just start a new branch and cherry-pick your last commit)
>> >
>> > Perfect. I hope your patches will be merged in a few days.
>> >
>> > > Your patch seems fine. I don't have a testbed to actually test it but I
>> > > don't see any problem with it.
>> >
>> > Thanks for looking into it. I'll review this patch next week and then
>> > send it to quagga-dev.
>> >
>> > Regards,
>>
>> I did some work to speed up SNMP and it's handling of large tables.
>> A lot of the problem was N^2 insertion into tables, combined with cache
>> timeout being less than the load time.
>
> Do these changes conflict with Vincent's AgentX support?  Could you
> (re-)post them to the list?
>
> Thanks in advance,
>
> -David

His changes are in the net-snmp, not quagga:
http://git.vyatta.com/git/?p=net-snmp.git;a=shortlog;h=refs/heads/oxnard

I'm testing them now.

-- 
Renato Westphal




More information about the Quagga-dev mailing list