<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Helvetica Neue";
panose-1:2 0 5 3 0 0 0 2 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
p.p1, li.p1, div.p1
{mso-style-name:p1;
margin:0in;
font-size:9.0pt;
font-family:"Helvetica Neue";}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="PL">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PL"><o:p> </o:p></span></p>
<p class="MsoNormal">We’ve built Bird from origin/bmp branch and found out that BMP most likely introduces memory leak.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In the experiment, the device has 4 BGP peers (see attached bird.conf).<o:p></o:p></p>
<p class="MsoNormal">The device is flooded with massive number of routes from each peer.<o:p></o:p></p>
<p class="MsoNormal">Memory-usage snapshots are taken: before flooding with routes, after flooding with routes,
<o:p></o:p></p>
<p class="MsoNormal">after dropping BGP sessions and waiting for routes to be removed for Linux.<o:p></o:p></p>
<p class="MsoNormal">The experiment was performed twice: with and without BMP configured.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Case 1: With BMP configured:<o:p></o:p></p>
<p class="MsoNormal"> Before flooding:<o:p></o:p></p>
<p class="p1"> BIRD memory usage<o:p></o:p></p>
<p class="p1"> Routing tables: <span class="apple-converted-space"> </span>20 kB<o:p></o:p></p>
<p class="p1"> Route attributes: 6224<span class="apple-converted-space"> </span>
B<o:p></o:p></p>
<p class="p1"> Protocols:<span class="apple-converted-space"> </span>33 kB<o:p></o:p></p>
<p class="p1"> Total: <span class="apple-converted-space"> </span>123 kB<o:p></o:p></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">After flooding (about 1150000 routes in Linux):<o:p></o:p></span></p>
<p class="p1"> BIRD memory usage<o:p></o:p></p>
<p class="p1"> Routing tables:<span class="apple-converted-space"> </span>412 MB<o:p></o:p></p>
<p class="p1"> Route attributes: <span class="apple-converted-space"> </span>11 kB<o:p></o:p></p>
<p class="p1"> Protocols:<span class="apple-converted-space"> </span>1473 MB<o:p></o:p></p>
<p class="p1"> Total:<span class="apple-converted-space"> </span>1885 MB<o:p></o:p></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">After dropping BGP sessions and waiting for routes to be removed from kernel:<o:p></o:p></span></p>
<p class="p1"> BIRD memory usage<o:p></o:p></p>
<p class="p1"> Routing tables:<span class="apple-converted-space"> </span>284 kB<o:p></o:p></p>
<p class="p1"> Route attributes: <span class="apple-converted-space"> </span>10 kB<o:p></o:p></p>
<p class="p1"> Protocols:<span class="apple-converted-space"> </span>1018 MB<o:p></o:p></p>
<p class="p1"> Total:<span class="apple-converted-space"> </span>1019 MB<o:p></o:p></p>
<p class="p1"><o:p> </o:p></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Case 2: Same config, but without protocol bmp {…}:<o:p></o:p></span></p>
<p class="MsoNormal"> Before flooding:<o:p></o:p></p>
<p class="p1"> BIRD memory usage<o:p></o:p></p>
<p class="p1"> Routing tables: <span class="apple-converted-space"> </span>
20 kB<o:p></o:p></p>
<p class="p1"> Route attributes: 6224<span class="apple-converted-space"> </span>
B<o:p></o:p></p>
<p class="p1"> Protocols:<span class="apple-converted-space"> </span>
26 kB<o:p></o:p></p>
<p class="p1"> Total: <span class="apple-converted-space"> </span>112 kB<o:p></o:p></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> After flooding (about 1130000 routes in Linux):<o:p></o:p></span></p>
<p class="p1"> BIRD memory usage<o:p></o:p></p>
<p class="p1"> Routing tables:<span class="apple-converted-space"> </span>381 MB<o:p></o:p></p>
<p class="p1"> Route attributes: <span class="apple-converted-space"> </span>
11 kB<o:p></o:p></p>
<p class="p1"> Protocols: <span class="apple-converted-space"> </span>163 MB<o:p></o:p></p>
<p class="p1"> Total: <span class="apple-converted-space"> </span>544 MB<o:p></o:p></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> After dropping BGP sessions and waiting for routes to be removed from kernel:<o:p></o:p></span></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
</span>BIRD memory usage<o:p></o:p></p>
<p class="p1"> Routing tables:<span class="apple-converted-space"> </span>284 kB<o:p></o:p></p>
<p class="p1"> Route attributes: <span class="apple-converted-space"> </span>
10 kB<o:p></o:p></p>
<p class="p1"> Protocols: <span class="apple-converted-space"> </span>795 kB<o:p></o:p></p>
<p class="p1"> Total:<span class="apple-converted-space"> </span>1153 kB<o:p></o:p></p>
<p class="p1"><o:p> </o:p></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">We would like to ask about code examination and pointing us towards probable cause of the issue,<o:p></o:p></span></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">because we are unable to find it ourselves.<o:p></o:p></span></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks in advance and regards,<o:p></o:p></span></p>
<p class="p1"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Dawid Macek<o:p></o:p></span></p>
</div>
</body>
</html>