Simulating Load on a File-System | MyThinkPond

load

Sometimes you want an easy way to simulate load on a file-system that you are trying to test. Here’s a quick and easy way.

Suppose your mount point you want to perform this IO is “/myspecialmount”. (Assuming you have plenty of space to test)

Then the easiest way to load some IO is through the following bash-script:

[sourcecode language=“bash”] #!/bin/bash

while true do echo “=== Starting clean-up ====” rm -fr /myspecialmount/usr echo “=== Starting load ====” rsync -avp /usr /myspecialmount done [/sourcecode]

In the above code sample, Line-6 - cleans up the filesystem sub-folder “/myspecialmount/usr”. The options “-fr” allows you to perform the clean-up recursively with a force option. And in Line-8, we synchronize the systems “/usr” folder and files onto “/myspecialmount/usr”. And these two steps are done on an infinite-loop.

Please note that this is not a true load-testing where you have parallel-simultaneous IO requests being sent to a filesystem but rather a simple way to create some load.

There are some specialized tools such as “iozone”, “bonnie” and “dbench” and others (see Filesystems section) that are sophisticated bench-marking tools available to the Linux community.

If you find this article useful, please subscribe to my blog and/or share my link with others.

Venkatt Guhesan avatar
About Venkatt Guhesan
Enterprise Software Architect currently working at DataDirect Networks developing a highly scalable monitoring solution called DDN Insight. My passions include all things Open Source including Linux (CentOS, Red Hat, Gentoo, Open Stack, Docker & Ubuntu), embedded ARM processors and microcontrollers (Arduino, UDOO, Cubieboard, BeagleBoard, OnionIO, TI's Zigbee). Coming from an Electrical and Computer Engineering background, working in developing and designing enterprise - distributed, highly scalable software requires a unique set of software skills with a good understanding of the hardware. This makes his work challenging and interesting. In his free time, he spends his time with his family and two children. He also enjoys researching on topics including - world ancient history and yoga. Visit the 'About' section for more details.
comments powered by Disqus