From 1ec755121029852e14951c7101a2f43b3d81896f Mon Sep 17 00:00:00 2001 From: Bin Tang Date: Thu, 15 Jun 2023 20:15:53 +0800 Subject: [PATCH] misc: add enable entry for nydusd cgroup Signed-off-by: Bin Tang --- config/config_test.go | 1 + misc/snapshotter/config.toml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/config/config_test.go b/config/config_test.go index b8fd3d10ec..3dc05c9d89 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -84,6 +84,7 @@ func TestLoadSnapshotterTOMLConfig(t *testing.T) { Address: ":9110", }, CgroupConfig: CgroupConfig{ + Enable: true, MemoryLimit: "", }, } diff --git a/misc/snapshotter/config.toml b/misc/snapshotter/config.toml index 2e43fa8286..3ad3c6f43d 100644 --- a/misc/snapshotter/config.toml +++ b/misc/snapshotter/config.toml @@ -34,6 +34,8 @@ recover_policy = "restart" threads_number = 4 [cgroup] +# Whether to use separate cgroup for nydusd. +enable = true # The memory limit for nydusd cgroup, which contains all nydusd processes. # Percentage is supported as well, please ensure it is end with "%". # The default unit is bytes. Acceptable values include "209715200", "200MiB", "200Mi" and "10%".