From e4a6fbadf80e77a55233de493389680b31e39881 Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Thu, 17 Nov 2022 22:57:22 +0800 Subject: [PATCH] docs: update doc "Setup swap device in guest kernel" `crictl runp` command needs `--runtime kata` option to start a Kata Containers pod. Fixes: #5678 Signed-off-by: Bin Liu --- docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md b/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md index 8ab9e89e5d..1ec90d760d 100644 --- a/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md +++ b/docs/how-to/how-to-setup-swap-devices-in-guest-kernel.md @@ -17,9 +17,9 @@ Enable setup swap device in guest kernel as follows: $ sudo sed -i -e 's/^#enable_guest_swap.*$/enable_guest_swap = true/g' /etc/kata-containers/configuration.toml ``` -## Run a Kata Container utilizing swap device +## Run a Kata Containers utilizing swap device -Use following command to start a Kata Container with swappiness 60 and 1GB swap device (swap_in_bytes - memory_limit_in_bytes). +Use following command to start a Kata Containers with swappiness 60 and 1GB swap device (swap_in_bytes - memory_limit_in_bytes). ``` $ pod_yaml=pod.yaml $ container_yaml=container.yaml @@ -43,12 +43,12 @@ command: - top EOF $ sudo crictl pull $image -$ podid=$(sudo crictl runp $pod_yaml) +$ podid=$(sudo crictl runp --runtime kata $pod_yaml) $ cid=$(sudo crictl create $podid $container_yaml $pod_yaml) $ sudo crictl start $cid ``` -Kata Container setups swap device for this container only when `io.katacontainers.container.resource.swappiness` is set. +Kata Containers setups swap device for this container only when `io.katacontainers.container.resource.swappiness` is set. The following table shows the swap size how to decide if `io.katacontainers.container.resource.swappiness` is set. |`io.katacontainers.container.resource.swap_in_bytes`|`memory_limit_in_bytes`|swap size|