Skip to content

Add topic about limiting container resources#334

Merged
johndmulhausen merged 1 commit intodocker:masterfrom
mdlinville:run_reference_reorg
Nov 28, 2016
Merged

Add topic about limiting container resources#334
johndmulhausen merged 1 commit intodocker:masterfrom
mdlinville:run_reference_reorg

Conversation

@mdlinville
Copy link

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

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh! Looks like I didn't submit, not sure if I was done, so I'll just post my "pending" comments

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Limiting/Limit

@@ -0,0 +1,180 @@
---
aliases: ["/engine/articles/systemd/"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redirect_from: 
- /engine/articles/systemd/

@@ -0,0 +1,180 @@
---
aliases: ["/engine/articles/systemd/"]
title: "Constrain a container's resources"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

title: Limit a container's resources

keywords: ["docker, daemon, configuration"]
---

# Limiting a container's resources
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove me

aliases: ["/engine/articles/systemd/"]
title: "Constrain a container's resources"
description: "Limiting the system resources a container can use"
keywords: ["docker, daemon, configuration"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keywords: docker, daemon, configuration

@johndmulhausen
Copy link
Contributor

Been quiet here! @mstanleyjones you have some good edits that we should get in! Do you need more feedback?

@mdlinville
Copy link
Author

Addressed feedback, adjusted YAML.

@mdlinville
Copy link
Author

@johndmulhausen please re-review and merge if you like it.

@johndmulhausen
Copy link
Contributor

johndmulhausen commented Nov 16, 2016

@johndmulhausen
Copy link
Contributor

johndmulhausen commented Nov 16, 2016

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]>
@mdlinville
Copy link
Author

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.

@johndmulhausen
Copy link
Contributor

Thanks a ton, @mstanleyjones -- I know MD tables are just awful but this is so much better. :)

@johndmulhausen johndmulhausen merged commit a5bf14e into docker:master Nov 28, 2016
@johndmulhausen johndmulhausen self-assigned this Nov 28, 2016
joaofnfernandes pushed a commit to joaofnfernandes/docker.github.io that referenced this pull request Apr 16, 2018
JimGalasyn pushed a commit that referenced this pull request Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants