Setup thread pool size according to the number of CPUs in the current machine.