From b172ba65b4cf85259344fc7f6ee8c8cbacff72c9 Mon Sep 17 00:00:00 2001 From: Derek Carr Date: Mon, 6 Feb 2017 10:20:04 -0500 Subject: [PATCH] disable thin_ls due to excessive iops --- container/docker/factory.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/container/docker/factory.go b/container/docker/factory.go index 2c096737..5be3b596 100644 --- a/container/docker/factory.go +++ b/container/docker/factory.go @@ -57,6 +57,12 @@ var ( dockerRootDirFlag = flag.String("docker_root", "/var/lib/docker", "DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)") dockerRootDirOnce sync.Once + + // flag that controls globally disabling thin_ls pending future enhancements. + // in production, it has been found that thin_ls makes excessive use of iops. + // in an iops restricted environment, usage of thin_ls must be controlled via blkio. + // pending that enhancement, disable its usage. + disableThinLs = true ) func RootDir() string { @@ -189,6 +195,10 @@ func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolW return nil, err } + if disableThinLs { + return nil, fmt.Errorf("usage of thin_ls is disabled to preserve iops") + } + dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo) if err != nil { return nil, err