I'm a bit confused here about cores and threads on CPUs
Often in configuration files eg. nginx, golang you have to define the number of cores to get the best performance
If you look at this CPU http://ark.intel.com/products/52213/Intel-Core-i7-2600-Processor-8M-Cache-up-to-3_80-GHz
How many "cores" does it have?
In the specs it has 4 cores and 8 threads.. Does that mean 4*8 = 32 "cores" ??
runtime.NumCPU()
is going to return on this CPU, hence the max value which can be passed toGOMAXPROCS
. - tomaszlibevent
,nginx
etc but a goroutine blocked in a non-network-related syscall occupies an OS thread, so once this happens, and there's another runnable goroutine, the scheduler will spawn another thread if possible. Consider reading this for more insight. - kostix