-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Description
What version of Go are you using (go version
)?
go version devel +3df059e Mon Nov 7 06:46:01 2016 +0000
What operating system and processor architecture are you using (go env
)?
linux/amd64
What did you do?
I have a server program that makes http requests to collect a large volume of data which it then unmarshals and transforms. It runs with around 1000 active goroutines, has a live heap of around 30–100MB and executes around 50 GCs per second. The GC does a fine job keeping up with the program's throughput demands.
What did you expect to see?
I expected sub-millisecond stop-the-world times during garbage collections; per #17503 (comment), "The hybrid barrier is now live on master."
What did you see instead?
I see mark termination STW times of over 1ms somewhat regularly (which I thought the issue 17503 hybrid barrier would eliminate).
I see sweep termination STW times of over 1ms in the majority of GC cycles, which I find particularly surprising since I thought there was very little work required in that phase.
gc 20072 @698.871s 14%: 0.14+5.1+0.35 ms clock, 4.7+14/41/1.1+11 ms cpu, 104->104->46 MB, 107 MB goal, 36 P
gc 20073 @698.886s 14%: 3.1+4.5+6.6 ms clock, 90+57/30/0.74+191 ms cpu, 91->92->61 MB, 92 MB goal, 36 P
gc 20074 @698.917s 14%: 1.5+4.3+0.64 ms clock, 46+47/35/0+19 ms cpu, 121->122->69 MB, 123 MB goal, 36 P
gc 20075 @698.935s 14%: 7.9+4.5+1.0 ms clock, 230+35/30/0+31 ms cpu, 142->143->85 MB, 143 MB goal, 36 P
gc 20076 @698.967s 14%: 6.2+10+1.2 ms clock, 180+29/34/0+35 ms cpu, 160->164->86 MB, 170 MB goal, 36 P
It looks like sometimes the runtime stops most of the goroutines in preparation for a GC, but a few remain running. See for instance Proc 15 around 285–289ms (Proc 28 offscreen is also running), or Proc 0 and Proc 19 around 312–314ms
/cc @aclements @RLH