Don't use a hardcoded core number.

Instead use number_of_cores / 2.