go: runtime: performance degradation for versions > 1.4.x
This issue is a follow-up to a thread that started on the mailing list here: https://groups.google.com/forum/#!topic/golang-dev/sfwfQTu7eM4
We recently reverted back to Go 1.4.3 for the most recent release of InfluxDB after testing against 1.5.x and collecting feedback from both our own benchmarks and the experiences of InfluxDB users. There were significant performance hits with both 1.5.x and 1.6beta1, across a variety of dimensions. For example, with write performance, we saw a 33% reduction in overall throughput, coupled with a 26% increase in average response time. We expected that the GC improvements would lead to a reduction in response times, but that hasn’t proven to be the case. It’s far from exhaustive, but here are the findings from a medium-scale write test:
version | points/sec | response time |
---|---|---|
Go 1.4.3 | 398,747 | 33.97ms |
Go 1.5.3 | 300,750 | 43.12ms |
Go 1.6rc1 | 315,545 | 39.44ms |
As requested in the mailing list thread, we ran the test with GODEBUG=gctrace=1
and recorded the output alongside our log messages for context. It doesn’t look like the GC-specific lines should be too hard to grep out if our other log lines are too noisy.
We also ran with cpuprofile
and memprofile
on, and collected the output. We’ve included results for these tests on all three versions of Go listed above, and provided the compiled binaries as well. You can find them in this Google Drive folder:
https://drive.google.com/open?id=0B3YrTka8Ai_McUNCak1YSW9ZM28
I hope this is enough information to assist in debugging the underlying issue. Definitely let me know if there are any other tests I can run to help. We’re looking forward to getting to better performance than Go 1.4.3!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (15 by maintainers)
I just wanted to revisit this issue and let everyone know that as of v0.13.0 (released today), InfluxDB is now being built with Go 1.6.2.
We did a lot of work over the last couple of months to reduce unnecessary allocations, but the GC performance in Go has also been steadily improving. Based on our own internal testing (influxdata/influxdb#6511) and user feedback (influxdata/influxdb#5217), we’re consistently seeing better performance across the board when using Go 1.6.2. This is also without tuning the
GOGC
parameter, which further improves performance.I’m going to close this issue out because I don’t think it represents an actionable item for the Go team any longer. For anyone else who still sees better performance on Go 1.4.3, I’d recommend working to identify and reduce unnecessary allocations - you’ll be happier for it!
Finally, we’re seeing even better performance with
tip
, so we’ll be looking forward to Go 1.7 later this year. Thanks to the entire Go team for all of the help and responsiveness along the way!