PGIOSim 0.1
Jeff Trout <jeff@jefftrout.com>

This is a small utility to _SORT OF_ simulate an index scan in PG.
What we do is open a number of files and randomly seek around reading 8KB
at a time.  In write mode we may also write out a percentage of the blocks.
The files can be of anything, you can use your current PG files (BEWARE THE
-w MODE WHEN USING THEM!!!!) or anything.  The contents read are not 
inspected by the program.

It also supports a seq scan mode, which is rather useless.

There are no locks, no bufmgr, it basically tests your disks raw seek & read
ability in a pattern sort of like PG.  If you have > 1 file to read, it will
be a closer mimic as PG will have various files opened & reading (An index
scan fetches from the index, then fetches from the heap).

You'll probably want to fire up a few of these at a time, and it may also be
useful to watch iostat in another window.

If you don't want to wait for it to finish its run just hit ctrl-c

The args are simple:

pgiosim -b [blocks to read] 
        -s - turn on seq scan mode)
        -w [percentage, 0..100] - write out a percentage of the blocks read.
	-y fsync after each write           

Thanks!

