Allow binding storlet applications to specific CPUs or memory nodes
Docker supports binding a container to specific cpu cores memory nodes. This introduces a few options to allow operators to limit resources used by storlet containers. Change-Id: Ifa734850f4284724a5ee06a172b81e04e5fb7015
This commit is contained in:
parent
ddf7d26259
commit
ede1fe4b33
@ -255,6 +255,8 @@ class RunTimeSandbox(object):
|
||||
self.container_mem_limit = int(self.container_mem_limit)
|
||||
except TypeError:
|
||||
pass
|
||||
self.container_cpuset_cpus = conf.get('container_cpuset_cpus')
|
||||
self.container_cpuset_mems = conf.get('container_cpuset_mems')
|
||||
|
||||
def ping(self):
|
||||
"""
|
||||
@ -360,6 +362,8 @@ class RunTimeSandbox(object):
|
||||
cpu_period=self.container_cpu_period,
|
||||
cpu_quota=self.container_cpu_quota,
|
||||
mem_limit=self.container_mem_limit,
|
||||
cpuset_cpus=self.container_cpuset_cpus,
|
||||
cpuset_mems=self.container_cpuset_mems,
|
||||
labels={'managed_by': 'storlets'})
|
||||
except docker.errors.ImageNotFound:
|
||||
msg = "Image %s is not found" % docker_image_name
|
||||
|
Loading…
Reference in New Issue
Block a user