Denis Fondras([email protected]) on 2018.10.31 21:02:17 +0100:
> On Wed, Oct 31, 2018 at 04:24:49PM +0100, Claudio Jeker wrote:
> > This diff introduces a real Adj-RIB-Out. It is the minimal change to
> > introduce the new RIB. This removes the update_rib introduced before 6.4
> > lock because that is now replaced with a real RIB.
> > The code used by bgpctl show rib is now a fair amount easier since now one
> > RIB runner can be used for all cases.
> > path_update() is now returning if a prefix was not modified which is
> > needed in the update path to suppress unneeded updates.
> > The softreconfig out case becomes simpler because there is no more the
> > need to run with both filters and check results.
> > Last the shutdown code of the RDE had to be adjusted a bit to still work
> > with the Adj-RIB-Out.
> >
> > This may cause memory consumption to go up but my testing has shown that
> > the result is actually not significant. Needs the commits from earlier
> > today to apply.
>
> On my Route Server, it is quite a big change (in percentage).
> * Before :
> RDE memory statistics
> 11561 IPv4 unicast network entries using 452K of memory
> 131 IPv6 unicast network entries using 7.2K of memory
> 23370 rib entries using 1.4M of memory
> 23517 prefix entries using 1.8M of memory
> 4894 BGP path attribute entries using 344K of memory
> and holding 23517 references
> 1720 BGP AS-PATH attribute entries using 76.4K of memory
> and holding 4894 references
> 1061 BGP attributes entries using 41.4K of memory
> and holding 10565 references
> 1060 BGP attributes using 25.6K of memory
> 101809 as-set elements in 58041 tables using 2.1M of memory
> 114429 prefix-set elments using 4.7M of memory
> RIB using 4.1M of memory
> Sets using 6.9M of memory
>
> RDE hash statistics
> path hash: size 131072, 4894 entires
> min 0 max 3 avg/std-dev = 0.037/0.000
> aspath hash: size 131072, 1720 entires
> min 0 max 2 avg/std-dev = 0.013/0.000
> attr hash: size 16384, 1061 entires
> min 0 max 2 avg/std-dev = 0.065/0.000
>
> * After:
> RDE memory statistics
> 11560 IPv4 unicast network entries using 452K of memory
> 145 IPv6 unicast network entries using 7.9K of memory
> 34991 rib entries using 2.1M of memory
> 69844 prefix entries using 5.3M of memory
> 4929 BGP path attribute entries using 347K of memory
> and holding 69844 references
> 1727 BGP AS-PATH attribute entries using 76.6K of memory
> and holding 4929 references
> 1066 BGP attributes entries using 41.6K of memory
> and holding 10643 references
> 1065 BGP attributes using 25.6K of memory
> 101809 as-set elements in 58041 tables using 2.1M of memory
> 114429 prefix-set elments using 4.7M of memory
> RIB using 8.4M of memory
> Sets using 6.9M of memory
>
> RDE hash statistics
> path hash: size 131072, 4929 entires
> min 0 max 3 avg/std-dev = 0.038/0.000
> aspath hash: size 131072, 1727 entires
> min 0 max 2 avg/std-dev = 0.013/0.000
> attr hash: size 16384, 1066 entires
> min 0 max 2 avg/std-dev = 0.065/0.000
>
ok this is a more interesting router:
[benoit@border2:~]$ cat before
RDE memory statistics
715727 IPv4 unicast network entries using 27.3M of memory
58953 IPv6 unicast network entries using 3.1M of memory
1549171 rib entries using 94.6M of memory
2897130 prefix entries using 265M of memory
562423 BGP path attribute entries using 60.1M of memory
149579 BGP AS-PATH attribute entries using 6.1M of memory,
and holding 562423 references
37007 BGP attributes entries using 1.4M of memory
and holding 880668 references
37006 BGP attributes using 912K of memory
61964 as-set elements in 58064 tables using 950K of memory
103150 prefix-set elments using 4.3M of memory
RIB using 459M of memory
Sets using 5.2M of memory
RDE hash statistics
path hash: size 131072, 562423 entires
min 0 max 20 avg/std-dev = 4.291/2.364
aspath hash: size 131072, 149579 entires
min 0 max 8 avg/std-dev = 1.141/0.835
attr hash: size 16384, 37007 entires
min 0 max 10 avg/std-dev = 2.259/1.378
[benoit@border2:~]$ cat now
RDE memory statistics
2323535 unspec network entries using 0B of memory
716246 IPv6 unicast network entries using 38.3M of memory
58933 IPv4 vpn network entries using 4.0M of memory
4806161 rib entries using 293M of memory
4806161 prefix entries using 440M of memory
529410 BGP path attribute entries using 56.5M of memory
1945 BGP AS-PATH attribute entries using 134K of memory,
and holding 5807738 references
529410 BGP attributes entries using 20.2M of memory
and holding 32706 references
725558 BGP attributes using 870K of memory
1426888 as-set elements in 32705 tables using 56.7K of memory
61964 prefix-set elments using 101K of memory
RIB using 853M of memory
Sets using 157K of memory
RDE hash statistics
path hash: size 131072, 529410 entires
min 0 max 17 avg/std-dev = 4.039/1.920
aspath hash: size 131072, 136842 entires
min 0 max 8 avg/std-dev = 1.044/0.954
attr hash: size 16384, 32706 entires
min 0 max 10 avg/std-dev = 1.996/1.420