We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0f46dd5 + f042dc5 commit 3f98e5dCopy full SHA for 3f98e5d
1 file changed
cmd/containerd-shim/main_unix.go
@@ -12,9 +12,11 @@ import (
12
"os/exec"
13
"os/signal"
14
"runtime"
15
+ "runtime/debug"
16
"strings"
17
"sync"
18
"syscall"
19
+ "time"
20
21
"github.com/containerd/containerd/events"
22
"github.com/containerd/containerd/linux/proc"
@@ -58,6 +60,13 @@ func init() {
58
60
}
59
61
62
func main() {
63
+ debug.SetGCPercent(10)
64
+ go func() {
65
+ for range time.Tick(30 * time.Second) {
66
+ debug.FreeOSMemory()
67
+ }
68
+ }()
69
+
70
if debugFlag {
71
logrus.SetLevel(logrus.DebugLevel)
72
0 commit comments