1.8 vs 1.9 performance

1,458 views
Skip to first unread message

ilya....@intel.com

unread,
Aug 1, 2017, 4:26:29 PM8/1/17
to golang-dev
Hi everyone!

FYI I've run all benchmarks in src to check for performance vs 1.8.
Results are attached. Overall it looks great, but there are some significant ( > 10%) degradations.
I'm sure that at least in some cases lower performance is caused by changes in functionality, fixed bugs and general nosie, however some cases are vaild
At random I've checked encoding/base32/EncodeString  and it looks like real  degradation so I've created https://github.com/golang/go/issues/21262 and https://go-review.googlesource.com/c/52510
But I don't have time to analyze everything else right now, so I'm posting results here. 
18vs19.txt

Alberto Donizetti

unread,
Aug 1, 2017, 6:34:52 PM8/1/17
to golang-dev
That's nice, thanks for doing this.

I'll definitely try to investigate some of the worst ones for go1.10

A.

Tylor Arndt

unread,
Aug 4, 2017, 10:33:18 AM8/4/17
to golang-dev
I have not attempted to reproduce yet, but if a couple of these are the functions I think they are, these are pretty alarming!

time.Now() is something I know my applications have the potential to call very heavily, from setting net.Conn deadlines to calculating evetive dates from TTLs....
/localdisk/itocar/golang/src/time/Now-6                                                                 36.4ns ± 0%     72.8ns ± 1%   +99.93%  (p=0.000 n=8+8)
/localdisk/itocar/golang/src/time/NowUnixNano-6                                                         37.5ns ± 0%     74.9ns ± 1%   +99.73%  (p=0.000 n=8+8)


This could be a pretty dramatic increase in garbage generation for anything that is a public facing HTTPS server right?
/localdisk/itocar/golang/src/net/http/ClientServerParallelTLS4-6                                        4.97kB ± 0%    24.61kB ± 3%  +395.20%  (p=0.000 n=8+7)
/localdisk/itocar/golang/src/net/http/ClientServerParallelTLS4-6                                          64.0 ± 0%      258.3 ± 3%  +303.57%  (p=0.000 n=8+7)


Before my team adopts 1.9 we will have to run these tests on our prod HW and bench our apps, but at a glance the items above are a bit concerning.

Brad Fitzpatrick

unread,
Aug 4, 2017, 12:53:24 PM8/4/17
to Tylor Arndt, golang-dev
On Fri, Aug 4, 2017 at 7:33 AM, Tylor Arndt <voidl...@gmail.com> wrote:
I have not attempted to reproduce yet, but if a couple of these are the functions I think they are, these are pretty alarming!

time.Now() is something I know my applications have the potential to call very heavily, from setting net.Conn deadlines to calculating evetive dates from TTLs....
/localdisk/itocar/golang/src/time/Now-6                                                                 36.4ns ± 0%     72.8ns ± 1%   +99.93%  (p=0.000 n=8+8)
/localdisk/itocar/golang/src/time/NowUnixNano-6                                                         37.5ns ± 0%     74.9ns ± 1%   +99.73%  (p=0.000 n=8+8)


I doubt you'll notice in real programs.
 
This could be a pretty dramatic increase in garbage generation for anything that is a public facing HTTPS server right?
/localdisk/itocar/golang/src/net/http/ClientServerParallelTLS4-6                                        4.97kB ± 0%    24.61kB ± 3%  +395.20%  (p=0.000 n=8+7)
/localdisk/itocar/golang/src/net/http/ClientServerParallelTLS4-6                                          64.0 ± 0%      258.3 ± 3%  +303.57%  (p=0.000 n=8+7)


Before my team adopts 1.9 we will have to run these tests on our prod HW and bench our apps, but at a glance the items above are a bit concerning.

Let us know what you find.

Feel free to file a bug too.


ilya....@intel.com

unread,
Aug 8, 2017, 1:18:11 PM8/8/17
to golang-dev
Josh Bleecher Snyder mentioned that benchmark parallelization in 1.9 may have hidden performance degradations, so I've rerun everything with -cpu=1
Results are attached.
18vs19_1cpu.txt

Philip Hofer

unread,
Aug 9, 2017, 11:47:40 AM8/9/17
to golang-dev
What happened here?

/localdisk/itocar/golang/src/net/http/ClientServerParallelTLS64                                        126µs ± 2%     1800µs ±16%  +1333.24%  (p=0.000 n=8+8)
/localdisk/itocar/golang/src/net/http/ClientServerParallelTLS64                                       5.37kB ± 0%    60.32kB ±13%  +1022.65%  (p=0.000 n=7+8)

Alberto Donizetti

unread,
Aug 9, 2017, 12:01:30 PM8/9/17
to golang-dev
Looks like that benchmark's code was changed in CL 37771
(https://go-review.googlesource.com/c/37771) so now it's measuring
something different.
Reply all
Reply to author
Forward
0 new messages