From 8ee29a17e6117e1907836e7e53c0dfeccb8a21fb Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 2 Feb 2018 10:51:59 -0500 Subject: [PATCH] Bump gc threshold to 40% Doing tests, this is a better balance for the threshold in reguards to memory and cpu usage. Signed-off-by: Michael Crosby --- cmd/containerd-shim/main_unix.go | 2 +- linux/proc/types.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/containerd-shim/main_unix.go b/cmd/containerd-shim/main_unix.go index 307d44899..f59a96270 100644 --- a/cmd/containerd-shim/main_unix.go +++ b/cmd/containerd-shim/main_unix.go @@ -60,7 +60,7 @@ func init() { } func main() { - debug.SetGCPercent(10) + debug.SetGCPercent(40) go func() { for range time.Tick(30 * time.Second) { debug.FreeOSMemory() diff --git a/linux/proc/types.go b/linux/proc/types.go index 42dae5abf..17c78fe9d 100644 --- a/linux/proc/types.go +++ b/linux/proc/types.go @@ -4,6 +4,7 @@ import ( google_protobuf "github.com/gogo/protobuf/types" ) +// Mount holds filesystem mount configuration type Mount struct { Type string Source string