From cb0acbace44aeb67c8e022362bf46b36c10ef4b2 Mon Sep 17 00:00:00 2001 From: Daniel Jiang Date: Tue, 3 Jul 2018 11:23:56 +0800 Subject: [PATCH] Restrict the CPU usage of Clair (#5217) This commit fixes #5072 Due to an issue in bzr, Clair container may consume a lot of CPU resource while updating the vuln data. This commit mitigates the impact by setting the cpu_quota of clair container. (default value of cpu_period is 100000 in v2 docker-compose template) --- make/docker-compose.clair.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/docker-compose.clair.tpl b/make/docker-compose.clair.tpl index 74fad5a29..62bd25dc1 100644 --- a/make/docker-compose.clair.tpl +++ b/make/docker-compose.clair.tpl @@ -22,7 +22,7 @@ services: container_name: clair image: vmware/clair-photon:__clair_version__ restart: always - cpu_quota: 150000 + cpu_quota: 50000 depends_on: - postgresql volumes: