[Summary #2] Solaris benchmark

From: Jordan Gaston <jgaston_at_highlander.com>
Date: Mon Feb 11 2002 - 10:53:25 EST
Hi again,

I knew that this would happen as soon as I sent out the 
first email, I would get a boatload more.  So here it is

New Thanks to:
Ian Clements, Scott D Thornberry, Don Mies, David Foster and Karl Vogel

www.spec.org for raw performance numbers on various CPUs.
http://www.osdata.com
http://www.specbench.org/ - SPEC Benchmarks
http://www.connectathon.org - NFS Benchmarks
Benchmark Programs
www.textuality.com/bonnie/index.html
fishbutt.fiver.net/pub/solarisx86/bench
ftp.sunet.se/pub/benchmark - Iozone, Iogen, Bonnie
ftp.symbios.com/pub/benchmarking/unix - Iogen
stkio - Which is hard to find it is attached at the bottom

For course as has been pointed out there are allot of variables
when looking at and using Benchmarks, your systems and
evirnoments can be very different than the numbers that
may show up in any benchmark.

Thanks
Jordan Gaston


-----Original Message-----
From: sunmanagers-admin@sunmanagers.org
[mailto:sunmanagers-admin@sunmanagers.org] On Behalf Of Jordan Gaston
Sent: Tuesday, February 05, 2002 1:43 PM
To: sunmanagers@sunmanagers.org
Subject: [Summary] Solaris benchmark


Well there isn't much in the way of a Solaris benchmark, as I
had guessed.  But here is what I have found:

http://www.cisecurity.org/bench_solaris.html
and
http://www.volano.com/benchmarks.html

Other than that it looks like you will have to get out the
old stopwatch and compare your machines that way.

Thanks to:
Scott Buecker and Gary Sherman

Jordan Gaston
Solaris Systems Admin
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


STKIO

------------------------------------------------------------------------
---
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2002-02-05 23:30 EST by <vogelke@newmis>.
# Source directory was `/pack/benchmarks/stkio-1.0'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
# This format requires very little intelligence at unshar time.
# "if test", "echo", "mkdir", and "sed" may be needed.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   4501 -r--r--r-- LOG
#    629 -rwxr-xr-x doit
#   6129 -rw-r--r-- stkio.1
#  22100 -rw-r--r-- stkio.c
#  14915 -rw-r--r-- stkio.txt
#
echo=echo
if mkdir _sh16677; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= LOG ==============
if test -f 'LOG' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'LOG' '(file already exists)'
else
  $echo 'x -' extracting 'LOG' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'LOG' &&
XBEGINNING OF LOG FOR stkio-1.0
===============================================
X
XSat, 21 Jul 2001 19:02:50 -0400   Karl Vogel   (vogelke at ss118u)
X
X	Got this from
X	http://www.storagetek.com/products/software/freeware/stkio/
X
X	Test script.
X
X
-------------------------------------------------------------------S
X	me% cat doit
X	#!/bin/sh
X	# stkio: benchmark
X	#
X	# create a large file first:
X	#   dd if=/dev/zero of=/some/file bs=8192 count=200000
X	#   -rw-r--r--  1 root  root  1638400000 Jul 21 18:41 /some/file
X	#
X	# then use a smaller filesize (-m option), to prevent read
errors.
X
X	file=`echo $1`
X	case "$file" in
X	    "") file=/nfspriv/tmp/testfile ;;
X	esac
X
X	test -f $file || exit 1
X	opts="-m1150 -t15 -b200 -l4096 -e524288"
X
X	echo
X	echo seq write test
X	./stkio -f$file -s -w $opts
X
X	echo
X	echo random write test
X	./stkio -f$file -w $opts
X
X	echo
X	echo seq read test
X	./stkio -f$file -s -r $opts
X
X	echo
X	echo random read test
X	./stkio -f$file -r $opts
X
X	echo
X	ls -l $file
X	exit 0
X
-------------------------------------------------------------------E
X
X	Results.
X
X
-------------------------------------------------------------------S
X	me% ./doit
X
X	seq write test
X	STKIO Version 1.0 Copyright 1997 StorageTek Corporation
X
X	Run for 1 loops to 1 files/volumes
X	number of processes is 15
X	IO type is seq   writes
X	file size is 1150 MB
X	Initial transfer length = 4096 bytes
X	Ending Transfer length will be 524288 bytes
X	I/O processes terminate after 209715200 bytes are transferred
X	 1.78 MB per second for 4KB      (456 IO's per second).
X	 1.74 MB per second for 8KB      (222 IO's per second).
X	 1.16 MB per second for 16KB     (73 IO's per second).
X	 1.42 MB per second for 32KB     (45 IO's per second).
X	 1.74 MB per second for 64KB     (27 IO's per second).
X	 2.98 MB per second for 128KB    (23 IO's per second).
X	 4.68 MB per second for 256KB    (18 IO's per second).
X	 4.54 MB per second for 512KB    (9 IO's per second).
X
X	random write test
X	STKIO Version 1.0 Copyright 1997 StorageTek Corporation
X
X	Run for 1 loops to 1 files/volumes
X	number of processes is 15
X	IO type is random   writes
X	file size is 1150 MB
X	Initial transfer length = 4096 bytes
X	Ending Transfer length will be 524288 bytes
X	I/O processes terminate after 209715200 bytes are transferred
X	 0.23 MB per second for 4KB      (58 IO's per second).
X	 0.37 MB per second for 8KB      (47 IO's per second).
X	 0.83 MB per second for 16KB     (52 IO's per second).
X	 1.35 MB per second for 32KB     (43 IO's per second).
X	 2.16 MB per second for 64KB     (34 IO's per second).
X	 2.75 MB per second for 128KB    (22 IO's per second).
X	 3.86 MB per second for 256KB    (15 IO's per second).
X	 4.07 MB per second for 512KB    (8 IO's per second).
X
X	seq read test
X	STKIO Version 1.0 Copyright 1997 StorageTek Corporation
X
X	Run for 1 loops to 1 files/volumes
X	number of processes is 15
X	IO type is seq reads  
X	file size is 1150 MB
X	Initial transfer length = 4096 bytes
X	Ending Transfer length will be 524288 bytes
X	I/O processes terminate after 209715200 bytes are transferred
X	 4.28 MB per second for 4KB      (1098 IO's per second).
X	 3.76 MB per second for 8KB      (482 IO's per second).
X	 2.27 MB per second for 16KB     (145 IO's per second).
X	 2.71 MB per second for 32KB     (86 IO's per second).
X	 3.25 MB per second for 64KB     (52 IO's per second).
X	 4.98 MB per second for 128KB    (39 IO's per second).
X	 5.61 MB per second for 256KB    (22 IO's per second).
X	 5.67 MB per second for 512KB    (11 IO's per second).
X
X	random read test
X	STKIO Version 1.0 Copyright 1997 StorageTek Corporation
X
X	Run for 1 loops to 1 files/volumes
X	number of processes is 15
X	IO type is random reads  
X	file size is 1150 MB
X	Initial transfer length = 4096 bytes
X	Ending Transfer length will be 524288 bytes
X	I/O processes terminate after 209715200 bytes are transferred
X	 1.19 MB per second for 4KB      (304 IO's per second).
X	 1.11 MB per second for 8KB      (141 IO's per second).
X	 1.22 MB per second for 16KB     (78 IO's per second).
X	 2.06 MB per second for 32KB     (65 IO's per second).
X	 3.47 MB per second for 64KB     (55 IO's per second).
X	 4.33 MB per second for 128KB    (34 IO's per second).
X	 5.12 MB per second for 256KB    (20 IO's per second).
X	 5.44 MB per second for 512KB    (10 IO's per second).
X
X	-rw-r--r--   1 vogelke  1228800000 Jul 22 16:51
/nfspriv/tmp/testfile
X
-------------------------------------------------------------------E
X
X
XTue, 5 Feb 2002 23:30:24 -0500   Karl Vogel   (vogelke at newmis)
X
X	URL is gone.
SHAR_EOF
  : || $echo 'restore of' 'LOG' 'failed'
fi
# ============= doit ==============
if test -f 'doit' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'doit' '(file already exists)'
else
  $echo 'x -' extracting 'doit' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'doit' &&
X#!/bin/sh
X# stkio: benchmark
X#
X# create a large file first:
X#   dd if=/dev/zero of=/some/file bs=8192 count=200000
X#   -rw-r--r--  1 root  root  1638400000 Jul 21 18:41 /some/file
X#
X# then use a smaller filesize (-m option), to prevent read errors.
X
Xfile=`echo $1`
Xcase "$file" in
X    "") file=/nfspriv/tmp/testfile ;;
Xesac
X
Xtest -f $file || exit 1
Xopts="-m1150 -t15 -b200 -l4096 -e524288"
X
Xecho
Xecho seq write test
X./stkio -f$file -s -w $opts
X
Xecho
Xecho random write test
X./stkio -f$file -w $opts
X
Xecho
Xecho seq read test
X./stkio -f$file -s -r $opts
X
Xecho
Xecho random read test
X./stkio -f$file -r $opts
X
Xecho
Xls -l $file
Xexit 0
SHAR_EOF
  : || $echo 'restore of' 'doit' 'failed'
fi
# ============= stkio.1 ==============
if test -f 'stkio.1' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'stkio.1' '(file already exists)'
else
  $echo 'x -' extracting 'stkio.1' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'stkio.1' &&
X.TH stkio 1 "19 March 1997"
X.SH NAME
Xstkio \- I/O benchmark, showing throughput in megabytes per second, for
given I/O sizes.
X.SH SYNOPSIS
X.B stkio
X.RB {-f
X.IR volume_name |
X.RB -F
X.IR file_name |
X.RB -v} 
X.RB -b
X.IR max_bytes_transferred
X.RB [-t
X.IR number_tasks] 
X.RB [-o
X.IR offset]
X.RB [-l
X.IR start_length_of_io] 
X.RB [-e
X.IB end_length_of_io]
X.RB [-m
X.IB maximum_seek_address]
X.RB [-L
X.I loop_count]
X.RB [-r] [-w] [-s] [-c] [-S]
X
X.SH DESCRIPTION
X.LP
X.B stkio
Xgenerates either random or sequential I/O reference patterns over a
number of drives or files. 
X.B stkio
Xis designed to be used as a benchmark for evaluating disk subsystems.
The program issues I/Os of a fixed length for a specified number of
bytes. This is defined as a phase. When a phase is complete, the program
reports statistics, doubles the I/O size and continues until the maximum
I/O size is reached. This is defined as a pass.
X
X.B stkio
Xis a multi-threaded program that can drive most disk subsystems to
saturation. The program can issue I/O to either a file system or to a
raw device. Caution must be used when testing in raw device mode, as
improper use may cause loss of data. 
X
X.B stkio
Xuses two gigabyte files. If the program is run to a file system and the
program is issuing reads, the file must exist prior to program
execution. If the file does not exist and the program is issuing writes,
the program creates the file as it is executing. This causes unreliable
results. If the program is used to create the file, the program should
be run a second time against the newly created file for more reliable
results.
X
X.SH WARNING
XIf you are performing writes to a character device with
X.B stkio
Xand you enter an incorrect device name, 
X.B stkio
Xcreates a two gigabyte file by default in the /dev directory. This may
fill your root file system causing operational problems.
X
X.SH OPTIONS
X.TP
X-b
XIndicates number of megabytes to transfer per phase. This parameter is
used to terminate a phase of the programs execution. The phase
terminates when -b megabytes have been transferred. To insure the
program produces accurate sustained performance results, the value used
with the -b option should be greater than the sum of the cache in the
disk system and any cache the host computer system provides. 
X.TP
X-c
XUse of this option causes the program to run continuous passes.
X.TP
X-e
XIndicates the largest I/O size issued. When the I/O size exceeds this
value, the pass is terminated. When running in raw device mode, the
transfer length must be an integral of the minimum transfer length
supported by the device. In most cases this is 512 bytes.
X.TP
X-F
XIndicates a file that contains the list of devices, or files, used. The
program issues I/O to these devices/files in a random order independent
of the reference pattern specified. A maximum of 256 devices/files can
be entered.
X.TP
X-f
XSingle device/file to use. This option may be used in conjunction with
the -F or -v options.
X.TP
X-L
XThis option allows the user to specify a number of passes.
X.TP
X-l
XIndicates the starting transfer length in bytes. Transfer lengths are
doubled until the -e parameter or 2 megabytes is exceeded. When running
in raw device mode, the transfer length must be an integral of the
minimum transfer length supported by the device. In most cases this is
512 bytes.
X.TP
X-m
XUsed to control the maximum seek address STKIO uses during program
execution. The value is specified in megabytes. For example if the
parameter -m10 is used, STKIO uses a 10 megabyte file size. The default
maximum seek address is two gigabytes. 
X.TP
X-o
XOffset. This is the lowest byte address the program references during
execution. For example if -o65536 is used, the program is prevented from
reading or writing to addresses less than 65536. This may preserve
label/superblock information when running to a raw device.
X.TP
X-r
XPerform reads. This parameter may be omitted, it is the default. To
perform writes use the -w parameter. If both -r and -w are used the
program alternates reads and writes.
X.TP
X-S
XProduces I/O statistics after each phase is complete. The program
reports Slowest, Quickest and Mean response times for the I/Os issued.
X.TP
X-s
XPerform sequential I/O. When running in multi-threaded mode, STKIO does
not create multiple sequential streams. STKIO controls the seek location
of each thread to maintain a single sequential stream per device. If
this parameter is omitted random I/O is performed.
X.TP
X-t
XNumber of threads, or processes, per run. The value specified here is
used to control the number of I/O processes. The default is one.
X.TP
X-v
XCauses the program to prompt for additional devices/files. The program
continues to ask for devices/files until the user enters the string
"done". A maximum of 256 devices/files can be entered.
X.TP
X-w
XPerform writes. This option may be used in conjunction with the -r
option. If it is omitted, reads are performed.
X.SH EXAMPLES
X.LP
X.SS Example 1
Xstkio -f/dev/rdisk0 -r -t10 -b100 -l4096 -e65536
X.LP
XThis command causes stkio to issue random reads to the raw device
/dev/rhdisk0. The program reads 100 megabytes of data per phase. For the
first phase, the request size is 4096 bytes. The second phase issues
8192 byte reads and so on until the program completes the 65536 I/O
size. Each phase has 10 processes issuing I/O to the device.
X.SS Example 2
Xstkio -Ffile_list -s -w -t15 -b200 -l4096 -e524288
X.LP
XThis command causes stkio to issue sequential writes to the list of
files/devices contained in the file "file_list". The program writes a
total of 200 megabytes of data per phase. The -b option is not used on a
per file/device basis. For the first phase, the request size is 4096
bytes. The second phase issues 8192 byte reads and so on until the
program completes the 524288 I/O size. Each phase has 15 processes
issuing I/O to the device. file_list has the following format:
X.LP
X/dev/rdsk/c1t2d0s6
X/dev/rdsk/c1t2d1s6
X.
X .
X .
X/dev/rdsk/c1t2dns6
X done
X
XThe file consists of a list of file/devices to issue I/O to. The list
is terminated by the string "done".
X
X
X.SH EXIT STATUS
X.B stkio
Xreturns an exit status of zero.
X.SH DIAGNOSTICS
X
SHAR_EOF
  : || $echo 'restore of' 'stkio.1' 'failed'
fi
# ============= stkio.c ==============
if test -f 'stkio.c' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'stkio.c' '(file already exists)'
else
  $echo 'x -' extracting 'stkio.c' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'stkio.c' &&
X/*
XLICENSE AGREEMENT
X
X   NOTICE -- READ THIS BEFORE USING THE SOFTWARE 
X
XINSTALLING AND USING THE SOFTWARE ACCOMPANYING THIS LICENSE
XINDICATES YOUR ACCEPTANCE OF THESE TERMS AND CONDITIONS. 
XREAD ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE 
XAGREEMENT PRIOR TO INSTALLING OR USING THE SOFTWARE. IF YOU 
XDO NOT ACCEPT THESE TERMS, YOU MUST DELETE THE SOFTWARE FROM 
XYOUR HARDWARE. 
X
XLICENSE: This Software is licensed, not sold, to you.  
XSubject to the terms of this agreement, you have a non-
Xexclusive and nontransferable right to use the Software for 
Xany purpose except for license, resale, rental or the like. 
XYou may not rent, lease, sell or otherwise transfer or 
Xdistribute copies of the Software to others without the 
Xexpress written consent of StorageTek.  You agree to use 
Xyour best efforts to prevent and protect the contents of the 
XSoftware from unauthorized disclosure or use. StorageTek 
Xreserves all rights not expressly granted to you.  As 
Xconsideration for this license, by using the Software you 
Xagree to provide StorageTek with a description of your test 
Xconfiguration and the test results.  The description and 
Xresults may be sent by Email to Benchmarks@stortek.com .
X
XLIMITATION ON USE: You may not release the results of any 
Xperformance or functional evaluation of  the Software to any 
Xthird party without prior written approval of StorageTek for 
Xeach such release.
X 
XCOPYRIGHT: The Software is copyrighted by StorageTek.  
XStorageTek  retains all right, title and interest in and to 
Xthe Software at all times, regardless of the form or media 
Xin or on which the original or other copies may subsequently 
Xexist. This license is not a sale or transfer of ownership 
Xof the original or any subsequent copy.
X
XTERM AND TERMINATION: This license is effective until 
Xterminated. You may terminate this license at any time by 
Xdestroying the Software. This license automatically 
Xterminates if you fail to comply with its terms and 
Xconditions. You agree that, upon such termination, you will 
Xeither destroy (or permanently erase) all copies of the 
XSoftware or return the original Software to StorageTek, 
Xtogether with any other material you have received from 
XStorageTek in connection with the Software. 
X
XDISCLAIMER OF WARRANTY: StorageTek AND ITS LICENSORS PROVIDE 
XTHE SOFTWARE AND ANY SERVICE OFFERED, SOLD OR OTHERWISE 
XPROVIDED TO YOU AS A RESULT OF YOUR USE OF THE SOFTWARE, "AS 
XIS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED OR 
XSTATUTORY, INCLUDING BUT NOT LIMITED TO ANY IMPLIED 
XWARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT OR FITNESS 
XFOR A PARTICULAR PURPOSE. StorageTek does not warrant that 
Xthe Software is error-free, or that its operation will be 
Xuninterrupted.  Should the Software prove defective, you and 
Xnot StorageTek assume the entire cost of any service and 
Xrepair. This disclaimer of warranty constitutes an essential 
Xand material part of this agreement. 
X
XSome states do not allow the exclusion of implied 
Xwarranties, so the above exclusion may not apply to you. 
XThis warranty gives you specific legal rights and you may 
Xalso have other rights which vary from state to state. 
X
XLIMITATION OF REMEDIES: IN NO EVENT WILL StorageTek OR ITS 
XLICENSORS BE LIABLE FOR ANY INDIRECT DAMAGES OR OTHER RELIEF 
XARISING OUT OF YOUR USE OR INABILITY TO USE THE SOFTWARE 
XINCLUDING, BY WAY OF ILLUSTRATION AND NOT LIMITATION, LOST 
XDATA, LOST PROFITS, LOST BUSINESS OR LOST OPPORTUNITY, OR 
XANY SPECIAL, INCIDENTAL OR CONSEQUENTIAL OR EXEMPLARY 
XDAMAGES ARISING OUT OF SUCH USE OR INABILITY TO USE THE 
XSOFTWARE, EVEN IF StorageTek, ITS LICENSORS OR AN AUTHORIZED 
XStorageTek DEALER, DISTRIBUTOR OR SUPPLIER HAS BEEN ADVISED 
XOF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM AGAINST 
XOR THROUGH YOU BY ANY OTHER PARTY. 
X
XSome states do not allow the exclusion or limitation of 
Xincidental or consequential damages so the above limitation 
Xor exclusion may not apply to you. 
X
XThis license will be governed by the laws of the State of 
XColorado as applied to transactions taking place wholly 
Xwithin Colorado between Colorado residents. 
X
XEXPORT CONTROLS: The Software and the underlying information
Xand technology may not be downloaded or otherwise exported 
Xor reexported (i) into (or to a national or resident of) any 
Xcountry to which the U.S. has embargoed goods; or (ii) to 
Xanyone on the U.S. Treasury Department's list of Specially 
XDesignated Nationals or the U.S. Commerce Department's Table 
Xof Denial Orders; or in any other situation prohibited by 
XU.S. law or regulation. By downloading or using the 
XSoftware, you are agreeing to the foregoing and you 
Xrepresent and warrant that you are not located in, under the 
Xcontrol of, or a national or resident of any such country or 
Xon any such list. 
X
XU.S. GOVERNMENT END USERS: The Software is a "commercial 
Xitem," as that term is defined at 48 C.F.R. 2.101 (Oct. 
X1995), consisting of "commercial computer software" and 
X"commercial computer software documentation," as such terms 
Xare used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 
X48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 
X(June 1995), all U.S. Government End Users acquire the 
XSoftware with only those rights set forth herein. */
X
X#define VERSION "STKIO Version 1.0 Copyright 1997 StorageTek
Corporation"
X
X/* Add or set Defines here according to the target host */
X#undef  DEC     /* compile statement cc -O4 stkio.c -o stkio  -lm */
X#define  SUN     /* compile statement cc -O -o stkio stkio.c  -lm */
X#undef  SGI     /* compile statement cc -o stkio stkio.c -O3 -lm */
X#undef  AIX     /* compile statement cc -O stkio.c -o stkio  -lm */
X#undef  HPUX    /* compile statement cc -Aa stkio.c -o stkio -O -lm */
X#undef  CRAY    /* compile statement cc -O stkio.c -o stkio -lm */
X#undef  ATT     /* compile statement cc -O stkio.c -o stkio -O -lm */
X 
X/* Check make sure a target host is defined */
X#ifndef SUN
X#ifndef AIX
X#ifndef HPUX
X#ifndef DEC
X#ifndef SGI
X#ifndef CRAY
X#ifndef ATT
X#error  No Target Platform defined for compile
X#endif
X#endif
X#endif
X#endif
X#endif
X#endif
X#endif
X
X/* Check for multiple targets */
X#ifdef  DEC
X#if     defined(ATT) || defined(SUN) || defined(AIX) || defined(HPUX)
|| defined(SGI) || defined(CRAY)
X#error  Multiple platform compile
X#endif
X#endif
X#ifdef  SUN
X#if     defined(ATT) || defined(DEC) || defined(AIX) || defined(HPUX)
|| defined(SGI) || defined(CRAY)
X#error  Multiple platform compile
X#endif
X#endif
X#ifdef  AIX
X#if     defined(ATT) || defined(SUN) || defined(DEC) || defined(HPUX)
|| defined(SGI) || defined(CRAY)
X#error  Multiple platform compile
X#endif
X#endif
X#ifdef  HPUX
X#if     defined(ATT) || defined(SUN) || defined(AIX) || defined(DEC) ||
defined(SGI) || defined(CRAY)
X#error  Multiple platform compile
X#endif
X#endif
X#ifdef  SGI
X#if     defined(ATT) || defined(SUN) || defined(AIX) || defined(DEC) ||
defined(CRAY) || defined(HPUX)
X#error  Multiple platform compile
X#endif
X#endif
X#ifdef  CRAY
X#if     defined(ATT) || defined(SUN) || defined(AIX) || defined(DEC) ||
defined(SGI) || defined(HPUX)
X#error  Multiple platform compile
X#endif
X#endif
X#ifdef  ATT
X#if     defined(DEC) || defined(SUN) || defined(AIX) || defined(HPUX)
|| defined(SGI) || defined(CRAY)
X#error  Multiple platform compile
X#endif
X#endif
X
X/* start adding conditional stuff */
X#ifdef         HPUX
X#define        _XPG2
X#define        _HPUX_SOURCE
X#endif
X
X#ifndef        FALSE
X#define        FALSE 0
X#endif
X
X#ifndef        TRUE
X#define        TRUE 1
X#endif
X
X/* includes */
X#include       <stdio.h>
X#include       <stdlib.h>
X#include       <string.h>
X#include       <sys/types.h>
X#ifdef ATT
X#include       <sys/ipc.h>
X#include       <limits.h>
X#endif
X#ifdef SGI
X#include       <sys/ipc.h>
X#endif
X#ifdef CRAY
X#include       <sys/ipc.h>
X#endif
X#include       <sys/shm.h>
X#include       <time.h>
X#include       <fcntl.h>
X#ifdef SGI
X#include       <limits.h>
X#endif
X#ifdef HPUX
X#include       <limits.h>
X#endif
X#ifdef SUN
X#include       <limits.h>
X#endif
X#ifdef CRAY
X#include       <limits.h>
X#endif
X#ifdef DEC
X#include       <sys/limits.h>
X#endif
X#ifdef AIX
X#include       <sys/limits.h>
X#endif
X#include       <sys/stat.h>
X#include       <errno.h>
X#ifdef AIX
X#include       <sys/sleep.h>
X#endif
X#ifndef HPUX                  /* Do not include this on HP */
X#include       <sys/time.h>
X#endif
X
X#define        MEG      (1024 * 1024L)
X#define        GIG      (1024.0 * MEG)
X#define        XFER_MAX (2.0 * MEG)
X#define        TWOGIG   (GIG * 2.0)
X#define        MAXVOLS   256
X#define        SHM_MODE (SHM_R | SHM_W)
X
X
X#ifndef ULONG
X#define ULONG unsigned long
X#endif
X
X/**************** PROTOTYPES *******************************/
Xdouble diffutime(struct timeval, struct timeval);
X
X/* Stuff that belongs off of the stack DEC can't handle much */
Xextern char  *optarg;
XFILE         *Input_Handle;
Xint           errflg, shm_size, oflag, c;
Xchar          buff[(int)XFER_MAX];
Xchar         *shmptr;
Xint           shmid;
Xdouble        *Highest, *Lowest, *Mean, *IOTime;
X
Xvoid main(int argc, char **argv)
X{
X   struct DRIVE
X      {
X      int      handle;
X      ULONG    File_Size;            /* size of file in MB */
X      char     Name[80];
X      } Drive_Table[MAXVOLS];
X   struct DRIVE *PItem;
X
X   struct timeval  time_s, time_f, time_1, time_2;
X   struct timezone zone_s;
X
X   int             stripesize;
X   int             i, j, spawnno, noios, rwflag, act_count, auto_inc;
X   int             ios_done, *Pios_done;
X   char            more_volumes, continous, byte_limit, get_stats;
X   char            i_used, i_or_b;
X   pid_t           pid, pid_table[CHILD_MAX], ret_pid;
X   int             pid_status, x, seek_stat, seqflag, result;
X   ULONG           length, startlength, endlength;
X   int             number_vols, handle, drive;
X   double          max_bytes, bytes_xfer, *Pbytes_xfer;
X   unsigned int    seed, max_file_seek;
X   ULONG           offset, *Poffset;
X   struct stat     statbuf;
X
X   printf("%s\n\n", VERSION);
X
Xif (argc < 2)
X      {
X      printf("Usage is:\n");
X      printf("  %s -fvolume_name -tnumber_tasks
-bmax_bytes_transferred\n", argv[0]);
X      printf("     -Ffile_name -ooffset -lstart_length_of_io
-eend_length_of_io -Lloop_count\n");
X      printf("     -r -w -s -v -c -p -S\n\n");
X      printf("  where\n");
X      printf("     -b  Maximum number of megabytes of data to
transfer\n");
X      printf("     -c  run continous\n");
X      printf("     -e  Upper limit for I/O size\n");
X      printf("     -F  Filename containing list of devices/files to
use\n");
X      printf("     -f  Single device/file to use\n");
X      printf("     -L  Number of loops\n");
X      printf("     -l  Lower limit for I/O size\n");
X      printf("     -m  Maximum seek address in megabytes\n");
X      printf("     -o  Offset from start of device/file\n");
X      printf("     -r  perform reads\n");
X      printf("     -S  produces I/O statistics\n");
X      printf("     -s  sequential reference pattern (default
random)\n");
X      printf("     -t  Number of I/O tasks, or processes executing\n");
X      printf("     -v  causes the program to prompt for more
volumes\n");
X      printf("     -w  perform writes\n");
X      return;
X      }
X
X   /* Initialize and set defaults */
X   act_count = noios = rwflag = seqflag = number_vols = errflg = 0;
X   bytes_xfer = max_bytes = 0.0;
X   spawnno=1;                        /* Minimum number of threads */
X   startlength = 512;                /* 512 byte xfer by default */
X   endlength = XFER_MAX;             /* End at MAX_XFER by default */
X   stripesize = 128 * 512;           /* assume 128 sectors per stripe
*/
X   auto_inc = 1;                     /* Loop once by default */
X   more_volumes = byte_limit = continous = get_stats = i_used = i_or_b
= FALSE;
X   Input_Handle = NULL;
X   PItem = &Drive_Table[0];
X   max_file_seek=2*GIG;
X
X   /* parse command line parameters */
X   while ((c = getopt(argc,argv,"L:F:o:f:e:t:b:l:m:cSswrv")) != EOF)
X      {
X      switch (c)
X         {
X         case 'f':
X            strcpy(PItem->Name, optarg);
X            PItem->File_Size = TWOGIG; 
X            number_vols++;
X            ++PItem;
X            break;
X
X         case 'S':
X            get_stats = TRUE;
X            break;
X
X         case 'F':
X            if ((Input_Handle = fopen(optarg, "r+")) == NULL)
X               {
X               printf("Unable to open %s\n", optarg);
X               errflg++;
X               }
X            break;
X
X         case 'L':
X            auto_inc = atoi(optarg);
X            break;
X
X         case 'o':
X           stripesize = atoi(optarg) * 512;
X           break;
X
X
X         case 'r':
X            rwflag |= 1;
X            break;
X
X         case 'w':
X            rwflag |= 2;
X            break;
X
X         case 's':
X            seqflag++;
X            break;
X
X         case 't':
X            spawnno = atoi(optarg);
X            if(spawnno>CHILD_MAX)
X               {
X               printf("Maximum number of activities is %d\n",
CHILD_MAX);
X               errflg++;
X               }
X            break;
X
X         case 'e':
X            endlength = atol(optarg);
X            if (endlength > XFER_MAX)
X               {
X               printf("Maximum transfer is %lg bytes\n", XFER_MAX);
X               errflg++;
X               }
X            if (endlength < startlength)
X               {
X               printf("End Transfer length less than Start length\n");
X               errflg++;
X               }
X
X            break;
X
X         case 'l':
X            startlength = atol(optarg);
X            if (startlength > XFER_MAX)
X               {
X               printf("Maximum transfer is %lg bytes\n", XFER_MAX);
X               errflg++;
X               }
X            if (startlength > endlength)
X               {
X               printf("Start Transfer length greater than End
length\n");
X               errflg++;
X               }
X
X            break;
X
X         case 'v':
X            more_volumes = TRUE;
X            break;
X
X         case 'c':
X            continous = TRUE;
X            break;
X
X         case 'b':
X            max_bytes=atof(optarg)*(1024.0*1024.0);
X            if(max_bytes<1)
X               {
X                errflg++;
X                printf("Number of bytes transferred must be greater
than zero\n");
X                break;
X               }
X            noios=max_bytes/startlength;
X            byte_limit=TRUE;
X            break;
X
X         case 'm':
X            max_file_seek=atoi(optarg)*(1024*1024);
X            if(max_file_seek<1)
X               {
X                errflg++;
X                printf("Maximum seek address must be greater than
zero\n");
X                break;
X               }
X            break;
X
X         default:
X            errflg++;
X            break;
X         }
X      }
X
X   if(!byte_limit)
X      {
X      printf("Must use -b option to control amount of data transferred
\n");
X      ++errflg;
X      }
X
X   if (spawnno <= 0)
X      {
X      printf("Number of Threads is not valid\n");
X      ++errflg;
X      }
X
X   if (errflg)
X      {
X      printf("Invalid arguments\n");
X      return;
X      }
X   if (!(rwflag))
X      rwflag = 1;     /* reads by default */
X
X   if (rwflag == 1)
X      oflag = O_RDWR;
X   else
X      oflag = O_RDWR | O_CREAT;
X
X   if (Input_Handle)
X      {
X      while ((fgets(PItem->Name, sizeof(PItem->Name), Input_Handle)) !=
NULL)
X         {
X
X         /*Clear CRLF and other stuff fgets() leaves in string */
X
X         while (PItem->Name[strlen(PItem->Name) - 1] <= ' ')
X            PItem->Name[strlen(PItem->Name) - 1] = 0x00;
X         if (!strcmp(PItem->Name, "done"))
X            break;
X         ++PItem;
X         ++number_vols;
X         }
X      fclose(Input_Handle);
X      }
X
X   if (more_volumes)
X      {
X      for (;;)
X         {
X         printf("Enter volume name or done\n");
X         memset(PItem->Name, 0x00, sizeof(PItem->Name)); /* Clear the
string */
X         gets(PItem->Name);
X         if(!strcmp(PItem->Name, "done"))
X            break;
X         ++PItem;
X         number_vols++;
X         }
X      }
X
X   for(j = 0, PItem = &Drive_Table[0]; j < number_vols; PItem++, j++)
X      {
X      if ((PItem->handle = open(PItem->Name, oflag, 0666)) == -1)
X         {
X         printf("Could not open file %s\n", PItem->Name);
X         return;
X         }
X      }
X
X   shm_size =  (sizeof(offset) * number_vols)
X               + sizeof(bytes_xfer)
X               + sizeof(ios_done)
X               + (sizeof(double)*4)
X               + 16;
X#ifdef CRAY  /* CRAY errors OFF if request is less than minimum allowed
??? */
X   if (shm_size < 100)
X      shm_size = 200;
X#endif
X   if ((shmid = shmget(IPC_PRIVATE, shm_size, SHM_MODE)) < 0)
X      {
X      printf("Error acquiring shared memory\n");
X      return;
X      }
X   if ((shmptr = shmat(shmid, 0, 0)) == (void *) -1)
X      {
X      printf("Error attaching shared memory");
X      return;
X      }
X   Pbytes_xfer=(double *)(shmptr);
X   Highest=(double *)(Pbytes_xfer+1);
X   Lowest=Highest+1;
X   Mean=Lowest+1;
X   IOTime=Mean+1;
X   Pios_done=(int *)(IOTime+1);
X   Poffset = (ULONG *)(Pios_done+2);
X
X   for (i = 0; i < number_vols; i++)
X      Poffset[i] = stripesize;
X
X
X   printf("Run for");
X   if (continous)
X      printf(" ever ");
X   else
X      printf(" %d loops ", auto_inc);
X   printf("to %d files/volumes\n",number_vols);
X   printf("number of processes is %d\n", spawnno);
X   printf("IO type is %s %s %s %s\n", seqflag ? "seq" : "random",
X          (rwflag & 1) ? "reads":"",
X          (rwflag == 3) ? "and":"",
X          (rwflag & 2) ? "writes":"");
X   printf("file size is %d MB\n",max_file_seek/MEG);
X   printf("Initial transfer length = %lu bytes\n", startlength);
X   printf("Ending Transfer length will be %lu bytes\n", endlength);
X   printf("I/O processes terminate after %1.0f bytes are
transferred\n",max_bytes);
X   if (get_stats)
X      printf("Statistics capture enabled\n");
X   fflush(stdout);
X   length = startlength;
X   *Mean = 0.0;
X   *Highest = 0.0;
X   *Lowest = 9999999.0;
X   while(auto_inc)
X      {
X      gettimeofday(&time_s, &zone_s);
X
X      for (i = 0; i < spawnno; i++)
X         {
X         seed=rand();                           /* get a new seed word
for each act */
X         pid = fork();
X         if (!pid)
X            break;
X         else
X            {
X            pid_table[act_count]=pid;           /* save child pid */
X            act_count++;
X            }
X         }
X
X      if (!pid)
X         {
X         bytes_xfer=0;
X         srand(seed);                            /* seed random gen */
X         while(*Pbytes_xfer <= max_bytes)
X            {
X            drive = rand() % number_vols;
X            PItem = &Drive_Table[0] + drive;
X            handle = PItem->handle;
X
X            if (!(seqflag))            /* Random seek address
generation */
X               {
X               offset = ((abs((rand() * rand())) %
max_file_seek)/1024)*1024;
X               if (offset < stripesize)
X                  offset = stripesize;
X               }
X            else                       /* Sequential seek address
generation */
X               {
X               offset = Poffset[drive] += length;       /* inc to new
spot */
X               if (offset >= (max_file_seek - length))
X                  offset = Poffset[drive] = stripesize;
X               }
X
X            if (get_stats)
X               gettimeofday(&time_1, &zone_s);
X            if ((lseek(handle, (long)offset, SEEK_SET)!=offset))
X               printf("Seek error in activity %d to address %u handle
%d\n",
X                  act_count, offset, handle);
X
X            if (rwflag & 1)
X               {
X               result=read(handle, buff, length);
X               if (result!=length)
X                  {
X                  printf("Read error %d,%d in activity %d to address %d
of length %d fp=%d\n",
X                  result, errno, act_count, offset, length, handle);
X                  }
X               }
X            if (rwflag & 2)
X               {
X               if((write(handle, buff, length)!=length))
X                  {
X                  printf("Write error %d,%d in activity %d to address
%d of length %d fp=%d\n",
X                  result, errno, act_count, offset, length, handle);
X                  }
X               }
X            if (get_stats)
X               {
X               gettimeofday(&time_2, &zone_s);
X               *IOTime = diffutime(time_1, time_2);
X               if (*IOTime < *Lowest)
X                  *Lowest = *IOTime;
X               if (*IOTime > *Highest)
X                  *Highest = *IOTime;
X               *Mean += *IOTime;
X               }
X
X            (*Pbytes_xfer) += length;
X            (*Pios_done)++;
X            }
X         exit(0);
X         }
X      else
X         {
X         for (x = 0; x < act_count; x++)
X            {
X            waitpid(pid_table[x],&pid_status,0);
X            }
X
X         gettimeofday(&time_f, &zone_s);
X
X         printf("%5.2f MB per second for %d%s (%d IO's per second).\n",
X            (*Pbytes_xfer/(float)MEG) /
X               (diffutime(time_s, time_f)/1000000.0),
X            (length/1024) > 0 ? (length >= MEG) ? length/MEG :
length/1024 : length,
X            (length/1024) > 0 ? (length >= MEG) ? "MB\t" : "KB\t" :
"bytes",
X            (int)(*Pios_done / (diffutime(time_s, time_f)/1000000)));
X         if (get_stats)
X            {
X            *Mean /= *Pios_done;
X            printf("Slowest IO %1.2fms,  Quickest IO %1.2fms,  Mean
%1.2fms\n",
X               *Highest/1000.0, *Lowest/1000.0, *Mean/1000.0);
X            *Highest = *Mean = 0.0;
X            *Lowest = 9999999;
X            }
X         *Pbytes_xfer=*Pios_done=0;
X         }
X
X      fflush(stdout);
X      sleep(1);
X      act_count = 0;
X      length *= 2;
X      if (length > endlength)
X         {
X         auto_inc--;
X         length = startlength;
X         }
X      if (continous == TRUE)
X         auto_inc = 1;
X      }
X
X
X   for (j = 0; j < number_vols; j++)
X      close(Drive_Table[j].handle);
X   }
X
X
X/* The diffutime() returns the delta in microseconds between
X   the given start time and the given end time. */
X
Xdouble diffutime(struct timeval start, struct timeval finish)
X{
X   double secs, usecs;
X
X   secs = finish.tv_sec - start.tv_sec;
X   usecs = finish.tv_usec - start.tv_usec;
X
X   usecs += (secs * 1000000);
X   return usecs;
X}
X
X
SHAR_EOF
  : || $echo 'restore of' 'stkio.c' 'failed'
fi
# ============= stkio.txt ==============
if test -f 'stkio.txt' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'stkio.txt' '(file already exists)'
else
  $echo 'x -' extracting 'stkio.txt' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'stkio.txt' &&
X19 March 1997
XThis document is divided into the following six sections. 
X  Program Description
X  License Agreement
X  Installation Instructions
X  Compiling the Program
X  Running the Program
X  Program Output
X
XProgram Description
X
X  STKIO generates random or sequential I/O reference patterns over
X  a number of drives or files.  STKIO is designed to be used as a
X  benchmark for evaluating disk subsystems.  The program issues fixed
X  length I/Os for a specified number of bytes, defined as a phase.
X  When the phase is complete, the program reports statistics, doubles
X  the I/O size and continues until the maximum I/O size is reached.
X  This is defined as a pass.
X
X  STKIO is multi-threaded and can drive most disk subsystems to
X  saturation.  The program can issue I/O to either a file system or to
X  a raw device.  Caution must be used when testing in raw device mode,
X  as improper use may cause loss of data.
X
X  STKIO uses two gigabyte files.  If the program is run to a file
X  system and the program is issuing reads, the file must exist prior
X  to program execution.  If the file does not exist and the program
X  is issuing writes, the program creates the file as it is executing.
X  This causes unreliable results.  If the program is used to create
X  the file, the program should be run a second time against the newly
X  created file for more reliable results.
X
XLicense Agreement
X  NOTICE -- READ THIS BEFORE USING THE SOFTWARE 
X  
X  INSTALLING AND USING THE SOFTWARE ACCOMPANYING THIS LICENSE
X  INDICATES YOUR ACCEPTANCE OF THESE TERMS AND CONDITIONS. 
X  
X  READ ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE
X  AGREEMENT PRIOR TO INSTALLING OR USING THE SOFTWARE. IF YOU
X  DO NOT ACCEPT THESE TERMS, YOU MUST DELETE THE SOFTWARE FROM
X  YOUR HARDWARE. 
X  
X  LICENSE: This Software is licensed, not sold, to you.  
X  Subject to the terms of this agreement, you have a non-
X  exclusive and nontransferable right to use the Software for 
X  any purpose except for license, resale, rental or the like. 
X  You may not rent, lease, sell or otherwise transfer or 
X  distribute copies of the Software to others without the 
X  express written consent of StorageTek.  You agree to use 
X  your best efforts to prevent and protect the contents of the 
X  Software from unauthorized disclosure or use. StorageTek 
X  reserves all rights not expressly granted to you.  As 
X  consideration for this license, by using the Software you 
X  agree to provide StorageTek with a description of your test 
X  configuration and the test results.  The description and 
X  results may be sent by Email to Benchmarks@stortek.com .
X  
X  LIMITATION ON USE: You may not release the results of any 
X  performance or functional evaluation of  the Software to any 
X  third party without prior written approval of StorageTek for 
X  each such release.
X   
X  COPYRIGHT: The Software is copyrighted by StorageTek.  
X  StorageTek  retains all right, title and interest in and to 
X  the Software at all times, regardless of the form or media 
X  in or on which the original or other copies may subsequently 
X  exist. This license is not a sale or transfer of ownership 
X  of the original or any subsequent copy.
X  
X  TERM AND TERMINATION: This license is effective until 
X  terminated. You may terminate this license at any time by 
X  destroying the Software. This license automatically 
X  terminates if you fail to comply with its terms and 
X  conditions. You agree that, upon such termination, you will 
X  either destroy (or permanently erase) all copies of the 
X  Software or return the original Software to StorageTek, 
X  together with any other material you have received from 
X  StorageTek in connection with the Software. 
X  
X  DISCLAIMER OF WARRANTY: StorageTek AND ITS LICENSORS PROVIDE 
X  THE SOFTWARE AND ANY SERVICE OFFERED, SOLD OR OTHERWISE 
X  PROVIDED TO YOU AS A RESULT OF YOUR USE OF THE SOFTWARE, "AS 
X  IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED OR 
X  STATUTORY, INCLUDING BUT NOT LIMITED TO ANY IMPLIED 
X  WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT OR FITNESS 
X  FOR A PARTICULAR PURPOSE. StorageTek does not warrant that 
X  the Software is error-free, or that its operation will be 
X  uninterrupted.  Should the Software prove defective, you and 
X  not StorageTek assume the entire cost of any service and 
X  repair. This disclaimer of warranty constitutes an essential 
X  and material part of this agreement. 
X  
X  Some states do not allow the exclusion of implied 
X  warranties, so the above exclusion may not apply to you. 
X  This warranty gives you specific legal rights and you may 
X  also have other rights which vary from state to state. 
X  
X  LIMITATION OF REMEDIES: IN NO EVENT WILL StorageTek OR ITS 
X  LICENSORS BE LIABLE FOR ANY INDIRECT DAMAGES OR OTHER RELIEF 
X  ARISING OUT OF YOUR USE OR INABILITY TO USE THE SOFTWARE 
X  INCLUDING, BY WAY OF ILLUSTRATION AND NOT LIMITATION, LOST 
X  DATA, LOST PROFITS, LOST BUSINESS OR LOST OPPORTUNITY, OR 
X  ANY SPECIAL, INCIDENTAL OR CONSEQUENTIAL OR EXEMPLARY 
X  DAMAGES ARISING OUT OF SUCH USE OR INABILITY TO USE THE 
X  SOFTWARE, EVEN IF StorageTek, ITS LICENSORS OR AN AUTHORIZED 
X  StorageTek DEALER, DISTRIBUTOR OR SUPPLIER HAS BEEN ADVISED 
X  OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM AGAINST 
X  OR THROUGH YOU BY ANY OTHER PARTY. 
X  
X  Some states do not allow the exclusion or limitation of 
X  incidental or consequential damages so the above limitation 
X  or exclusion may not apply to you. 
X  
X  This license will be governed by the laws of the State of 
X  Colorado as applied to transactions taking place wholly 
X  within Colorado between Colorado residents. 
X  
X  EXPORT CONTROLS: The Software and the underlying information
X  and technology may not be downloaded or otherwise exported 
X  or reexported (i) into (or to a national or resident of) any 
X  country to which the U.S. has embargoed goods; or (ii) to 
X  anyone on the U.S. Treasury Department's list of Specially 
X  Designated Nationals or the U.S. Commerce Department's Table 
X  of Denial Orders; or in any other situation prohibited by 
X  U.S. law or regulation. By downloading or using the 
X  Software, you are agreeing to the foregoing and you 
X  represent and warrant that you are not located in, under the 
X  control of, or a national or resident of any such country or 
X  on any such list. 
X  
X  U.S. GOVERNMENT END USERS: The Software is a "commercial 
X  item," as that term is defined at 48 C.F.R. 2.101 (Oct. 
X  1995), consisting of "commercial computer software" and 
X  "commercial computer software documentation," as such terms 
X  are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 
X  48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 
X  (June 1995), all U.S. Government End Users acquire the 
X  Software with only those rights set forth herein.
X
XInstallation Instructions
X
X  On most UNIX systems the man pages are kept in the directory
X  /usr/share/man.  To install the stkio man page copy the file stkio.1
X  to the directory /usr/share/man/man1.  The page may then be
referenced
X  by entering the command "man stkio".
X
X  The source code is contained in the file stkio.c.  Copy this file
X  to a directory of your choosing and proceed to the next section on
X  compiling the program.
X
X  There are executable versions of stkio for Sun, RS6000, and HP
included
X  in the tar file.  These files are named stkio.sun, stkio.aix, and
X  stkio.hp.  If you are using one of the precompiled versions you need
X  to rename the program prior to execution.  Use the UNIX mv command
X  to rename the program.
X
X  For example
X    mv stkio.sun stkio
X
XCompiling the Program
X
X  Immediately following the license agreement in the source code are
X  several #define statements that resemble the following:
X  
X  /* Add or set Defines here according to the target host */
X  
X  #undef  DEC  /* compile statement cc -O4 s....
X  #define SUN  /* compile statement cc -O -o....
X  #undef  SGI  /* compile statement cc -o ....
X  #undef  AIX  /* compile statement cc -O ....
X  #undef  HPUX /* compile statement cc -Aa ....
X  #undef  CRAY /* compile statement cc -O ....
X  #undef  ATT  /* compile statement cc -O ....
X  
X  These have been set up to facilitate compilation on various host
X  platforms.  Select your platform from the list, change the tag from
X  #undef to #define, and ensure all other platforms are set to #undef.
X  The example above shows the proper setting for compilation of a
X  SUN platform.  If your host platform is not listed, you may start by
X  trying one of the listed host types, correcting any errors that occur
X  during compilation.  If you add a host type to the list please email
X  your changes to benchmarks@stortek.com and we will incorporate your
X  changes in the master version of the program.
X
X  The following compile statements work on the platforms specified.
X  The compile statements begin with the cc command.
X
X    DEC    cc -O4 stkio.c -o stkio  -lm
X    SUN    cc -O -o stkio stkio.c  -lm
X    SGI    cc -o stkio stkio.c -O3 -lm
X    AIX    cc -O stkio.c -o stkio  -lm
X    HPUX   cc -Aa stkio.c -o stkio -O -lm
X    CRAY   cc -O stkio.c -o stkio -lm
X    ATT    cc -O stkio.c -o stkio -O -lm
X
XRunning the Program
X
X  stkio {-fvolume_name | -Ffile_name | -v} 
X     -bmax_bytes_transferred [-tnumber_tasks]
X     [-ooffset][-lstart_length_of_io] [-eend_length_of_io]
X     [-mmaximum_seek_address] [-Lloop_count] [-r] [-w] [-s]
X     [-c] [-S]
X
XOptions
X
X  -b   Indicates number of megabytes to transfer per phase.
X       This parameter is used to terminate a phase of the programs
X       execution.  The phase terminates when -b megabytes have been
X       transferred.  To insure the program produces accurate sustained
X       performance results, the value used with the -b option should
X       be greater than the sum of the cache in the disk system and any
X       cache the host computer system provides.
X  
X  -c   Use of this option causes the program to run continuous passes.
X  
X  -e   Indicates the largest I/O size issued.  When the I/O size
exceeds
X       this value, the pass is terminated.  When running in raw device
X       mode, the transfer length must be an integral of the minimum
X       transfer length supported by the device.  In most cases this is
X       512 bytes.
X
X  -F   Indicates a file that contains the list of devices, or files,
used.
X       The program issues I/O to these devices/files in a random order
X       independent of the reference pattern specified.  A maximum of
X       256 devices/files can be entered.
X
X  -f   Single device/file to use.  This option may be used in
conjunction
X       with the -F or -v options.
X
X  -L   This option allows the user to specify a number of passes.
X
X  -l   Indicates the starting transfer length in bytes.  Transfer
lengths
X       are doubled until the -e parameter or 2 megabytes is exceeded.
X       When running in raw device mode, the transfer length must be an
X       integral of the minimum transfer length supported by the device.
X       In most cases this is 512 bytes.
X
X  -m   Used to control the maximum seek address STKIO uses during
program
X       execution.  The value is specified in megabytes.  For example if
X       the parameter -m10 is used, STKIO uses a 10 megabyte file size.
X       The default maximum seek address is two gigabytes.
X
X  -o   Offset.  This is the lowest byte address the program references
X       during execution.  For example if -o65536 is used, the program
is
X       prevented from reading or writing to addresses less than 65536.
X       This may preserve label/superblock information when running to
X       a raw device.
X
X  -r   Perform reads.  This parameter may be omitted, it is the
default.
X       To perform writes use the -w parameter.  If both -r and -w are
X       used the program alternates reads and writes.
X
X  -S   Produces I/O statistics after each phase is complete.  The
program
X       reports Slowest, Quickest and Mean response times for the
X       I/Os issued.
X
X  -s   Perform sequential I/O.  When running in multi-threaded mode,
X       STKIO does not create multiple sequential streams.  STKIO
controls
X       the seek location of each thread to maintain a single sequential
X       stream per device.  If this parameter is omitted random I/O
X       is performed.
X
X  -t   Number of threads, or processes, per run.  The value specified
X       here is used to control the number of I/O processes.  The
default
X       is one.
X
X  -v   Causes the program to prompt for additional devices/files.
X       The program continues to ask for devices/files until the user
X       enters the string "done".  A maximum of 256 devices/files can
X       be entered.
X
X  -w   Perform writes.  This option may be used in conjunction with the
X       -r option.  If it is omitted, reads are performed.
X
XEXAMPLES
X
X Example 1
X   STKIO -f/dev/rdisk0 -r -t10 -b100 -l4096 -e65536
X
X   This command causes STKIO to issue random reads to the raw device
X   /dev/rhdisk0.  The program reads 100 megabytes of data per phase.
X   For the first phase, the request size is 4096 bytes.  The second
phase
X   issues 8192 byte reads and so on until the program completes the
65536
X   I/O size.  Each phase has 10 processes issuing I/O to the device.
X
X Example 2
X   STKIO -Ffile_list -s -w -t15 -b200 -l4096 -e524288
X
X   This command causes STKIO to issue sequential writes to the list
X   of files/devices contained in the file "file_list".  The program
X   writes a total of 200 megabytes of data per phase.  The -b option
X   is not used on a per file/device basis.  For the first phase,
X   the request size is 4096 bytes.  The second phase issues 8192 byte
X   reads and so on until the program completes the 524288 I/O size.
X   Each phase has 15 processes issuing I/O to the device.  file_list
has
X   the following format:
X
X
X   /dev/rdsk/c1t2d0s6
X   /dev/rdsk/c1t2d1s6
X   .
X   .
X   .
X   /dev/rdsk/c1t2dns6
X   done
X
X   The file consists of a list of file/devices to issue I/O to.
X   The list is terminated by the string "done".
X
X
XProgram Output
X
X  Run for 1 loops to 1 files/volumes
X  number of processes is 20
X  IO type is random reads 
X  Initial transfer length = 512 bytes
X  Ending Transfer length will be 2097152 bytes
X  I/O processes terminate after 5242880 bytes are transferred
X 
X  0.23 MB per second for 512bytes (224 IO's per second).
X  0.46 MB per second for 1KB (222 IO's per second).
X  0.87 MB per second for 2KB (208 IO's per second).
X  1.56 MB per second for 4KB (189 IO's per second).
X  2.51 MB per second for 8KB (155 IO's per second).
X  3.51 MB per second for 16KB (111 IO's per second).
X  4.21 MB per second for 32KB (70 IO's per second).
X  4.63 MB per second for 64KB (42 IO's per second).
X  5.21 MB per second for 128KB (26 IO's per second).
X  5.52 MB per second for 256KB (10 IO's per second).
X  5.67 MB per second for 512KB (7 IO's per second).
X  5.54 MB per second for 1MB (3 IO's per second).
X  5.24 MB per second for 2MB (1 IO's per second).
SHAR_EOF
  : || $echo 'restore of' 'stkio.txt' 'failed'
fi
rm -fr _sh16677
exit 0
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Feb 11 09:55:20 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:34 EST