Repository: go
Issue: runtime: 2-3x memory usage when running in container increase in 1.16 vs 1.15 (MADV_DONTNEED related)
Labels: NeedsInvestigation,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes, in 1.16

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build457535914=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

After upgrading our application to go 1.16, it started using 2-3x more memory. Unfortunately I cannot provide steps to replicate this, as it is an internal piece of software.
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->

### What did you expect to see?

Expected to see same memory usage profile or better (due to `MADV_DONTNEED` being enabled).

### What did you see instead?

2 series with low (~50mb) memory usage are generated by binaries built with go 1.15. Others are all 1.16. The last series is built with `GODEBUG=madvdontneed=0` (which doesn't seem to make any difference)

<img width="1401" alt="Screen Shot 2021-02-23 at 19 35 20" src="https://user-images.githubusercontent.com/102791/108890783-47229300-760e-11eb-89ae-60acfa435745.png">

<pre>
$ cat go.mod
module ...

go 1.16

require (
    github.com/go-ole/go-ole v1.2.5 // indirect
    github.com/go-redis/redis/v7 v7.4.0
    github.com/golang/protobuf v1.4.3 // indirect
    github.com/gorilla/mux v1.8.0
    github.com/magefile/mage v1.11.0 // indirect
    github.com/matryer/is v1.4.0
    github.com/opentracing-contrib/go-stdlib v1.0.0
    github.com/opentracing/opentracing-go v1.2.0
    github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
    github.com/shirou/gopsutil v3.21.1+incompatible // indirect
    github.com/sirupsen/logrus v1.8.0
    golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d // indirect
    golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93
    golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43 // indirect
    golang.org/x/text v0.3.5 // indirect
    google.golang.org/appengine v1.6.7 // indirect
    google.golang.org/genproto v0.0.0-20210219173056-d891e3cb3b5b // indirect
    google.golang.org/grpc v1.35.0 // indirect
    gopkg.in/yaml.v2 v2.2.5 // indirect
)
</pre>