CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add ctr support for CPUMax and CPUShares #6809
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
Conversation
Hi @jterry75. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Looks like the unit tests need to be updated too. |
Well its kinda a lame test because it doesnt make sense to call WithWindowsCPU* when its LCOW, but either way those methods dont touch Linux so they shouldnt create that resource. I have broken apart |
Build succeeded.
|
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.
LGTM
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.
LGTM
@kevpar - Mind taking a look when you get some time. Thanks! Just a testing change really but it could be used by consumers of the oci package later. Works like a champ though |
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.
LGTM, small suggestion
cmd/ctr/commands/commands_windows.go
Outdated
}, | ||
cli.Uint64Flag{ | ||
Name: "cpu-max", | ||
Usage: "The number of processor cycles threads in a container can use per 10,000 cycles. Set to a percentage times 100. Between 0 and 10,000", |
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 think this actually has to be at least 1. Under the hood this translates to setting via JOBOBJECT_CPU_RATE_CONTROL_INFORMATION
, and the CpuRate
member can't be 0.
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.
Good catch! Thanks Kevin
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.
Minor comment but LGTM. Thanks Justin!
Adds CPU.Maximum and CPU.Shares support to the ctr cmdline for testing Signed-off-by: Justin Terry <jlterry@amazon.com>
Adds CPU.Maximum and CPU.Shares support to the ctr
cmdline for testing
Signed-off-by: Justin Terry jlterry@amazon.com