Skip to content

Conversation

@jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Jul 9, 2018

No description provided.

@jsvisa jsvisa changed the title cmd,internal: set cpu number when geth starting cmd/geth,internal: set cpu number when geth starting Jul 9, 2018
@karalabe
Copy link
Member

karalabe commented Jul 9, 2018

I don't really see the point in this? Why would you want to artificially control the threading limit?

@jsvisa
Copy link
Contributor Author

jsvisa commented Jul 9, 2018

@karalabe I'm developing geth in local MacOS, if the threading number is not limited, and the geth in syncing process, then the entire system got stuck. So I've to limit the geth threading number to reduce the cpu usage.

@fjl
Copy link
Contributor

fjl commented Jul 23, 2018

I think there is a simpler way: let's remove the call to runtime.GOMAXPROCS. Then you can set it in your shell environment. It's OK to remove this call because the runtime defaults to number of CPUs anyway.

@jsvisa
Copy link
Contributor Author

jsvisa commented Jul 24, 2018

@fjl thanks for your reply, LGTM, and @karalabe what's your opinion?

@karalabe
Copy link
Member

We can do that too, yes. I didn't know they changed it.

set by env GOMAXPROCS=xxx if you needed
@jsvisa
Copy link
Contributor Author

jsvisa commented Jul 30, 2018

@fjl remove the call to runtime.GOMAXPROCS() , PTAL

@fjl fjl merged commit 6c313ff into ethereum:master Oct 16, 2018
@karalabe karalabe added this to the 1.8.18 milestone Nov 7, 2018
@stvenyin
Copy link

I 'm know cmd/internal/browser communication tools

@jsvisa jsvisa deleted the cmd_limit_cpu branch December 13, 2018 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants