On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

  • Recent Posts

    November 2012
    M T W T F S S
    « Oct   Jun »
  • Subscribe Options

  • Awards

  • Most Valuable Blogger @ DZone
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 174 other followers

  • Follow MyThinkPond on
  • Blog Stats

    • 364,473 hits
  • General Options

Simulating Load on a File-System

Posted by Venkatt Guhesan on November 14, 2012


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:


while true
  echo "=== Starting clean-up ===="
  rm -fr /myspecialmount/usr
  echo "=== Starting load ===="
  rsync -avp /usr /myspecialmount

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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: