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
o/servicestate/quota_control.go: enforce minimum of 4K for quota groups #10346
o/servicestate/quota_control.go: enforce minimum of 4K for quota groups #10346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit ff59d21 looks good to me, +1
This is to support nesting and to avoid confusing situations like being able to create empty but nested quota groups which trigger oom-killer to be invoked on the empty quota group because newer systems require at least 4K for the accounting of a sub-group. Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
ff59d21
to
54fcd36
Compare
(the force push here was just to rebase on master, sorry I didn't realize it had gotten reviews before force pushing otherwise I would have done a master merge) |
// to allow nesting, otherwise groups with less than 4K will trigger the | ||
// oom killer to be invoked when a new group is added as a sub-group to the | ||
// larger group. | ||
if memoryLimit <= 4*quantity.SizeKiB { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm I guess a quota the size of a single page is not very useful either 🤣 but alas, if one wants to use and learn the hard way I don't see a reason to prevent that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume with this 4k you can add multiple sub-groups as well? It's not 4k for each sub-group? If so, then 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah well actually funny thing you should ask ... no it's 4K per group it seems but we can't know ahead of time how many sub-groups may go into a group. We could however add accounting to ensure that if a child group is being added that the parent has at least 4096 leftover
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now the thing we will do is to just make the minimum 4K and if folks disagree or have issues we can increase it or make other adjustments later.
…mond-edition-2.5 Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
We now have a minimum memory limit of 4K, so we can't use 1K anymore. Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
The spread tests are green again FWIW |
…mond-edition-2.5 Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
…mond-edition-2.5 Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
…mond-edition-2.5 Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
This makes it more clear what the actual necessary size is, which is 4K + 1. Thanks to Samuele for pointing this out. Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
One failure looks real:
unclear if it's a race or a real issue. |
…ups-remastered-deluxe-diamond-edition-2.5
Let's land #10266 before this one, that conflicts with this and much as I would like to land this one, there is the failure that @mvo5 pointed out here and there is a pre-existing race condition that 10266 exacerbates that I would like to solve there. With any luck fixing that race condition there will make this failure go away too |
…mond-edition-2.5 Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Okay, this is now unblocked, let's see how happy the tests are here |
This is to support nesting and to avoid confusing situations like being able to
create empty but nested quota groups which trigger oom-killer to be invoked on
the empty quota group because newer systems require at least 4K for the
accounting of a sub-group.
This came about during investigations of the spread test failures in #10333.