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

Use Netlink to Fetch TCP states #1061

Closed
kustodian opened this issue Sep 5, 2018 · 4 comments · Fixed by #2322
Closed

Use Netlink to Fetch TCP states #1061

kustodian opened this issue Sep 5, 2018 · 4 comments · Fixed by #2322

Comments

@kustodian
Copy link

kustodian commented Sep 5, 2018

Currently tcpstat collector uses /proc/net/tcp and /proc/net/tcp6 to fetch TCP states, which can be (as the documentation states) slow on high traffic hosts. To resolve these performance problems it should use Netlink instead, because Netlink is a few times faster. After this is implemented, tcpstat collector should probably be turned on by default.

@SuperQ
Copy link
Member

SuperQ commented Sep 5, 2018

Seems like a good idea, we need to be careful as we've seen issues with netlink causing crashes due to CGO interactions in the wifi collector.

@iyashu
Copy link

iyashu commented Aug 26, 2020

Is anyone already working on this? @discordianfish @SuperQ

We need to enable tcp connection stats (including their states) from node-exporter for k8s cluster to track connection leaks & related fd usage. If any one haven't started working on it, I can start exploring netlink and ways to integrate it with tcpstat.

@SuperQ
Copy link
Member

SuperQ commented Aug 31, 2020

No, I don't think anyone is working on this. Thanks for volunteering.

One note. If possible, this should be implemented so that it replaces the collector completely. Keeping two ways of getting the same metrics is not a great idea. I guess it depends on if the transition can be done cleanly.

@ojagodzinski
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants