Control memory usage and avoid empty completed jobs