kube-profefe icon indicating copy to clipboard operation
kube-profefe copied to clipboard

Make the parallelization factor dynamic

Open gianarb opened this issue 4 years ago • 0 comments

At the moment the number of goroutines kprofefe spin up is fixed to 10. We can do better.

First, we should look at GOMAXPROCS has to a limit. No more goroutines that what it specifies.

The GOMAXPROCS variable limits the number of operating system threads that can execute user-level Go code simultaneously. There is no limit to the number of threads that can be blocked in system calls on behalf of Go code; those do not count against the GOMAXPROCS limit. This package's GOMAXPROCS function queries and changes the limit.

In second based on the number of pods to gather, we can calculate the right number of goroutines.

gianarb avatar Mar 09 '20 09:03 gianarb