-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Description
What version of Go are you using (go version)?
1.13.8 vs 1.14
Does this issue reproduce with the latest release?
Yes
What did you do?
I wanted to benchmark the go-etheruem full sync performance with the new Go release vs. the old one. Speed wise Go 1.14 is maybe 10-15% faster, but that's not what this issue is about.
What did you expect to see?
Faster execution at the same memory usage.
What did you see instead?
Side by side, go-ethereum built with:
- Go 1.13 used (
runtime.MemStats.Alloc) 7.5GB RAM and held (runtime.MemStats.HeapSys - runtime.MemStats.HeapReleased) 9GB - Go 1.14 used (
runtime.MemStats.Alloc) 8.5GB RAM and held (runtime.MemStats.HeapSys - runtime.MemStats.HeapReleased) 11GB
I've ran the tests on 4 VMs (two on Go 1.13 and two on Go 1.14), swapping the Go builds and restarting after a day to avoid false positives due to VM asymmetries. The results were the same on all 4 comparison runs. Go 1.14 was 10% faster and used significantly more memory.
At this point I'm unsure how I could help debug this further. Have there been any memory allocation changes made in Go 1.14 that could point towards heavier use? We do maintain significant in-memory caches, some large blobs, some tiny tiny slices. Perhaps some internal map field got more expensive?
