mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
committed by
Reed Allman
parent
8b6102f139
commit
dc4d90432b
@@ -137,6 +137,8 @@ func (drv *DockerDriver) Prepare(ctx context.Context, task drivers.ContainerTask
|
|||||||
Env: envvars,
|
Env: envvars,
|
||||||
Cmd: cmd,
|
Cmd: cmd,
|
||||||
Memory: int64(task.Memory()),
|
Memory: int64(task.Memory()),
|
||||||
|
MemorySwap: int64(task.Memory()), // disables swap
|
||||||
|
KernelMemory: int64(task.Memory()),
|
||||||
CPUShares: drv.conf.CPUShares,
|
CPUShares: drv.conf.CPUShares,
|
||||||
Hostname: drv.hostname,
|
Hostname: drv.hostname,
|
||||||
Image: task.Image(),
|
Image: task.Image(),
|
||||||
|
|||||||
Reference in New Issue
Block a user