Decide on chunk size based on the number of threads that can be run simultaneously