Tuning the task scheduler