Skip to content

runtime: scheduler fix made Windows slower #5872

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

Closed
rsc opened this issue Jul 12, 2013 · 4 comments
Closed

runtime: scheduler fix made Windows slower #5872

rsc opened this issue Jul 12, 2013 · 4 comments

Comments

@rsc
Copy link
Contributor

rsc commented Jul 12, 2013

See brainman's comments on https://golang.org/cl/10743044/.
@peterGo
Copy link
Contributor

peterGo commented Jul 12, 2013

Comment 1:

Not true for amd64.
runtime: fix CPU underutilization. Revision: 417ffa35197c.
https://code.google.com/p/go/source/detail?r=417ffa35197c
Intel i5-2390T
$ go version
go version devel +08722921ea8c Thu Jul 11 15:55:08 2013 -0400 linux/amd64
$ go test runtime -short -timeout=240s -cpu=1,2,4
ok      runtime 16.754s
$ go version
go version devel +417ffa35197c Thu Jul 11 15:57:36 2013 -0400 linux/amd64
$ go test runtime -short -timeout=240s -cpu=1,2,4
ok      runtime 16.811s
C:\>go version
go version devel +08722921ea8c Thu Jul 11 15:55:08 2013 -0400 windows/amd64
C:\>go test runtime -short -timeout=240s -cpu=1,2,4
ok      runtime 21.528s
C:\>go version
go version devel +417ffa35197c Thu Jul 11 15:57:36 2013 -0400 windows/amd64
C:\>go test runtime -short -timeout=240s -cpu=1,2,4
ok      runtime 21.593s

@peterGo
Copy link
Contributor

peterGo commented Jul 12, 2013

Comment 2:

Not confirmed for windows/386.
Intel Pentium 4 2.80 GHz
C:\>go version
go version devel +08722921ea8c Thu Jul 11 15:55:08 2013 -0400 windows/386
C:\>go test runtime -short -timeout=240s -cpu=1,2,4
ok      runtime 80.125s
C:\>go version
go version devel +417ffa35197c Thu Jul 11 15:57:36 2013 -0400 windows/386
C:\>go test runtime -short -timeout=240s -cpu=1,2,4
ok      runtime 81.688s

@dvyukov
Copy link
Member

dvyukov commented Jul 15, 2013

Comment 3:

Alex, can you run the runtime tests for GOMAXPROCS=1/2/4 separately to determine how
they are affected (you have 2 cores, right?). And then please look at what exactly tests
become slower.
Runtime contains either synthetic tests or exotic corner cases. With high probability it
does not affect real programs.
However, we can't get too far performance-wise without a performance bot... I will send
a separate email to golang-dev.

@alexbrainman
Copy link
Member

Comment 4:

I run tests (see attached aaa.bat) as per your request against
changeset:   17239:08722921ea8c
user:        ChaiShushan <[email protected]>
date:        Thu Jul 11 15:55:08 2013 -0400
summary:     net/rpc: fix a test bug
and
changeset:   17240:417ffa35197c
user:        Dmitriy Vyukov <[email protected]>
date:        Thu Jul 11 15:57:36 2013 -0400
summary:     runtime: fix CPU underutilization
3 times each.
The output of these is in old1, old2 and old3 (for 17239:08722921ea8c) and new1, new2
and new3 (for 17240:417ffa35197c).
The difference between the two seems to be in new TestGoroutineParallelism. It takes
about 2.5s to run it here, and it runs 3 times because of "-cpu=1,2,3". So that pretty
much accounts for the increased overall test time. All other tests differ very little.
I don't think there is anything else to do here. I'm closing the issue.
Alex

Status changed to Invalid.

Attachments:

  1. aaa.bat (456 bytes)
  2. new1 (15197 bytes)
  3. new2 (15197 bytes)
  4. new3 (15197 bytes)
  5. old1 (14940 bytes)
  6. old2 (14940 bytes)
  7. old3 (14940 bytes)

@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

5 participants