You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/applications/managing-resource-limits.md
+37-13Lines changed: 37 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
## Managing Application Resource Limits
2
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'.
3
+
Deis Workflow supports restricting memory and CPU shares of each process. Requests/Limits set on a per-process type are given to
4
+
Kubernetes as a requests and limits. Which means you guarantee \<requests\> amount of resource for a process as well as limit
5
+
the process from using more than \<limits\>.
6
+
By default, Kubernetes will set \<requests\> equal to \<limit\> if we don't explicitly set \<requests\> value. Please keep in mind that `0 <= requests <= limits`.
6
7
7
8
## Limiting Memory
8
9
9
-
If you set a limit that is out of range for your cluster, Kubernetes will be unable to schedule your application
10
+
If you set a requests/limits that is out of range for your cluster, Kubernetes will be unable to schedule your application
10
11
processes into the cluster!
11
12
12
13
Available units for memory are:
@@ -21,7 +22,7 @@ Available units for memory are:
21
22
!!! important
22
23
The minimum memory limit allowed is 4MiB.
23
24
24
-
Use `deis limits:set` to restrict memory by process type:
25
+
Use `deis limits:set <type>=<value>` to restrict memory by process type, where value can be \<limit\> or \<request\>/\<limit\> format :
25
26
26
27
```
27
28
$ deis limits:set web=64M
@@ -32,6 +33,17 @@ Applying limits... done
32
33
--- Memory
33
34
web 64M
34
35
36
+
--- CPU
37
+
Unlimited
38
+
39
+
$ deis limits:set cmd=32M/64M
40
+
Applying limits... done
41
+
42
+
=== outdoor-whitecap Limits
43
+
44
+
--- Memory
45
+
cmd 32M/64M
46
+
35
47
--- CPU
36
48
Unlimited
37
49
```
@@ -53,8 +65,9 @@ Unlimited
53
65
54
66
## Limiting CPU
55
67
56
-
You can also use `deis limits:set --cpu` to restrict CPU shares. CPU shares are tracked in milli-cores. One CPU core is
57
-
equivalent to 1000 milli-cores. To dedicate half a core to your process, you would need 500 milli-cores or 500m.
68
+
You can also use `deis limits:set <type>=<value> --cpu` to restrict CPU shares, where value can be \<limit\> or
69
+
\<request\>/\<limit\> format. CPU shares are tracked in milli-cores. One CPU core is equivalent to 1000 milli-cores.
70
+
To dedicate half a core to your process, you would need 500 milli-cores or 500m.
58
71
59
72
| Unit | Amount |
60
73
| --- | --- |
@@ -74,6 +87,17 @@ web 64M
74
87
75
88
--- CPU
76
89
web 250m
90
+
91
+
$ deis limits:set web=1500m/2000m --cpu
92
+
Applying limits... done
93
+
94
+
=== indoor-whitecap Limits
95
+
96
+
--- Memory
97
+
web 64M
98
+
99
+
--- CPU
100
+
web 1500m/2000m
77
101
```
78
102
79
103
You can verify the CPU and memory limits by inspecting the application process Pod with `kubectl`:
@@ -87,14 +111,14 @@ $ kubectl --namespace=indoor-whitecap describe po indoor-whitecap-v14-web-8slcj
0 commit comments