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?
You can attempt running a duplicate of a huge documents, such as an iso of the Ubuntu install cd, and also run it two times. That need to reduce your drive down a fair bit.
Why not run iotop
and also see if the procedure that you are attempting to debug is creating great deals of disk reads/writes?
# 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.
just how around make -j64
? in write-ups defining that new 200line performance spot, make -j64
was a job consuming a great deal of computer system sources
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.)
Related questions