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 bps device #14466
Conversation
e5f9b19
to
e883cdf
Compare
@Mashimiao don't know why, but this continue to fail on jenkins. Could you try to rebase against master pls? |
8bacfda
to
3cc1693
Compare
@LK4D4, in daemon file I have imported |
0ed2fdd
to
4fa457e
Compare
For reference, same problem as in #14006 (comment) we need to have a policy on what to do with these cgroups flags. |
0f8e734
to
9dca02a
Compare
@@ -1027,6 +1027,7 @@ _docker_run() { | |||
--net | |||
--pid | |||
--publish -p | |||
--read-bps-device |
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.
@Mashimiao could this be device-bps-read
for lexicographical order?
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.
Hi @tiborvass --read-bps-device comes from cgroup file blkio.throttle.read_bps_device. I think it's better to keep the same format with cgroup. If familiar with cgroup, it's easier for people to understand what they are going to set. But if you insisted, I think I'm OK to change it.
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 agree with @tiborvass here.
Most of the cgroup names are pretty sane, but this one is a bit backwards to me. I'd prefer to provide a better name, especially since this will be shared by other platforms.
This is just a nit...
We could probably even go a bit further and say device-read-rate
and have it accept a user-friendly value (e.g. 50mbps
or something instead of 52428800
).
For the same reasons described in #14006 (comment) I think we should accept these flags. |
@tiborvass Should we go ahead and move to code-review? |
@cpuguy83 was thinking we could wait for OP to answer to see if he disagrees. |
@jfrazelle I don't see a test in here either...you mentioned having one earlier. You OK without it? |
would be niceee On Tue, Dec 1, 2015 at 8:44 AM, moxiegirl notifications@github.com wrote:
|
I actually really think we need one On Tue, Dec 1, 2015 at 4:41 PM, Jessie Frazelle jess@docker.com wrote:
|
@jfrazelle Can somebody take it in a followup PR? This has been opened for quite some months already :-( |
Ya as long as we make an issue so we don't forget I can make a test |
0eaa5ae
to
bfd2d73
Compare
rebased and fixed. |
is this good to merge (given the lack of tests which will be addressed in another PR, I can take care of it also)? ping @jfrazelle |
@@ -462,6 +462,8 @@ __docker_subcommand() { | |||
"($help)*--cap-drop=[Drop Linux capabilities]:capability: " | |||
"($help)--cidfile=[Write the container ID to the file]:CID file:_files" | |||
"($help)*--device=[Add a host device to the container]:device:_files" | |||
"($help)--device-read-bps=[Limit the read rate (bytes per second) from a device]:device:IO rate: " | |||
"($help)--device-write-bps=[Limit the write rate (bytes per second) to a device]:device:IO rate: " |
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.
Just saw @sdurrheimer comment in your other PR (yay, I'm learning!) these should probably have a a *
in front of --
, so "($help)*--device...
Thanks @Mashimiao, I left some comments, but we're almost there! |
c6639b4
to
b2ca41f
Compare
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
b2ca41f
to
3f15a05
Compare
Thanks @Mashimiao LGTM @runcom will work on a test; I saw some tiny issues with the docs, but I'll create a follow up PR to fix those. Thank you for contributing! |
Add support for blkio read/write bps device
Is #20077 a expected behaivor? |
Is it possible to use the parameter device-read-bps/device-read-bps for |
Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com