0

In order to test our monitoring infrastructure, I'd like to generate enough IOs to trigger an alert. As the alert is based on IOWaits, I should find a way to 'overload' the IOs.

I found an article about that using dd:

dd if=/dev/zero of=/root/testfile bs=512 count=1000 oflag=direct

But I am not quite sure that:

  1. it is safe
  2. it will actually generate enough IOs to get IOWaits

Any pointer will be greatly appreciated.

E. Jaep
  • 283
  • 1
  • 3
  • 12
  • What concerns do you have regarding safety? – Christopher Perrin Oct 23 '18 at 14:50
  • @ChristopherPerrin: safety in terms of data corruption on disk – E. Jaep Oct 23 '18 at 14:53
  • 1
    This is no less safe than writing any other large file to disk. – Michael Hampton Oct 23 '18 at 15:14
  • @MichaelHampton Thanks for the confirmation of point 1 – E. Jaep Oct 24 '18 at 07:46
  • I would say that as long as the cou can generate zeros faster than the disk can write them you are on the safe side, and i don't think there is storage fast enough to outrun a decent cpu yet. You could just try it though and find out. As long as you don't have anything on that disk that can fail if the access is slow, nothing can happen to the data itself. The command only writes zeros to a file and circumvents the system cache. – Christopher Perrin Oct 24 '18 at 08:56

0 Answers0