On Wednesday, June 10, 2020 at 1:03:41 PM UTC-7, joe mcguckin wrote:
>
> I read somewhere that the default # of GO threads is the number of cores 
> of the cpu.
>
> What about where there are multiple cpus?  My servers have 2, 6 core 
> Xeons. With hyper threading, it looks like 24 cores available to Linux.
>
> Will the GO scheduler schedule GO routines on both CPU's?
>
> If the scheduler is running on one core, how does it manage to put GO 
> routines on other cores and/or CPU's? Does it create system threads (or 
> pthreads) on each of the other 
> cores and CPU's? Can it pin a thread to a specific core, or are you at the 
> mercy of the OS thread scheduler?
>
> Inquiring minds want to know...
>
> Thanks,
>
> Joe
>

FYI - Go on linux uses the result of a sched_getaffinity() system call to 
determine cpu count:
https://github.com/golang/go/blob/e92be18fd8b525b642ca25bdb3e2056b35d9d73c/src/runtime/os_linux.go#L82

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/b4a1721c-78e0-4993-b55e-5578f2ca1339o%40googlegroups.com.

Reply via email to