-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Add runtime option to throttle I/O/network bandwidth? #4763
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
Comments
I like this. Do you know of a small subset that we can implement easily and expose to a user? |
In general, it supports giving each user a "weight" on disk time (similar to CPU shares) or giving an absolute max on IO operations. I think the first one makes more sense and is closer to what Docker does today for other resources |
ping @crosbymichael |
Hi just wondering if there is any further work here? It looks like there has been some blkio stuff added to libcontainer, and this is something we're very interested in. |
Any updates on this? |
@OmgImAlexis blkio is supported.
|
Does this issue apply to limiting bandwidth usage of "docker pull" (download are issued by the dockerd process)? |
@drzraf you can configure the number of concurrent downloads and uploads in the daemon configuration, that option has been around since docker 1.12 (see #22445); to disable concurrent downloads (i.e. only one layer downloaded at a time), set the following in your {
"max-concurrent-downloads": 1,
"max-concurrent-uploads": 1
} See the daemon docs here; https://github.com/moby/moby/blob/67fdf574d5acd6ddccb6ece0ffe0ace1c1608712/docs/reference/commandline/dockerd.md |
Yeah, that did the trick! Thank you for the pointer. Let me write down here the two other suggestions about this (docker/for-mac#357):
|
@cpuguy83 I have tried to use blkio but I get
|
@japrogramer the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Any idea on if and when this might be supported? |
Maybe that project helps But I'm encountering a memory leaking problem with it, still struggling. |
I run a few various downloaders for various things and I'd like to cap each one to X mbps so that one doesn't choke out the rest. This issue has been around for 7 years and with swarm becoming so popular I can imaging that it's a feature that would make sense in the data center as well. Some containers don't need priority/high throughput and I'd like to be able to limit them. |
Coming up on 10 years after this issue was raised, is there anything that can help rate limit a container nowadays? |
Yes, try: container_name
// delete if exists.
// example (limit 10mbit)
|
Thanks @JoaoOtavioS I tried some variant of those commands, without luck.
|
do you run this command inside the container? or outside? |
After a whole decade, let me chime in that I would also like this. |
After a whole decade, let me chime in that I would also like this. |
I know in Docker you can throttle memory using the
-m
option, and you can throttle CPU shares with-c
:http://docs.docker.io/en/latest/reference/run/#runtime-constraints-on-cpu-and-memory
Would it be possible to add an option in Docker to throttle I/O?
I believe the underlying cgroups lets you set limits on blkio devices:
https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt
It would be neat if this could be integrated into Docker, as a runtime option?
The text was updated successfully, but these errors were encountered: