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
Add support for blkio read/write iops device #15879
Add support for blkio read/write iops device #15879
Conversation
8c2fad3
to
c58fb34
Compare
@@ -38,6 +38,38 @@ const ( | |||
platformSupported = true | |||
) | |||
|
|||
func getBlkioReadIOpsDevice(config *runconfig.HostConfig) ([]string, error) { |
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.
This and getBlkioWriteIOpsDevice
look exactly the same. Can we instead pass a value instead of runconfig.HostConfig?
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.
@cpuguy83 fixed.
73a5588
to
7077586
Compare
@Mashimiao need rebase |
@Mashimiao Would you mind to answer @thaJeztah question? |
I think this can go ahead now :) |
@Mashimiao whoa, sorry, need rebase again. |
4a0988c
to
b65bcfb
Compare
@LK4D4 @runcom @thaJeztah PR rebased and fixed. I think it failed with unrelated case. |
Thanks @Mashimiao, test failure will be fixed in #18458 |
#18458 was merged, so if you rebase, the tests should be green again |
ping @thaJeztah @moxiegirl |
Docs LGTM. Unfortunately, this PR will need to be rebased before merging. @thaJeztah can you take a look? |
a015698
to
7cf4d13
Compare
@calavera thanks, rebased. |
7cf4d13
to
274dad5
Compare
@@ -999,6 +1001,21 @@ Both flags take limits in the `<device-path>:<limit>[unit]` format. Both read | |||
and write rates must be a positive integer. You can specify the rate in `kb` | |||
(kilobytes), `mb` (megabytes), or `gb` (gigabytes). | |||
|
|||
The `--device-read-iops` flag limits read rate (IO per second) from a device. | |||
For example, this command creates a container and limits the read rate to | |||
`1000` per second from `/dev/sda`: |
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.
nit: s/1000
per second/1000
IO per second/
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.
fixed
Thanks @Mashimiao two nits. Also can you add the new options to the API changelog, for example:
(We forgot to add "BlkioThrottleReadBpsDevice" and "BlkioThrottleWriteBpsDevice" to the change log in #14466) |
274dad5
to
843084b
Compare
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
@thaJeztah added to api Changes |
jenkins failed with unrelated case |
Thanks @Mashimiao, happy to see this ready to merge!! LGTM Documentation is basically the same as for blkioBps, so it should be good to go. Moving to "merge" I restarted janky and experimental, but the failing tests are not related, probably a time issue;
|
seems like failure comes from #18820 |
@runcom yes I just found that one, to check if an issue was already created for it. |
@Mashimiao can you rebase? Tests should be fixed after that (by #18820) |
It's green! \o/ :tada: |
Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com