global: calculate suitable number of jobs