Use standard stress utility in examples (#7582)
In memory allocation examples, replaced the use of custom stress utility with the standard one.
This commit is contained in:
committed by
k8s-ci-robot
parent
75aea2f0ec
commit
46d896e518
@@ -67,7 +67,7 @@ for the Pod:
|
|||||||
{% include code.html language="yaml" file="memory-request-limit.yaml" ghlink="/docs/tasks/configure-pod-container/memory-request-limit.yaml" %}
|
{% include code.html language="yaml" file="memory-request-limit.yaml" ghlink="/docs/tasks/configure-pod-container/memory-request-limit.yaml" %}
|
||||||
|
|
||||||
In the configuration file, the `args` section provides arguments for the Container when it starts.
|
In the configuration file, the `args` section provides arguments for the Container when it starts.
|
||||||
The `-mem-total 150Mi` argument tells the Container to attempt to allocate 150 MiB of memory.
|
The `"--vm-bytes", "150M"` arguments tell the Container to attempt to allocate 150 MiB of memory.
|
||||||
|
|
||||||
Create the Pod:
|
Create the Pod:
|
||||||
|
|
||||||
|
|||||||
@@ -6,16 +6,11 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: memory-demo-2-ctr
|
- name: memory-demo-2-ctr
|
||||||
image: vish/stress
|
image: polinux/stress
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "50Mi"
|
memory: "50Mi"
|
||||||
limits:
|
limits:
|
||||||
memory: "100Mi"
|
memory: "100Mi"
|
||||||
args:
|
command: ["stress"]
|
||||||
- -mem-total
|
args: ["--vm", "1", "--vm-bytes", "250M", "--vm-hang", "1"]
|
||||||
- 250Mi
|
|
||||||
- -mem-alloc-size
|
|
||||||
- 10Mi
|
|
||||||
- -mem-alloc-sleep
|
|
||||||
- 1s
|
|
||||||
|
|||||||
@@ -6,16 +6,11 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: memory-demo-3-ctr
|
- name: memory-demo-3-ctr
|
||||||
image: vish/stress
|
image: polinux/stress
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "1000Gi"
|
memory: "1000Gi"
|
||||||
requests:
|
requests:
|
||||||
memory: "1000Gi"
|
memory: "1000Gi"
|
||||||
args:
|
command: ["stress"]
|
||||||
- -mem-total
|
args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"]
|
||||||
- 150Mi
|
|
||||||
- -mem-alloc-size
|
|
||||||
- 10Mi
|
|
||||||
- -mem-alloc-sleep
|
|
||||||
- 1s
|
|
||||||
|
|||||||
@@ -6,16 +6,11 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: memory-demo-ctr
|
- name: memory-demo-ctr
|
||||||
image: vish/stress
|
image: polinux/stress
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: "200Mi"
|
memory: "200Mi"
|
||||||
requests:
|
requests:
|
||||||
memory: "100Mi"
|
memory: "100Mi"
|
||||||
args:
|
command: ["stress"]
|
||||||
- -mem-total
|
args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"]
|
||||||
- 150Mi
|
|
||||||
- -mem-alloc-size
|
|
||||||
- 10Mi
|
|
||||||
- -mem-alloc-sleep
|
|
||||||
- 1s
|
|
||||||
|
|||||||
Reference in New Issue
Block a user