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

Reduce memory consumption of supportbundle command #2813

Merged
merged 1 commit into from Sep 23, 2021

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Sep 22, 2021

Instead of creating a buffer which buffers all converted objects and
outputs to file together, this patch traverses the item list, and
converts and outputs items one by one.

Signed-off-by: Quan Tian qtian@vmware.com

In a scale cluster with 26,000+Pods, the memory usage is reduced from
16GB to 600MB.

@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2021

Codecov Report

Merging #2813 (420e777) into main (b0e2299) will decrease coverage by 2.40%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2813      +/-   ##
==========================================
- Coverage   61.49%   59.09%   -2.41%     
==========================================
  Files         284      284              
  Lines       23549    23549              
==========================================
- Hits        14482    13916     -566     
- Misses       7506     8151     +645     
+ Partials     1561     1482      -79     
Flag Coverage Δ
kind-e2e-tests 45.95% <ø> (-3.06%) ⬇️
unit-tests 41.10% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/agent/apiserver/handlers/featuregates/handler.go 0.00% <0.00%> (-82.36%) ⬇️
...kg/apiserver/registry/system/supportbundle/rest.go 19.54% <0.00%> (-55.18%) ⬇️
pkg/support/dump_others.go 0.00% <0.00%> (-51.73%) ⬇️
...ver/registry/controlplane/nodestatssummary/rest.go 50.00% <0.00%> (-50.00%) ⬇️
pkg/support/dump.go 8.13% <0.00%> (-49.60%) ⬇️
...g/agent/apiserver/handlers/addressgroup/handler.go 0.00% <0.00%> (-40.00%) ⬇️
...agent/apiserver/handlers/appliedtogroup/handler.go 0.00% <0.00%> (-40.00%) ⬇️
pkg/apiserver/handlers/loglevel/handler.go 0.00% <0.00%> (-38.47%) ⬇️
pkg/agent/util/net.go 16.66% <0.00%> (-22.92%) ⬇️
pkg/agent/route/route_linux.go 28.52% <0.00%> (-21.48%) ⬇️
... and 27 more

@tnqn tnqn force-pushed the reduce-supportbundle-memory branch from 4d90765 to 9a75991 Compare September 22, 2021 14:45
Instead of creating a buffer which buffers all converted objects and
outputs to file together, this patch traverses the item list, and
converts and outputs items one by one.

Signed-off-by: Quan Tian <qtian@vmware.com>
@tnqn tnqn force-pushed the reduce-supportbundle-memory branch from 9a75991 to 420e777 Compare September 22, 2021 14:46
@tnqn
Copy link
Member Author

tnqn commented Sep 22, 2021

/test-all

@tnqn tnqn mentioned this pull request Sep 22, 2021
Copy link
Contributor

@mengdie-song mengdie-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change.

@hangyan
Copy link
Member

hangyan commented Sep 23, 2021

/lgtm

@tnqn
Copy link
Member Author

tnqn commented Sep 23, 2021

/test-conformance

@tnqn tnqn merged commit 40d27a3 into antrea-io:main Sep 23, 2021
@tnqn tnqn deleted the reduce-supportbundle-memory branch September 23, 2021 04:53
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.

None yet

5 participants