-
Notifications
You must be signed in to change notification settings - Fork 712
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
Faster conntrack parser #2488
Faster conntrack parser #2488
Conversation
Thanks @bboreham ! I shall take a look tomorrow It seems you have put quite a bit of work into this. Wouldn't it have been better spent ditching the text parser and finishing vishvananda/netlink#171 ? After vishvananda/netlink#213 I think it wouldn't had taken too long. |
@2opremio never occurred to me. Maybe raise that as an issue in this repo? |
@bboreham what's happening with this? |
I guess we should close this since we prefer to use eBPF. |
We moved to using netlink in #3298. |
Profiling indicated that conntrack parsing was around 20% of the CPU time of the probe in Weave Cloud dev, so I wrote a scanner/parser instead of relying on
sscanf
andsplit
.Test run decoding a
conntrack -L
dump with 27,000 lines:Before:
After
3.7/17.2=22%
Individual commits left for now in case I need to remember how I got here, but I would squash before merging. I don't recommend reading the individual commits for review.