Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/rpc: Go1.1Beta2 is slower than Go 1.0.3 on windows #5284

Closed
chai2010 opened this issue Apr 13, 2013 · 10 comments
Closed

net/rpc: Go1.1Beta2 is slower than Go 1.0.3 on windows #5284

chai2010 opened this issue Apr 13, 2013 · 10 comments

Comments

@chai2010
Copy link
Contributor

go version
go version go1.0.3

# go build
# run server

go test -bench=.*
PASS
BenchmarkRpc        5000            585433 ns/op
ok      _/D_/dev/godev2013/examples/bench/rpcdemo       5.370s

-----------------------------------------------------------

go version
go version devel +d58997478ec6 Mon Apr 08 00:09:35 2013 -0700 windows/386

# go build
# run server

go test -bench=.*
PASS
BenchmarkRpc        5000            687039 ns/op
ok      _/D_/dev/godev2013/examples/bench/rpcdemo       7.074s

-----------------------------------------------------------

PS: rpc.Call's args size is 100+KB

Attachments:

  1. dict.go (568 bytes)
  2. server.go (228 bytes)
  3. server_test.go (1460 bytes)
@remyoudompheng
Copy link
Contributor

Comment 1:

On linux/386:
Go 1  : BenchmarkRpc        5000        516170 ns/op
Go 1.1: BenchmarkRpc        5000        343280 ns/op
On linux/amd64:
Go 1  : BenchmarkRpc        5000        528410 ns/op
Go 1.1: BenchmarkRpc        5000        388923 ns/op
I suppose it's a Windows-only issue.

Labels changed: added performance, os-windows.

@alexbrainman
Copy link
Member

Comment 2:

windows net package had major changes (https://golang.org/cl/6604072 and
others) to fix bugs we had with "close net connection" and "deadline handling" logic.
The changes have some overhead - the use channels with select and, perhaps, others. We
should be able to eliminate these, if we use runtime netpoll facility (just like linux
and darwin do). There is quite a bit of room for memory management improvement in
windows net implementation. But it is not going to happen until after go1.1.
Alex

Status changed to Accepted.

@alexbrainman
Copy link
Member

Comment 4:

Some benchmarks for https://golang.org/cl/8670044/.
Alex

Attachments:

  1. netpoll_bench.tar.gz (2475 bytes)

@alexbrainman
Copy link
Member

Comment 5:

Updated benchmarks for https://golang.org/cl/8670044/.
Alex

Attachments:

  1. netpoll_bench.tar.gz (1899 bytes)

@robpike
Copy link
Contributor

robpike commented Aug 7, 2013

Comment 6:

Is the reported problem still true? Can someone on Windows please check? Thanks.

@alexbrainman
Copy link
Member

Comment 7:

Rob, Dmitriy is not done with improvements yet.
Alex

@alexbrainman
Copy link
Member

Comment 8:

I run some benchmarks. I compared current Go version (hg id is 7cf95b2c57c3) to go1.0.3
(hg id is 2d8bc3c94ecb). Here are the results on
windows-386 (Windows XP / 2 CPUs):
benchmark                     old ns/op    new ns/op    delta
BenchmarkEndToEnd                100001        78907  -21.09%
BenchmarkEndToEndHTTP            100001        78907  -21.09%
BenchmarkEndToEndAsync           107813        87501  -18.84%
BenchmarkEndToEndAsyncHTTP       107032        85157  -20.44%
windows-amd64 (Windows 7 Pro / 1 CPU)
benchmark                     old ns/op    new ns/op    delta
BenchmarkEndToEnd                 97367        59533  -38.86%
BenchmarkEndToEndHTTP             97220        59045  -39.27%
BenchmarkEndToEndAsync            91507        36681  -59.91%
BenchmarkEndToEndAsyncHTTP        92288        35919  -61.08%
That is as good as we can make for the time been. Feel free to comment, if you still
have issues.
Alex

Status changed to Fixed.

@rsc
Copy link
Contributor

rsc commented Aug 9, 2013

Comment 9:

Alex, are you saying that the current Go version is still 20-60% slower, or
is it 20-60% faster?

@alexbrainman
Copy link
Member

Comment 10:

Current version is 20-60% faster then go1.0.3.

@rsc
Copy link
Contributor

rsc commented Aug 13, 2013

Comment 11:

Fantastic, thanks for the clarification.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants