xref: /onnv-gate/usr/src/cmd/filebench/workloads/randomwrite.f (revision 9801:4a9784073e11)
15184Sek110237#
25184Sek110237# CDDL HEADER START
35184Sek110237#
45184Sek110237# The contents of this file are subject to the terms of the
55184Sek110237# Common Development and Distribution License (the "License").
65184Sek110237# You may not use this file except in compliance with the License.
75184Sek110237#
85184Sek110237# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95184Sek110237# or http://www.opensolaris.org/os/licensing.
105184Sek110237# See the License for the specific language governing permissions
115184Sek110237# and limitations under the License.
125184Sek110237#
135184Sek110237# When distributing Covered Code, include this CDDL HEADER in each
145184Sek110237# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155184Sek110237# If applicable, add the following below this CDDL HEADER, with the
165184Sek110237# fields enclosed by brackets "[]" replaced with your own identifying
175184Sek110237# information: Portions Copyright [yyyy] [name of copyright owner]
185184Sek110237#
195184Sek110237# CDDL HEADER END
205184Sek110237#
215184Sek110237#
22*9801SAndrew.W.Wilson@sun.com# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
235184Sek110237# Use is subject to license terms.
245184Sek110237#
25*9801SAndrew.W.Wilson@sun.com# $dir - directory for datafiles
26*9801SAndrew.W.Wilson@sun.com# $eventrate - event generator rate (0 == free run)
27*9801SAndrew.W.Wilson@sun.com# $filesize - size of data file
28*9801SAndrew.W.Wilson@sun.com# $iosize - size of each I/O request
29*9801SAndrew.W.Wilson@sun.com# $nthreads - number of worker threads
305184Sek110237
315184Sek110237set $dir=/tmp
32*9801SAndrew.W.Wilson@sun.comset $eventrate=0
33*9801SAndrew.W.Wilson@sun.comset $filesize=1m
345184Sek110237set $iosize=8k
35*9801SAndrew.W.Wilson@sun.comset $nthreads=1
365184Sek110237set $workingset=0
375184Sek110237set $directio=0
385184Sek110237
39*9801SAndrew.W.Wilson@sun.comeventgen rate=$eventrate
40*9801SAndrew.W.Wilson@sun.com
415184Sek110237define file name=largefile1,path=$dir,size=$filesize,prealloc,reuse,paralloc
425184Sek110237
435184Sek110237define process name=rand-write,instances=1
445184Sek110237{
455184Sek110237  thread name=rand-thread,memsize=5m,instances=$nthreads
465184Sek110237  {
475184Sek110237    flowop write name=rand-write1,filename=largefile1,iosize=$iosize,random,workingset=$workingset,directio=$directio
485184Sek110237    flowop eventlimit name=rand-rate
495184Sek110237  }
505184Sek110237}
515184Sek110237
52*9801SAndrew.W.Wilson@sun.comecho "Random Write Version 2.1 IO personality successfully loaded"
53*9801SAndrew.W.Wilson@sun.comusage "Usage: set \$dir=<dir>         defaults to $dir"
54*9801SAndrew.W.Wilson@sun.comusage "       set \$eventrate=<value> defaults to $eventrate"
555184Sek110237usage "       set \$filesize=<size>   defaults to $filesize"
565184Sek110237usage "       set \$iosize=<value>    defaults to $iosize"
575184Sek110237usage "       set \$nthreads=<value>  defaults to $nthreads"
585184Sek110237usage "       set \$workingset=<value>  defaults to $workingset"
595184Sek110237usage "       set \$directio=<bool>   defaults to $directio"
605184Sek110237usage "       run runtime (e.g. run 60)"
61