Link to home
Start Free TrialLog in
Avatar of sunhux
sunhux

asked on

Shell script / command to generate IO / IOPS load

Can anyone share any scripts / command to generate IO, ideally
one that I could control the amount of IOPS generated.

This is for Linux RHEL 6 & Solaris 10 x86

If need to run 2 times the command to get 2x the IOPS, do indicate

Ideally don't require to install any packages, just use the built-in commands / tools
Avatar of arnold
arnold
Flag of United States of America image

Are you looking for benchmarking/load testing tools?
Avatar of sunhux
sunhux

ASKER

I'm not working on Outlook nor AD.

Just test loading to see at what IOPS, we'll feel slowness in the servers.

Heavyload is one tool I've used for Windows but it's only for CPU & RAM
only, not IOPS
SOLUTION
Avatar of Carlos Ijalba
Carlos Ijalba
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunhux

ASKER

What gheist gave is close to what's needed: perhaps I could
run the dd commands in background (ie dd ..... &) and this
will increase the IOPS

>Your servers are physical or virtual?
both

>local storage or attached storage (provided via a SAN, NAS, NFS, etc.)??
Mostly SAN
Avatar of sunhux

ASKER

Is /dev/zero   the same as   /dev/null   in Linux?

In Windows, I've just tried to channel a huge Outlook pst file to nul & the IOPS shot up as shown in
Task Mgr's Resource Monitor:
   type myOutlook.pst > nul

Running multiple of the above "type ..." commands do not increase the IOPS further though, looks
like my 64bit laptop has hit the limit even with one single command
Avatar of sunhux

ASKER

Looks like the limitation lies with "type" command: it appears to get the IO up to the
max of about 29Mbps only.

If I issued "copy myOutlook.pst  test1.pst", IOS go up to 250Mbps (for 1 copy) or
350Mbps (if 2 copy   commands are running concurrently)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
/dev/zero is read only device that emits plain stream of zeroes. Probably it shares man page with /dev/null.
Avatar of sunhux

ASKER

Does running multiple "dd ..." increases the IOPS ?


Carlos,  for Windows CPU & RAM utilization, I have HeavyLoad but not for disk IO;
    what are the tools out there for Linux (esp ESXi) if I'm installing one?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
running multiple dd will not increase IOPS.
say rotational disk can make one write per revolution.
NCQ/TCQ may or may not queue and reorder  those, but with SYNC it writes directly to disk platter, so it measures physical media bypassing caches.
Next technique employed by Linux is write clustering, if it sees two requests to neighbouring sectors it does just one bigger write.
Also most OS-ses do disk request sorting in case queuing does not do it;s job at minimizing disk head moves.
If you want to check ANY performance parameter on vSphere, on a ESXi host, or on VMs, then you need to check from the performance tabs of vCenter, not on the OS itself, as vSphere has performance improvements on the virtual HW like memory dedup, ballooning, thin storage, etc, which won't show up on the OS measurements.

Therefore, you don't need to install anything.

You can always use performance monitor on windows and topas, sar, etc on Linux to check the local OS response. But as I say, better off looking from vCenter.
memory deduplication is disabled in vmware for a year now via security patch, and it was ineffective since XP SP2 came out.
Avatar of sunhux

ASKER

> dd if=/dev/zero of=whavever bs=4k oflags=sync count=10
Ok, running multiple dd's is not going to increase the IOPS;  is there any way at all
to increase IOPS, say by changing the blocksize (presume it's "bs" in the above) ?
Any other tools/commands (eg: cp, tar will give higher IOPS ) ?
IOPS is a computed value based on IO during a time frame.

What are you trying to benchmark?
Look at lbs.sourceforge.net
See if that provides the info you are after.
Avatar of sunhux

ASKER

UnixBench which has a function to gen IO activity is not there at the
URL anymore.

IOZone : appears that after installing, it only gives 1 option ie "Uninstal" & 
can't launch it
Question is exclusively about UNIX. If you want to install windows benchmarks ask another question.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Those add to latency of virtual disk:
1. enabling snapshots (not even taking them)
2. Having dynamic VMDK, or any other sort of thin/delayed provisioning
3. Having any sort of IO barrier inside guest
4. Having too many VMs per rotational disk (remember - 1 write per revolution, you need 30IOPs at storage per VM, which may be just 15 IOPs inside VM)
I know this is an old thread, but I was researching this at this time as well and found this site which has a script to create the iops metrics, hope it helps
https://benjamin-schweizer.de/measuring-disk-io-performance.html
script is here:
https://benjamin-schweizer.de/files/iops/
Buffered read has nothing to do with the disk.