Skip to content

Commit cdfb920

Browse files
committed
doc(limits): break resource limits into its own section
1 parent 423f27b commit cdfb920

3 files changed

Lines changed: 85 additions & 86 deletions

File tree

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pages:
4141
- Managing App Processes: applications/managing-app-processes.md
4242
- Managing App Configuration: applications/managing-app-configuration.md
4343
- Managing App Lifecycle: applications/managing-app-lifecycle.md
44+
- Resource Limits: applications/managing-resource-limits.md
4445
- Domains and Routing: applications/domains-and-routing.md
4546
- SSL Certificates: applications/ssl-certificates.md
4647
- Managing Workflow:

src/applications/managing-app-lifecycle.md

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -158,92 +158,6 @@ Use `deis run` to execute commands on the deployed application.
158158
drwxr-xr-x 6 root root 4096 Dec 3 00:00 target
159159

160160

161-
## Limit Resource Usage
162-
163-
Deis Workflow supports restricting memory and CPU shares of each process. Limits set on a per-process type are given to
164-
Kubernetes as both a request and limit. Which means you guarantee 'X' amount of resource for a process as well as limit
165-
the process from using more than 'X'.
166-
167-
If you set a limit that is out of range for your cluster, Kubernetes will be unable to schedule your application
168-
processes into the cluster.
169-
170-
Available units for memory are:
171-
172-
| Unit | Amount |
173-
| --- | --- |
174-
| B | Bytes |
175-
| K | KiB (Power of 2) |
176-
| M | MiB (Power of 2) |
177-
| G | GiB (Power of 2) |
178-
179-
!!! important
180-
The minimum memory limit allowed is 4MiB.
181-
182-
Use `deis limits:set` to restrict memory by process type:
183-
184-
```
185-
$ deis limits:set web=128M
186-
Applying limits... done
187-
188-
=== indoor-whitecap Limits
189-
190-
--- Memory
191-
web 64M
192-
193-
--- CPU
194-
Unlimited
195-
```
196-
197-
You can also use `deis limits:set -c` to restrict CPU shares. CPU shares are tracked in milli-cores. One CPU core is
198-
equivalent to 1000 milli-cores. To dedicate half a core to your process, you would need 500 milli-cores or 500m.
199-
200-
| Unit | Amount |
201-
| --- | --- |
202-
| 1000m | 1000 milli-cores == 100% CPU core |
203-
| 500m | 500 milli-cores == 50% CPU core |
204-
| 250m | 250 milli-cores == 25% CPU core |
205-
| 100m | 100 milli-cores == 10% CPU core |
206-
207-
```
208-
$ deis limits:set web=250m -c
209-
Applying limits... done
210-
211-
=== indoor-whitecap Limits
212-
213-
--- Memory
214-
web 64M
215-
216-
--- CPU
217-
web 250m
218-
```
219-
220-
You can verify the CPU and memory limits by inspecting the application process Pod with `kubectl`:
221-
222-
```
223-
$ deis ps
224-
=== indoor-whitecap Processes
225-
--- web:
226-
indoor-whitecap-v14-web-8slcj up (v14)
227-
$ kubectl --namespace=indoor-whitecap describe po indoor-whitecap-v14-web-8slcj
228-
Name: indoor-whitecap-v14-web-8slcj
229-
Containers:
230-
QoS Tier:
231-
cpu: Guaranteed
232-
memory: Guaranteed
233-
Limits:
234-
cpu: 250m
235-
memory: 64Mi
236-
Requests:
237-
memory: 64Mi
238-
cpu: 250m
239-
```
240-
241-
!!! important
242-
If you restrict resources to the point where containers do not start,
243-
the `limits:set` command will hang. If this happens, use CTRL-C
244-
to break out of `limits:set` and use `limits:unset` to revert.
245-
246-
247161
## Share an Application
248162

249163
Use `deis perms:create` to allow another Deis user to collaborate on your application.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
## Limit Resource Usage
2+
3+
Deis Workflow supports restricting memory and CPU shares of each process. Limits set on a per-process type are given to
4+
Kubernetes as both a request and limit. Which means you guarantee 'X' amount of resource for a process as well as limit
5+
the process from using more than 'X'.
6+
7+
If you set a limit that is out of range for your cluster, Kubernetes will be unable to schedule your application
8+
processes into the cluster.
9+
10+
Available units for memory are:
11+
12+
| Unit | Amount |
13+
| --- | --- |
14+
| B | Bytes |
15+
| K | KiB (Power of 2) |
16+
| M | MiB (Power of 2) |
17+
| G | GiB (Power of 2) |
18+
19+
!!! important
20+
The minimum memory limit allowed is 4MiB.
21+
22+
Use `deis limits:set` to restrict memory by process type:
23+
24+
```
25+
$ deis limits:set web=128M
26+
Applying limits... done
27+
28+
=== indoor-whitecap Limits
29+
30+
--- Memory
31+
web 64M
32+
33+
--- CPU
34+
Unlimited
35+
```
36+
37+
You can also use `deis limits:set -c` to restrict CPU shares. CPU shares are tracked in milli-cores. One CPU core is
38+
equivalent to 1000 milli-cores. To dedicate half a core to your process, you would need 500 milli-cores or 500m.
39+
40+
| Unit | Amount |
41+
| --- | --- |
42+
| 1000m | 1000 milli-cores == 100% CPU core |
43+
| 500m | 500 milli-cores == 50% CPU core |
44+
| 250m | 250 milli-cores == 25% CPU core |
45+
| 100m | 100 milli-cores == 10% CPU core |
46+
47+
```
48+
$ deis limits:set web=250m -c
49+
Applying limits... done
50+
51+
=== indoor-whitecap Limits
52+
53+
--- Memory
54+
web 64M
55+
56+
--- CPU
57+
web 250m
58+
```
59+
60+
You can verify the CPU and memory limits by inspecting the application process Pod with `kubectl`:
61+
62+
```
63+
$ deis ps
64+
=== indoor-whitecap Processes
65+
--- web:
66+
indoor-whitecap-v14-web-8slcj up (v14)
67+
$ kubectl --namespace=indoor-whitecap describe po indoor-whitecap-v14-web-8slcj
68+
Name: indoor-whitecap-v14-web-8slcj
69+
Containers:
70+
QoS Tier:
71+
cpu: Guaranteed
72+
memory: Guaranteed
73+
Limits:
74+
cpu: 250m
75+
memory: 64Mi
76+
Requests:
77+
memory: 64Mi
78+
cpu: 250m
79+
```
80+
81+
!!! important
82+
If you restrict resources to the point where containers do not start,
83+
the `limits:set` command will hang. If this happens, use CTRL-C
84+
to break out of `limits:set` and use `limits:unset` to revert.

0 commit comments

Comments
 (0)