ensure minimum 2 thread, and maximum to core count