2020. június 10., szerda 22:03:41 UTC+2 időpontban joe mcguckin a következőt írta: > > 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 >
AFAIK it will use all cores, that's 24 on you. It will use 24 system threads to run goroutines (and many more for syscalls), and it's at the mercy of the OS thread scheduler :) -- 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/56e8c321-c668-423b-a710-7a6da28fd62co%40googlegroups.com.