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

Flag to change size of egress gateway policy map #22929

Closed
pchaigno opened this issue Jan 4, 2023 · 4 comments · Fixed by #23019
Closed

Flag to change size of egress gateway policy map #22929

pchaigno opened this issue Jan 4, 2023 · 4 comments · Fixed by #23019
Labels
feature/egress-gateway Impacts the egress IP gateway feature. good-first-issue Good starting point for new developers, which requires minimal understanding of Cilium. kind/feature This introduces new functionality. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.

Comments

@pchaigno
Copy link
Member

pchaigno commented Jan 4, 2023

We should have an agent flag to change the default size of the egress gateway's policy map, similar to other such flags. This will be needed for users who run out of space in the map (currently sized to 16384).

Initially reported in #22805.

@pchaigno pchaigno added good-first-issue Good starting point for new developers, which requires minimal understanding of Cilium. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. kind/feature This introduces new functionality. feature/egress-gateway Impacts the egress IP gateway feature. labels Jan 4, 2023
@cyclinder
Copy link
Contributor

cyclinder commented Jan 5, 2023

Hi @pchaigno , I'm new to cilium, can I have this ? I'd take this one 😄

@pchaigno
Copy link
Member Author

pchaigno commented Jan 5, 2023

@cyclinder Of course, feel free to submit a pull request. If you need any help, you can ask here or in the Slack #development channel.

@alex-hunt-materialize
Copy link

Are there any significant performance or memory limits to the size of this map? If we were to set it to 1000x the default value, would that be reasonable?

@pchaigno
Copy link
Member Author

For the performance it's hard to say. I would expect performance to depend on the number of entries actually in the map, not its maximum size. It's an LPM map so you can check theoretical lookup and update times for that algorithm.

Regarding memory, the map has a key of size 12B and a value of size 8B. I would expect memory consumption to grow approximately linearly with the number of entries. So for a map of 16384000 entries, you'd have an in-kernel memory consumption of at least 312MiB. Note there's a hard limit on how much memory you can allocated for BPF maps in the kernel, so you wouldn't be able to grow the map to huge sizes (e.g., x100000 is probably not possible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/egress-gateway Impacts the egress IP gateway feature. good-first-issue Good starting point for new developers, which requires minimal understanding of Cilium. kind/feature This introduces new functionality. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants