Skip to content

Commit

Permalink
Merge pull request #3187 from hashicorp/b-windows-docker
Browse files Browse the repository at this point in the history
Fix MemorySwappiness on Windows Docker
  • Loading branch information
dadgar committed Sep 11, 2017
2 parents 49c4189 + 7148b65 commit 1bed4b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,11 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
VolumeDriver: driverConfig.VolumeDriver,
}

// Windows does not support MemorySwap #2193
if runtime.GOOS != "windows" {
// Windows does not support MemorySwap/MemorySwappiness #2193
if runtime.GOOS == "windows" {
hostConfig.MemorySwap = 0
hostConfig.MemorySwappiness = -1
} else {
hostConfig.MemorySwap = memLimit // MemorySwap is memory + swap.
}

Expand Down

0 comments on commit 1bed4b4

Please sign in to comment.