I have recently come across a situation where one of our Golang app, consuming almost 30GB memory, will periodically eating all 24 cpu cores with nearly almost 100%. This will last maybe for more than 3 seconds. Our Golang version is 1.4.1 on linux 64-bit.
I have googled for some info. Here is my assumption:
- in our app, we use a data type
[]map[string]*list
and the instance of this type will contain more than 250K keys. - maybe the gc in golang 1.4.1 consuming more cpu time and stop the world. However, i can not find the parameter to configure the parallelism of gc goroutines(threads). And, does it have some relationship with the
GOMAXPROCS
parameter.