[BGPCEP-164] RIBs memory efficiency Created: 13/Nov/14  Updated: 03/Mar/19  Due: 30/Apr/15  Resolved: 22/Apr/15

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration

Type: Improvement
Reporter: Robert Varga Assignee: Dana Kutenicsova
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by YANGTOOLS-435 BindingCodecTreeNode does not allow e... Resolved
is blocked by YANGTOOLS-437 Binding Data Codec: TreeNode does not... Resolved

 Description   

Analysis of a moderately-loaded local rib points to the fact that we could do a lot better where memory efficiency is concerned.

One notable area is the AbstractAdjRIBs$RIBEntry, which contains a 16-entry HashMap for candidates, typically costing us 176 bytes per entry. There is an upper cap as to how many entries that map can have, which is directly tied to the number of peers currently contributing to that particular table instance.

We can take advantage of this knowledge and maintain the candidates in a fixed-size array. The table instance will maintain Peer->offset mapping, reformatting entries as the configuration changes. Each entry will then contain a simple fixed array into which the appropriate attributes will be stored.

This can be used to also track outbound state, further improving efficiency of the entire solution. Be sure to factor those requirements in the solution.



 Comments   
Comment by Dana Kutenicsova [ 19/Nov/14 ]

https://git.opendaylight.org/gerrit/12922

Generated at Wed Feb 07 19:12:13 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.