Denis Fondras(open...@ledeuns.net) 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
> 
> I need to test it on a router with a fullview.


two full views v4 + v6, the usual testbox:

before:

[benoit@fw-ipv6onlyorg:/usr/src/usr.sbin/bgpd]$ cat  /tmp/old  
RDE memory statistics
    714558 IPv4 unicast network entries using 27.3M of memory
     58836 IPv6 unicast network entries using 3.1M of memory
   1546598 rib entries using 94.4M of memory
   3093193 prefix entries using 236M of memory
    413229 BGP path attribute entries using 28.4M of memory
           and holding 3093193 references
    108607 BGP AS-PATH attribute entries using 4.3M of memory
           and holding 413229 references
     43526 BGP attributes entries using 1.7M of memory
           and holding 1563107 references
     43525 BGP attributes using 1.1M of memory
      1055 as-set elements in 1 tables using 32B of memory
        12 prefix-set elments using 504B of memory
RIB using 396M of memory
Sets using 536B of memory

RDE hash statistics
        path hash: size 131072, 413229 entires
            min 0 max 14 avg/std-dev = 3.153/1.749
        aspath hash: size 131072, 108607 entires
            min 0 max 7 avg/std-dev = 0.829/0.560
        attr hash: size 16384, 43526 entires
            min 0 max 11 avg/std-dev = 2.657/1.394


after:

[benoit@fw-ipv6onlyorg:/usr/src/usr.sbin/bgpd]$ cat  /tmp/new2 
RDE memory statistics
    714521 IPv4 unicast network entries using 27.3M of memory
     58831 IPv6 unicast network entries using 3.1M of memory
   1546515 rib entries using 94.4M of memory
   3093028 prefix entries using 236M of memory
    391788 BGP path attribute entries using 26.9M of memory
           and holding 3093028 references
    111348 BGP AS-PATH attribute entries using 4.5M of memory
           and holding 391788 references
     43780 BGP attributes entries using 1.7M of memory
           and holding 1442079 references
     43779 BGP attributes using 1.2M of memory
      1055 as-set elements in 1 tables using 32B of memory
        12 prefix-set elments using 504B of memory
RIB using 395M of memory
Sets using 536B of memory

RDE hash statistics
        path hash: size 131072, 391788 entires
            min 0 max 14 avg/std-dev = 2.989/1.751
        aspath hash: size 131072, 111348 entires
            min 0 max 8 avg/std-dev = 0.850/0.528
        attr hash: size 16384, 43780 entires
            min 0 max 11 avg/std-dev = 2.672/1.364

Reply via email to