fn: memory limit adjustments (#746)

1) limit kernel memory which was previously unlimited, using
   same limits as user memory for a unified approach.
2) disable swap memory for containers
This commit is contained in:
Tolga Ceylan
2018-02-07 16:48:52 -08:00
committed by Reed Allman
parent 8b6102f139
commit dc4d90432b

View File

@@ -137,6 +137,8 @@ func (drv *DockerDriver) Prepare(ctx context.Context, task drivers.ContainerTask
Env: envvars,
Cmd: cmd,
Memory: int64(task.Memory()),
MemorySwap: int64(task.Memory()), // disables swap
KernelMemory: int64(task.Memory()),
CPUShares: drv.conf.CPUShares,
Hostname: drv.hostname,
Image: task.Image(),