[Babel-users] Bucket full, dropping packet

Juliusz Chroboczek jch at pps.univ-paris-diderot.fr
Sun Dec 13 16:11:13 UTC 2015


> Attaching two babeld gprof outputs from one of our VPN servers.

Thanks, that's very helpful: my intuition was wrong.  So much for guessing
without profiling first.

The VPN server profiles indicate that between 45% and 60% of the time is
spent in find_source, which performs a linear search (shame on me,
source.c line 45).  That's easy to fix -- either by making the source
table sorted and using binary search, or by replacing the source table
with a hash table.  I think I'll go for the sorted array, which is simpler
and should have satisfactory performance (note to self: remember to
implement expire_sources in linear time).  I'll send you a patch next week
if I have some time.

The third profile is more suprising -- it looks like it's spending a fair
amount of time in Matthieu's code, which should not be triggering in your
case (you're not using source-specific routing).  Look, Matthieu, all the
overhead is from conflict_solution, 0.54s in prefix_cmp and 0.51s in
route_stream_next, and conflic_solution is called 


                0.54    0.00 106707021/106707021     chg_route_metric [4]
[11]    31.1    0.54    0.00 106707021         prefix_cmp [11]


                0.00    0.00    6500/106327978     send_update <cycle 2> [37]
                0.00    0.00  146611/106327978     kinstall_route [8]
                0.00    0.00  146611/106327978     kuninstall_route [9]
                0.00    0.00  175114/106327978     kchange_route_metric [26]
                0.51    0.00 105853142/106327978     conflict_solution [1]
[12]    29.7    0.51    0.00 106327978         route_stream_next [12]


Matthieu, do you understand why that is?  Is there a way to optimise away
conflict_solution in the easy case?

-- Juliusz



More information about the Babel-users mailing list