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

do not filter endpoints by procspied/ebpf in renderers #2652

Merged
merged 2 commits into from
Jun 28, 2017

Conversation

rade
Copy link
Member

@rade rade commented Jun 27, 2017

The filtering of endpoints causes some connections to get missed for non-eBPF-tracked connections. Furthermore, the filtering of endpoints is entirely pointless when the probes run eBPF since the filters just pass through eBPF-tracked endpoints (for good reason too; because otherwise some connections would be missed). So in that case it is just costing CPU and removing it actually improves performance.

Note that removing the filtering does not result in over-counting connections since that is done by source ip:port pairs.

Fixes #2551.
Fixes #2558.

rade added 2 commits June 27, 2017 20:28
The filtering of endpoints causes some connections to get missed for
non-eBPF-tracked connections. Furthermore, the filtering of endpoints
is entirely pointless when the probes run eBPF since the filters just
pass through eBPF-tracked endpoints (for good reason too; because
otherwise some connections would be missed). So in that case it is
just costing CPU and removing it actually improves performance.

Note that removing the filtering does not result in over-counting
connections since that is done by source ip:port pairs.

Fixes #2551.
Fixes #2558.
The change is necessitated by the removal of procspied/ebpf endpoint
filtering in the renderers, as a result of which the odd
conntracked-only, unconnected pseudo node can sneak through.

This new way of doing things also makes renderers more composable and
robust, and more directly reflects the objective:
- in the process topologies, filter out all unconnected nodes
- in all other topologies, filter out unconnected pseudo nodes
@rade rade requested a review from 2opremio June 27, 2017 19:29
@rade
Copy link
Member Author

rade commented Jun 27, 2017

Performance comparison using a recent eBPF-based Weave Cloud prod report, timing the http api calls to retrieve topologies:

topology master branch
processes 0.59 0.45
containers 1.6 1.3
pods 1.5 1.2
kube-controllers 1.5 1.3
services 1.5 1.3
hosts 2.0 1.6

(all times in seconds)

@2opremio
Copy link
Contributor

More accurate, cleaner code and it even improves performance: fantastic

@@ -22,7 +22,7 @@ func renderProcesses(rpt report.Report) bool {
}

// EndpointRenderer is a Renderer which produces a renderable endpoint graph.
var EndpointRenderer = FilterProcspiedOrEBPF(SelectEndpoint)
var EndpointRenderer = SelectEndpoint

This comment was marked as abuse.

This comment was marked as abuse.

@rade
Copy link
Member Author

rade commented Jun 28, 2017

and it even improves performance

For the eBPF case. It hurts performance for the non-eBPF case.

@rade rade merged commit 5317b22 into master Jun 28, 2017
@rade rade deleted the do-not-filter-endpoint branch July 5, 2017 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants