Skip to content

Commit

Permalink
Merge branch 'bug/swap' into 'master'
Browse files Browse the repository at this point in the history
傻逼 docker, swap == memory 的时候, 相当于不限制, 太特么傻了

See merge request !94
  • Loading branch information
timfeirg committed May 16, 2017
2 parents 2e6ae27 + 3d511c8 commit beb4844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/calcium/create_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ func (c *calcium) makeContainerOptions(index int, quota map[string]int, specs ty
} else {
resource = enginecontainer.Resources{
Memory: opts.Memory,
MemorySwap: opts.Memory,
MemorySwap: opts.Memory + 1, // MemorySwap == Memory means unlimited MemorySwap
CPUPeriod: utils.CpuPeriodBase,
CPUQuota: int64(opts.CPUQuota * float64(utils.CpuPeriodBase)),
Ulimits: ulimits,
Expand Down

0 comments on commit beb4844

Please sign in to comment.