Commit 815ca4c
Do not preserve MPReachNLRI attribute the way we receive it from wire
Right now table.ProcessMessage() rebuilds attribute list, but preserves
MPReachNLRI attribute as is. This causes trouble if GoBGP has a neighbor
that merges multiple NLRIs having same nexthop in a single BGP update
message and if GoBGP has a watcher. Thus watcher receives up to n^2
nlris (n paths each containing n NLRIs) causing enormous memory
consumption (since serialization/deserialization removes deduplication).
Since having all NLRIs in each path is useless in most cases, the
behavior is changed so only relevant NLRI is present in BGP path.
In our tests memory consumption of such watcher had reduced from 19 Gb
to 2Gb (with around 300K routes in RIB).1 parent 08a001e commit 815ca4c
2 files changed
+57
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 91 | + | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
99 | 96 | | |
100 | 97 | | |
101 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
114 | 127 | | |
115 | 128 | | |
116 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1979 | 1979 | | |
1980 | 1980 | | |
1981 | 1981 | | |
1982 | | - | |
1983 | | - | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
1984 | 1987 | | |
1985 | | - | |
| 1988 | + | |
1986 | 1989 | | |
1987 | 1990 | | |
1988 | | - | |
| 1991 | + | |
1989 | 1992 | | |
1990 | 1993 | | |
1991 | 1994 | | |
1992 | 1995 | | |
1993 | | - | |
| 1996 | + | |
1994 | 1997 | | |
1995 | 1998 | | |
1996 | 1999 | | |
1997 | 2000 | | |
1998 | | - | |
| 2001 | + | |
1999 | 2002 | | |
2000 | 2003 | | |
2001 | 2004 | | |
2002 | 2005 | | |
2003 | | - | |
| 2006 | + | |
2004 | 2007 | | |
2005 | 2008 | | |
2006 | 2009 | | |
2007 | 2010 | | |
2008 | 2011 | | |
2009 | | - | |
2010 | | - | |
| 2012 | + | |
2011 | 2013 | | |
2012 | 2014 | | |
2013 | 2015 | | |
| |||
2105 | 2107 | | |
2106 | 2108 | | |
2107 | 2109 | | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
2108 | 2139 | | |
2109 | 2140 | | |
2110 | 2141 | | |
| |||
0 commit comments