Skip to content

On uniprocessor darwin machine, major performance hit for GOMAXPROCS > 1 #51

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
gopherbot opened this issue Nov 11, 2009 · 1 comment
Closed

Comments

@gopherbot
Copy link
Contributor

by consalus:

(on darwin 386)

I created a simple test program (attached) to compare the cost of
enumerating integers with a channel and a generating goroutine to the old
fashioned loop way.

However, I noticed that the version that uses the channel

(invoke with 8.out -max 1000000 -method 0)

can be an order of magnitude slower with GOMAXPROCS > 1.

It consistently takes 0.200s or so with GOMAXPROCS=1,
but with GOMAXPROCS=2, it is often as much as 5s, but sometimes as low as
0.3s.

This isn't a terrible thing, since I shouldn't be setting GOMAXPROCS > 1 on
a uniprocessor machine, but I wouldn't expect the performance impact to be
so variable or significant.



What is the expected output? What do you see instead?

I'd expect a lesser and more consistent performance hit.

What is your $GOOS?  $GOARCH?

darwin 386

Which revision are you sync'ed to?  (hg log -l 1)

changeset:   3977:a522a4541e0e

Attachments:

  1. try.go (742 bytes)
@agl
Copy link
Contributor

agl commented Nov 11, 2009

Comment 1:

There's a lot that we need to do to the runtime! However, as a tool, the bug tracker 
isn't really suited to issues like this so I'm going to close it.
But please don't take this as a sign that we don't care!

Status changed to WontFix.

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015
This is based on the very simple and (presumably) slow ppc64 one,
not the more efficient but much longer one from Linaro.

Updates golang#51
@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

2 participants