Skip to content

Commit 1266c53

Browse files
author
Matthew Fisher
committed
doc(parser): update the CPU limit docstring
kubernetes supports either whole CPUs or a thousandth of a CPU using milli units.
1 parent a17f89a commit 1266c53

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

parser/limits.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ func limitSet(argv []string) error {
6363
usage := `
6464
Sets resource limits for an application.
6565
66-
A resource limit is a finite resource within a container which we can apply
67-
restrictions to either through the scheduler or through the Docker API. This limit
68-
is applied to each individual container, so setting a memory limit of 1G for an
69-
application means that each container gets 1G of memory.
66+
A resource limit is a finite resource within a pod which we can apply
67+
restrictions through Kubernetes. This limit is applied to each individual
68+
pod, so setting a memory limit of 1G for an application means that each
69+
pod gets 1G of memory.
7070
7171
Usage: deis limits:set [options] <type>=<limit>...
7272
@@ -82,15 +82,17 @@ Arguments:
8282
(M), or Gigabytes (G). For example, 'deis limit:set cmd=1G' will restrict all
8383
"cmd" processes to a maximum of 1 Gigabyte of memory each.
8484
85-
With --cpu, units are represented in the number of cpu shares. For example,
86-
'deis limit:set --cpu cmd=1024' will restrict all "cmd" processes to a
87-
maximum of 1024 cpu shares.
85+
With --cpu, units are represented in the number of CPUs. For example,
86+
'deis limit:set --cpu cmd=1' will restrict all "cmd" processes to a
87+
maximum of 1 CPU. Alternatively, you can also use milli units to specify the
88+
number of CPU shares the pod can use. For example, 'deis limits:set --cpu cmd=500m'
89+
will restrict all "cmd" processes to half of a CPU.
8890
8991
Options:
9092
-a --app=<app>
9193
the uniquely identifiable name for the application.
9294
-c --cpu
93-
limits cpu shares.
95+
limits CPU.
9496
-m --memory
9597
limits memory. [default: true]
9698
`

0 commit comments

Comments
 (0)