-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Abstract void *aggregate
pointer in struct route_node
#2785
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is wrong in rfapi changes:
seeing:
Program received signal SIGSEGV, Segmentation fault.
rfapiRibFTDFilterRecentPrefix (rfd=0xdc4810, it_rn=0xdc3980,
pfx_target_original=0x7fffffffb830) at rfapi/rfapi_rib.c:1808
1808 if (bgp->rfapi_cfg->rfp_cfg.download_type != RFAPI_RFP_DOWNLOAD_FULL)
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.212.el6.x86_64 json-c-0.11-13.el6.x86_64 libattr-2.4.44-7.el6.x86_64 libcap-2.16-5.5.el6.x86_64 libgcc-4.4.7-18.el6.x86_64 nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64
(gdb) where
#0 rfapiRibFTDFilterRecentPrefix (rfd=0xdc4810, it_rn=0xdc3980,
pfx_target_original=0x7fffffffb830) at rfapi/rfapi_rib.c:1808
#1 0x000000000048cf5a in rfapiNhlAddNodeRoutes (rn=0xdc3980, rprefix=0x7fffffffb740,
lifetime=45, removed=0, head=0x7fffffffb768, tail=0x7fffffffb760,
exclude_vnaddr=0xdc4428, rfd_rib_node=0xdc87e0, pfx_target_original=0x7fffffffb830)
at rfapi/rfapi_import.c:1555
#2 0x000000000048d820 in rfapiRouteNode2NextHopList (rn=0xdc3980, lifetime=45,
exclude_vnaddr=0xdc4428, rfd_rib_table=0xdc4810, pfx_target_original=0x7fffffffb830)
at rfapi/rfapi_import.c:1786
#3 0x0000000000491be8 in rfapi_query_inner (handle=0xdc4410, target=0xdb77f4,
l2o=, ppNextHopEntry=0x7fffffffd9e8) at rfapi/rfapi.c:1755
#4 rfapi_query (handle=0xdc4410, target=0xdb77f4, l2o=,
ppNextHopEntry=0x7fffffffd9e8) at rfapi/rfapi.c:2755
#5 0x00000000004c6a15 in rfp_query_impl (data=0xdc2630) at rfp_query.c:237
#6 0x00000000004cd4ae in rfp_dispatcher_accept (thread=)
at rfp_dispatcher.c:280
#7 0x00000000004f230f in thread_call (thread=0x7fffffffdca0) at lib/thread.c:1577
#8 0x00000000004dce3e in frr_run (master=0x7b86e0) at lib/libfrr.c:914
#9 0x000000000042378d in main (argc=19, argv=0x7fffffffded8) at bgp_main.c:432
Update -> I have not been able to get back to this until today. I will look at it this afternoon and see if I can fix this up. |
d4ebcfb
to
f82911d
Compare
Pushing changes up to fix merge error so I can work on changes on another box. |
f82911d
to
89554d4
Compare
latest crash in labn ci testing: |
89554d4
to
8387b57
Compare
8387b57
to
294ca8b
Compare
294ca8b
to
58570de
Compare
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-5111/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
CLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
5 Static Analyzer issues remaining.See details at |
58570de
to
93e852d
Compare
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-5117/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base4 Static Analyzer issues remaining.See details at |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
On a 32 bit system with a full bgp feed: Post changes: About 14 mb per process for a full bgp feed. So we are saving 28mb |
5% savings right? Is it worth the added completely?
…----------
On August 30, 2018 5:28:50 PM Donald Sharp ***@***.***> wrote:
On a 32 bit system with a full bgp feed:
Pre-changes:
annie# show mem
Memory statistics for zebra:
System allocator statistics:
Total heap allocated: 378 MiB
Memory statistics for bgpd:
System allocator statistics:
Total heap allocated: 292 MiB
Post changes:
Memory statistics for zebra:
System allocator statistics:
Total heap allocated: 364 MiB
Memory statistics for bgpd:
System allocator statistics:
Total heap allocated: 281 MiB
About 14 mb per process for a full bgp feed. So we are saving 28mb
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#2785 (comment)
|
Add a abstraction for `struct route_node` and `struct route_table` such that we can have an aggregate route_node and table. This is because only bgp/rfapi and ripng use the aggregate data pointer in `struct route_node`. For full route tables other routing protocols and tables are paying a 8 byte overhead per node. A full bgp table ends up being ~1.2 million routes in bgp and zebra. This is not an insiginificant amount of data. So create the data structures for this replacement, but do not replace the aggregate pointer yet. This is because later commits will convert rfapi and ripng over to this new data, and finally we'll move the aggregate pointer. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Switch bgp and ripngd to use the new aggregate table and route data structures. This was mainly a search and replace operation. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Move the aggregate pointer from the route_node into agg_node so that people using struct route_node will see a savings in data size. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
93e852d
to
c2b2356
Compare
I think so, especially once we start cleaning up the |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-5123/ This is a comment from an EXPERIMENTAL automated CI system. CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base4 Static Analyzer issues remaining.See details at |
The
struct route_node
data structure has avoid *aggregate
pointer that is being used by rfapi and ripngd. For a full bgp feed, this is causing an extra 8 bytes per node over 1.2 million nodes in bgp and zebra alone.Create a
struct agg_node
and astruct agg_table
data structure that we can replace into rfapi and ripng, then work magic over those code bases to convert over to the new data structure. Finally move the aggregate pointer in to thestruct agg_node
data structure.