Can I imitate a slow-moving hard drive?
I have suspicion that a particular intermittent bug could just materialize itself when there is a slow-moving disk read price. Troubleshooting is hard due to the fact that I can not accurately duplicate it.
Except merely swallowing IO with a high top priority procedure, exists any kind of means for me to imitate having a slow-moving hard drive?
# echo 1 > /proc/sys/vm/drop_caches
That'll reduce you down
It'll compel you to read from disk, as opposed to capitalizing on the cached web page.
If you actually intended to get innovative you can do something like counterfeit a read mistake every nth time making use of the scsi mistake shot structure.
This is by no suggests a full remedy, yet it might aid combined with various other actions : There is an I/O scheduler just like a procedure scheduler, and also it can be fine-tuned.
Most especially, you can in fact pick among various schedulers :
~# cat /sys/block/sda/queue/scheduler noop anticipatory deadline [cfq] ~# echo "deadline" > /sys/block/sda/queue/scheduler ~# cat /sys/block/sda/queue/scheduler noop anticipatory [deadline] cfq ~#
deadline might aid you get extra highly reproducible outcomes.
noop, as its name indicates, is hugely foolish, and also will certainly enable you to ravage outright chaos on I/O performance with little initiative.
anticipatory and also
cfq both attempt to be clever concerning it, though
cfq is usually the smarter of both. (As I remember,
anticipatory is in fact the heritage scheduler from right prior to the bit began sustaining numerous schedulers.)