ionice -n7 hammer_disk.sh
Polluting the disk cache
If you run a command (for example a program that goes through the entire file system checking various things, you will find that the kernel will start pulling more files into its cache and expunge cache entries used by other processes. This can have a very significant impact on a system as useful portions of memory are swapped out.
`nocache` tries to minimize the effect an application has on the Linux file system cache. Use case: backup processes that should not interfere with the present state of the cache. Also this package provides the following utilities: * `cachedel` : clear page cache for a file. * `cachestats` : print number of cached vs. not-cached pages for a file
Turning off disk syncs
Another relatively unknown tool, which I would certainly not recommend for all cron jobs but is nevertheless related to I/O, is eatmydata.
If you wrap it around a command, it will run without bothering to periodically make sure that it flushes any changes to disk. This can speed things up significantly but it should obviously not be used for anything that has important side effects or that cannot be re-run in case of failure.