we should set GOMAXPROCS to NumCPU in the API Server
Bug #1290841 reported by
John A Meinel
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
John A Meinel |
Bug Description
The API Server will be single threaded (and thus very CPU bound) if we don't set GOMAXPROCS to NumCPU
We probably want to only enable it for agents that are running the API server, because the other agents aren't ever CPU bound, and thus it helps avoid worrying about race conditions.
We also probably don't want to enable it during the test suite, because of problems we've seen with concurrent testing breaking test isolation (Bug #1199437), but it shouldn't be too hard to just enable the ability to turn on GOMAXPROCS in main() and then use that functionality when we determine we are an API server.
Related branches
lp:~jameinel/juju-core/gomaxprocs-apiserver-1290841
- Juju Engineering: Pending requested
-
Diff: 231 lines (+144/-1)6 files modifiedcmd/jujud/machine.go (+15/-0)
cmd/jujud/machine_test.go (+42/-0)
cmd/jujud/main.go (+1/-1)
utils/export_test.go (+9/-0)
utils/gomaxprocs.go (+26/-0)
utils/gomaxprocs_test.go (+51/-0)
Changed in juju-core: | |
milestone: | none → 1.17.6 |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I have a patch for it, this is about finishing off the patch so it is correct for testing, and landing it.