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

GC Improvement #1091

Open
s1061123 opened this issue May 20, 2024 · 1 comment
Open

GC Improvement #1091

s1061123 opened this issue May 20, 2024 · 1 comment
Milestone

Comments

@s1061123
Copy link
Contributor

s1061123 commented May 20, 2024

Currently GC calls with cni.dev/valid-attachments arguments, to specify current valid attachments based on network config.

GCNetworkList(ctx context.Context, net *NetworkConfigList, args *GCArgs) error

If there is multiple network config (one or more CNI is configured in container runtime or by multus), then one plugin may receives multiple GC calls for each network config. (e.g. pluginA GC for config1 and pluignA GC for config2). GC takes a bit huge computation cost, so we should optimize it as much as we can.

Hence we could improve GC calls by

  • Add new GC API (or we just change current GC API because currently none uses it yet)
 GCNetworkLists(ctx context.Context, net []*NetworkConfigList, args *GCArgs) error
  • In new API, we optimize (sort and dedup) for each plugin, invoke GC with valid arguments.
@s1061123 s1061123 changed the title GC i Improvement GC Improvement May 27, 2024
@maiqueb
Copy link
Contributor

maiqueb commented May 30, 2024

/cc

@squeed squeed added this to the CNI v1.2 milestone Jun 10, 2024
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

No branches or pull requests

3 participants