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

Automated cherry pick of #5532: Improvements to FlowExporter benchmarks #5592: Remove redundant log in fillPodInfo/fillServiceInfo #4252: e2e framework for Antrea's native secondary network #5731: Enhance Records Filtering: Utilizing Labels In The E2E Test #5770: Improve flow-visibility e2e test #5882

Conversation

yuntanghsu
Copy link
Contributor

Cherry pick of #5532 #5592 #4252 #5731 #5770 on release-1.14.

#5532: Improvements to FlowExporter benchmarks
#5592: Remove redundant log in fillPodInfo/fillServiceInfo
#4252: e2e framework for Antrea's native secondary network
#5731: Enhance Records Filtering: Utilizing Labels In The E2E Test
#5770: Improve flow-visibility e2e test

For details on the cherry pick process, see the cherry pick requests page.

antoninbas and others added 14 commits January 16, 2024 14:50
Also add BenchmarkConnStore, meant to measure memory usage of the
connection store (and all the connections).

Signed-off-by: Antonin Bas <[email protected]>
The net/netip package was introduced in Go 1.18. Compared to the
existing net.IP type, the netip.Addr type takes less memory (especially
for IPv6 addresses), is immutable, and is comparable so it supports ==
and can be used as a map key.

In our case, this means that the flowexporter.Connection type takes a
little less memory, and that the flowexporter.Tuple can be used directly
as the flowexporter.ConnectionKey (no need to generate a string for use
as the map key). Overall, this leads to higher performance (decreased
CPU and memory usage) for the FlowExporter.

There is potential for further improvement, as several key functions
take as parameters both the flowexporter.Connection and
flowexporter.ConnectionKey objects, which is no longer really required.

See antrea-io#5271

Signed-off-by: Antonin Bas <[email protected]>
This release uses netip.Addr instead of net.IP to represent connections.

Signed-off-by: Antonin Bas <[email protected]>
Signed-off-by: Antonin Bas <[email protected]>
Signed-off-by: Yun-Tang Hsu <[email protected]>
Signed-off-by: Yun-Tang Hsu <[email protected]>
Signed-off-by: Yun-Tang Hsu <[email protected]>
Signed-off-by: Yun-Tang Hsu <[email protected]>
In this commit, we:
1. Set a label to Perftest Pods before initiating traffic in each subtest to filter records in both the IPFIX collector Pod and the ClickHouse.
2. Remove the --since-time flag used during log retrieval from the IPFIX collector Pod in the e2e test.
3. Cease reliance on timestamps for record filtering due to potential time discrepancies between the testbed and Kubernetes nodes, which might hinder the retrieval of desired logs.

Signed-off-by: Yun-Tang Hsu <[email protected]>
In this commit, we do:

1. Changed the order where we append expired records before exporting them from our exporter.
For inter-node traffic with egress/ingress np with action drop, we will receive records from PacketIn and the conntrack table. For the ingress case, there is no issue as we will receive the records from both nodes and these two records are both correlationRequired. For the egress case, the record from the conntrack table is correlationRequired and the record from PacketIn is not correlationRequired. If the record from the conntrack table arrive at the FA first, then the record will need to do correlation at FA. The ReadyToSend will be true forever as it keeps waiting to do correlation.

2. Add check to verify if Flow Exporters can successfully resolve the Flow Aggregator Service address before sending traffic.

3. Add check to verify if Flow Aggregator can successfully connect to the ClickHouse before sending traffic.

4. Add labels to External subtest to filter useless logs from the IPFIX collector Pod.

5. Confirm the correct addition of a label to a specific Pod after updating the Pod.

6. Remove the octetDeltaCount check and, instead, filter out all records with octetDeltaCount=0 when retrieving records from the IPFIX collector Pod and ClickHouse.

7. Use new image from go-ipfix. We improve the IPFIX collector by:
    a.  Disable printing records whenever we receive it. Instead, we store records in a string array.
    b. Add http listener and handler to receive request to return or reset records.
    In this way, we can reduce the retrieving log time from ~4s to ~80ms when we have ~1900 records
    inside it.

Signed-off-by: Yun-Tang Hsu <[email protected]>
Signed-off-by: Yun-Tang Hsu <[email protected]>
@yuntanghsu yuntanghsu force-pushed the automated-cherry-pick-of-#5532-#5592-#4252-#5731-#5770-upstream-release-1.14 branch from 58c6172 to 88e165f Compare January 16, 2024 23:09
Signed-off-by: Yun-Tang Hsu <[email protected]>
@antoninbas
Copy link
Contributor

Do we really need #5532?

@yuntanghsu
Copy link
Contributor Author

Yes. #5592 is using netip.Addr

@antoninbas
Copy link
Contributor

Yes. #5592 is using netip.Addr

it's very localized, so we could just manually edit getCTNwDstValue potentially?

@yuntanghsu
Copy link
Contributor Author

I thought we need to backport the completed PR. I think we are able to edit getCTNwDstValue and we don't #4252 as I can change the variable name back in #5770?

@antoninbas
Copy link
Contributor

I thought we need to backport the completed PR. I think we are able to edit getCTNwDstValue and we don't #4252 as I can change the variable name back in #5770?

Yes, you can edit a PR manually when you cherry-pick. If there is a conflict, the script will ask you to resolve it manually in another terminal windows.
No need for #4252.

@yuntanghsu
Copy link
Contributor Author

replaced by #5886

@yuntanghsu yuntanghsu closed this Jan 17, 2024
@yuntanghsu yuntanghsu deleted the automated-cherry-pick-of-#5532-#5592-#4252-#5731-#5770-upstream-release-1.14 branch January 17, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants