Ø But A GOMAXPROCS value larger than NumberAvaliableCpuCores will always
decrease the performance, IMO.
Although unusual, I did have a case where it was handy to use double the value
of CPUs. It was a situation where there were a number of low-priority,
compute-bound processes and a bunch of regular processes. The regular
processes saw less latency due to the operating system being able to implement
its form of fairness when preemptively scheduling the treads/procs.
Btw – If you were referring to runtime.NumCPU it’s actually the number of
logical CPUs, not cores. Quite often hyperthreading results in more CPUs than
cores.
John
John Souvestre - New Orleans LA
From: [email protected] [mailto:[email protected]] On
Behalf Of T L
Sent: 2016 September 24, Sat 04:22
To: golang-nuts
Subject: [go-nuts] Re: Just because we can add multiple logical processors for
the scheduler to use doesn’t mean we should
Usually, GOMAXPROCS==NumberAvaliableCpuCores (the default value since go1.5)
will get the best performance.
For some special cases, a smaller GOMAXPROCS value will perform better.
But A GOMAXPROCS value larger than NumberAvaliableCpuCores will always decrease
the performance, IMO.
On Friday, September 23, 2016 at 5:56:11 PM UTC+8, WALID BELRHALMIA wrote:
Hello my golang brother,
i was reading William kennedy post about Concurency
https://www.goinggo.net/2014/01/concurrency-goroutines-and-gomaxprocs.html
and at the end he said "Just because we can add multiple logical processors for
the scheduler to use doesn’t mean we should" , because i think that ading the
max logical CPU to awer program can only add moe performance, can somme one
provide me with more information.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.