Enabling GOMAXPROCS for jujud
John Arbash Meinel
john at arbash-meinel.com
Tue Oct 29 07:44:19 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
My patch uses "runtime.GOMAXPROCS(runtime.NumCPU())" which means it
sets GOMAXPROCS=1 for machines that have 1 core.
I don't quite see what the problem is with this particular patch.
(taking advantage of multiple cores when they are available).
John
=:->
On 2013-10-29 10:25, David Cheney wrote:
> Not lgtm. The number of CPU cores available on the default ec2
> bootstrap machine is 1.
>
> On Tue, Oct 29, 2013 at 5:07 PM, John Arbash Meinel
> <john at arbash-meinel.com> wrote: Do we want to enable
> multiprocessing for Jujud? I have some evidence that it would
> actually help things.
>
> I'm soliciting feedback about this patch: === modified file
> 'cmd/jujud/main.go' --- cmd/jujud/main.go 2013-09-13 14:48:13
> +0000 +++ cmd/jujud/main.go 2013-10-28 17:47:52 +0000 @@ -8,6
> +8,7 @@ "net/rpc" "os" "path/filepath" + "runtime"
>
> "launchpad.net/juju-core/cmd"
> "launchpad.net/juju-core/worker/uniter/jujuc" @@ -107,6 +108,7 @@
> func Main(args []string) { var code int = 1 var err error +
> runtime.GOMAXPROCS(runtime.NumCPU()) commandName :=
> filepath.Base(args[0]) if commandName == "jujud" { code, err =
> jujuDMain(args)
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlJvZ1MACgkQJdeBCYSNAAObQwCgwx6Ze+rlhoEvMpVpF4aHcVNi
vTkAoLp3D+f4ALYTbLyalqYCKj6JShmF
=mXYg
-----END PGP SIGNATURE-----
More information about the Juju-dev
mailing list