Each P has a local queue, and P2, with an empty queue, takes work from another P GOMAXPROCS sets the number of Ps An M must hold a P to run Go code P0held by M0, running a GGGGlocal queue P1held by M1, running a GGGGlocal queue P2 · empty queuesteals Gs from another P (work stealing) Global queuewhere local queues overflow to netpollerholds Gs waiting on the networkvia epoll or kqueue, without an M A simplified snapshot. GOMAXPROCS doesn’t cap the total number of Gs or Ms Go · ConceptsGo GMP and GOMAXPROCScontainer CPU limits and goroutinesPut go in front of a call and it runs concurrently. So do 100,000 goroutines mean 100,000 threads? Does GOMAXPROCS=1 mean one task at a time?Sep 18, 2026