Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 memory optimizations #15266

Merged
merged 2 commits into from
Feb 1, 2024
Merged

2 memory optimizations #15266

merged 2 commits into from
Feb 1, 2024

Conversation

donaldsharp
Copy link
Member

  1. Reduce hash_bucket size by 8 bytes - 2 full bgp feeds results in 4mb of data savings
  2. Reduce bgp_path_info_extra size when compiling with vnc from 184 bytes to 78. Saves ~100mb with 2 full bgp feeds.

Copy link
Contributor

@mjstapp mjstapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine

pahole reports that the hash_bucket has 2 4 byte holes
in the data structure.  Let's reorganize this a bit
and save 8 bytes per hash_bucket instance.

Signed-off-by: Donald Sharp <[email protected]>
Structure size of bgp_path_info_extra when compiled
with vnc is 184 bytes.  Reduce this size to 72 bytes
when compiled w/ vnc but not necessarily turned
on vnc.

With 2 full bgp feeds this saves aproximately 100mb
when compiling with vnc and not using vnc.

Signed-off-by: Donald Sharp <[email protected]>
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@riw777 riw777 merged commit 398c700 into FRRouting:master Feb 1, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants