Description
What version of Go are you using (go version
)?
go version go1.8.1 darwin/amd64
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/pmattis/Development/go"
GORACE=""
GOROOT="/Users/pmattis/Development/go-1.8"
GOTOOLDIR="/Users/pmattis/Development/go-1.8/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qc/fpqpgdqd167c70dtc6840xxh0000gn/T/go-build955668609=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
While investigating tail latencies in CockroachDB, I noticed network blips during concurrent GC. The trace below is from a single-node cockroach cluster with a single client sending it requests as fast as possible. Note that the load is modest. My test machine is ~75% idle while gathering these traces.
Every time GC runs, there are no networking events for ~10ms which is quite close to the length of the GC run itself. This behavior occurs very quickly after starting the cluster and load generator. The heap size is modest (O(100 MB)).
Here is a zoom in on the first GC run from the above trace:
In addition to the blip while GC is running, there is a smaller blip after each GC run while sweeping. The image below shows G611 being called on to assist in sweep work from 62ms-69ms in the trace.
Note that I'm running both the cockroach
process and the load generator (kv
) on the same machine. Are the GC runs in the cockroach
process starving the kv
process of CPU? Running both processes with GOMAXPROCS=4
(I'm using an 8 core machine), shows much better behavior.