@@ -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
249163Use ` deis perms:create ` to allow another Deis user to collaborate on your application.
0 commit comments