I get a problem with optimisation. In fact I use GOMAXPROCS of runtime to use all the logical core wich are avaiable. It’s works very well with only 1 physical processor.
But I got a server who have 2 processor (2 intel xeon). When I run the program, It use only 1 processor.
Is it a limit of GO or a bad way of programming ?
(Sorry for my english )
I would guess this depends on the code. Can you share a minimal test code that shows this unexpected behavior?
In general a goroutine is not the same as an OS thread. Multiple goroutines can run within the same OS thread (if the runtime decides so), and therefore would use only one CPU core.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.