For long batches of unattended work performed by a single process, HDD access scheduling can be optimized to let the Linux kernel and the disk's driver save some HDD head movements when not necessary.
The script takes a number, where 0 are the system defaults, 1 is UI-oriented, and then 2 to 5 give gradually larger buffers and longer IO deadlines (to utilize caching to the max).