Add topic about limiting container resources#334
Add topic about limiting container resources#334johndmulhausen merged 1 commit intodocker:masterfrom mdlinville:run_reference_reorg
Conversation
thaJeztah
left a comment
There was a problem hiding this comment.
oh! Looks like I didn't submit, not sure if I was done, so I'll just post my "pending" comments
engine/admin/resource_constraints.md
Outdated
| on when you should set such limits and the possible implications of setting them. | ||
|
|
||
| >**Note**: You can only control memory, CPU, or block IO. Other runtime limits | ||
| are not currently supported. |
There was a problem hiding this comment.
I'm always a bit cautious with adding explicit lists of what's supported; it easily gets out of sync with the actual feature set.
engine/admin/resource_constraints.md
Outdated
| one option is set. | ||
|
|
||
| Most of these options take a positive integer, followed by a suffix of `b`, `k`, | ||
| `m`, `g`, to indicate the unit. |
There was a problem hiding this comment.
Do we need to mention what the units stand for here, or do you think it's sufficient that it's mentioned in the example below?
engine/admin/resource_constraints.md
Outdated
| that can be used, and `--memory` controls the amount used by non-swap | ||
| memory. So if `--memory="300m"` and `--memory-swap="1g"`, the container | ||
| can use 300m of memory and 700m (1g - 300m) swap. | ||
| - If set to `-1`, the container is allowed to use unlimited swap memory. |
There was a problem hiding this comment.
Perhaps mention that this is the default?
_data/toc.yaml
Outdated
| - path: /engine/admin/host_integration/ | ||
| title: Automatically start containers | ||
| - path: /engine/admin/resource_constraints/ | ||
| title: Limiting a container's resources |
engine/admin/resource_constraints.md
Outdated
| @@ -0,0 +1,180 @@ | |||
| --- | |||
| aliases: ["/engine/articles/systemd/"] | |||
There was a problem hiding this comment.
redirect_from:
- /engine/articles/systemd/
engine/admin/resource_constraints.md
Outdated
| @@ -0,0 +1,180 @@ | |||
| --- | |||
| aliases: ["/engine/articles/systemd/"] | |||
| title: "Constrain a container's resources" | |||
There was a problem hiding this comment.
title: Limit a container's resources
engine/admin/resource_constraints.md
Outdated
| keywords: ["docker, daemon, configuration"] | ||
| --- | ||
|
|
||
| # Limiting a container's resources |
engine/admin/resource_constraints.md
Outdated
| aliases: ["/engine/articles/systemd/"] | ||
| title: "Constrain a container's resources" | ||
| description: "Limiting the system resources a container can use" | ||
| keywords: ["docker, daemon, configuration"] |
There was a problem hiding this comment.
keywords: docker, daemon, configuration
|
Been quiet here! @mstanleyjones you have some good edits that we should get in! Do you need more feedback? |
|
Addressed feedback, adjusted YAML. |
|
@johndmulhausen please re-review and merge if you like it. |
|
Deploy preview ready! Built with commit 97d8ab1 |
|
In looking at the deploy preview I feel like the page isn't very scannable/user-friendly as formatted. I know it's a pain, but could we turn this into several tables? |
Moved from upstream PR moby/moby#26791 Signed-off-by: Misty Stanley-Jones <[email protected]> (cherry picked from commit 0a924369dc086a19bb0484ca2a53fb485ed99801) Signed-off-by: Misty Stanley-Jones <[email protected]>
|
OK, @johndmulhausen I can't believe you made me do that, but you are right, it reads better. Markdown tables are so terrible! 💯 Anyway, PTAL and let me know if this is better. This PR is holding up another one I need to get in. |
|
Thanks a ton, @mstanleyjones -- I know MD tables are just awful but this is so much better. :) |
Describe the proposed changes
Rewrites to the Run Reference. This work was started before the migration and is split across this PR and moby/moby#26791.
Project version
n/a
Related issue
n/a
Related issue or PR in another project
moby/moby#26791
Please take a look
@thaJeztah @dnephin