1*9801SAndrew.W.Wilson@sun.com# 2*9801SAndrew.W.Wilson@sun.com# CDDL HEADER START 3*9801SAndrew.W.Wilson@sun.com# 4*9801SAndrew.W.Wilson@sun.com# The contents of this file are subject to the terms of the 5*9801SAndrew.W.Wilson@sun.com# Common Development and Distribution License (the "License"). 6*9801SAndrew.W.Wilson@sun.com# You may not use this file except in compliance with the License. 7*9801SAndrew.W.Wilson@sun.com# 8*9801SAndrew.W.Wilson@sun.com# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*9801SAndrew.W.Wilson@sun.com# or http://www.opensolaris.org/os/licensing. 10*9801SAndrew.W.Wilson@sun.com# See the License for the specific language governing permissions 11*9801SAndrew.W.Wilson@sun.com# and limitations under the License. 12*9801SAndrew.W.Wilson@sun.com# 13*9801SAndrew.W.Wilson@sun.com# When distributing Covered Code, include this CDDL HEADER in each 14*9801SAndrew.W.Wilson@sun.com# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*9801SAndrew.W.Wilson@sun.com# If applicable, add the following below this CDDL HEADER, with the 16*9801SAndrew.W.Wilson@sun.com# fields enclosed by brackets "[]" replaced with your own identifying 17*9801SAndrew.W.Wilson@sun.com# information: Portions Copyright [yyyy] [name of copyright owner] 18*9801SAndrew.W.Wilson@sun.com# 19*9801SAndrew.W.Wilson@sun.com# CDDL HEADER END 20*9801SAndrew.W.Wilson@sun.com# 21*9801SAndrew.W.Wilson@sun.com# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 22*9801SAndrew.W.Wilson@sun.com# Use is subject to license terms. 23*9801SAndrew.W.Wilson@sun.com# 24*9801SAndrew.W.Wilson@sun.com# $dir - directory for datafiles 25*9801SAndrew.W.Wilson@sun.com# $eventrate - event generator rate (0 == free run) 26*9801SAndrew.W.Wilson@sun.com# $nfiles - number of data files 27*9801SAndrew.W.Wilson@sun.com# $nthreads - number of worker threads 28*9801SAndrew.W.Wilson@sun.com 29*9801SAndrew.W.Wilson@sun.comset $dir=/tmp 30*9801SAndrew.W.Wilson@sun.comset $cached=false 31*9801SAndrew.W.Wilson@sun.comset $eventrate=10 32*9801SAndrew.W.Wilson@sun.comset $meandirwidth=20 33*9801SAndrew.W.Wilson@sun.comset $nthreads=1 34*9801SAndrew.W.Wilson@sun.comset $nfiles=10000 35*9801SAndrew.W.Wilson@sun.comset $sync=false 36*9801SAndrew.W.Wilson@sun.comset $totalfiles=$nfiles * $eventrate 37*9801SAndrew.W.Wilson@sun.com 38*9801SAndrew.W.Wilson@sun.comeventgen rate=$eventrate 39*9801SAndrew.W.Wilson@sun.com 40*9801SAndrew.W.Wilson@sun.comdefine randvar name=$wrtiosize, type=tabular, min=1k, round=1k, randtable = 41*9801SAndrew.W.Wilson@sun.com{{ 0, 1k, 7k}, 42*9801SAndrew.W.Wilson@sun.com {50, 9k, 15k}, 43*9801SAndrew.W.Wilson@sun.com {14, 17k, 23k}, 44*9801SAndrew.W.Wilson@sun.com {14, 33k, 39k}, 45*9801SAndrew.W.Wilson@sun.com {12, 65k, 71k}, 46*9801SAndrew.W.Wilson@sun.com {10, 129k, 135k} 47*9801SAndrew.W.Wilson@sun.com} 48*9801SAndrew.W.Wilson@sun.com 49*9801SAndrew.W.Wilson@sun.comdefine randvar name=$rdiosize, type=tabular, min=8k, round=1k, randtable = 50*9801SAndrew.W.Wilson@sun.com{{85, 8k, 8k}, 51*9801SAndrew.W.Wilson@sun.com { 8, 17k, 23k}, 52*9801SAndrew.W.Wilson@sun.com { 4, 33k, 39k}, 53*9801SAndrew.W.Wilson@sun.com { 2, 65k, 71k}, 54*9801SAndrew.W.Wilson@sun.com { 1, 129k, 135k} 55*9801SAndrew.W.Wilson@sun.com} 56*9801SAndrew.W.Wilson@sun.com 57*9801SAndrew.W.Wilson@sun.comdefine randvar name=$filesize, type=tabular, min=1k, round=1k, randtable = 58*9801SAndrew.W.Wilson@sun.com{{33, 1k, 1k}, 59*9801SAndrew.W.Wilson@sun.com {21, 1k, 3k}, 60*9801SAndrew.W.Wilson@sun.com {13, 3k, 5k}, 61*9801SAndrew.W.Wilson@sun.com {10, 5k, 11k}, 62*9801SAndrew.W.Wilson@sun.com {08, 11k, 21k}, 63*9801SAndrew.W.Wilson@sun.com {05, 21k, 43k}, 64*9801SAndrew.W.Wilson@sun.com {04, 43k, 85k}, 65*9801SAndrew.W.Wilson@sun.com {03, 85k, 171k}, 66*9801SAndrew.W.Wilson@sun.com {02, 171k, 341k}, 67*9801SAndrew.W.Wilson@sun.com {01, 341k, 1707k} 68*9801SAndrew.W.Wilson@sun.com} 69*9801SAndrew.W.Wilson@sun.com 70*9801SAndrew.W.Wilson@sun.comdefine randvar name=$fileidx, type=gamma, min=0, gamma=100 71*9801SAndrew.W.Wilson@sun.com 72*9801SAndrew.W.Wilson@sun.comdefine fileset name=bigfileset,path=$dir,size=$filesize,entries=$totalfiles,dirwidth=$meandirwidth,prealloc=60,cached=$cached 73*9801SAndrew.W.Wilson@sun.com 74*9801SAndrew.W.Wilson@sun.comdefine flowop name=rmw, $filesetrmw 75*9801SAndrew.W.Wilson@sun.com{ 76*9801SAndrew.W.Wilson@sun.com flowop openfile name=openfile1,filesetname=$filesetrmw,indexed=$fileidx,fd=1 77*9801SAndrew.W.Wilson@sun.com flowop readwholefile name=readfile1,iosize=$rdiosize,fd=1 78*9801SAndrew.W.Wilson@sun.com flowop createfile name=newfile2,filesetname=$filesetrmw,indexed=$fileidx,fd=2 79*9801SAndrew.W.Wilson@sun.com flowop writewholefile name=writefile2,fd=2,iosize=$wrtiosize,srcfd=1 80*9801SAndrew.W.Wilson@sun.com flowop closefile name=closefile1,fd=1 81*9801SAndrew.W.Wilson@sun.com flowop closefile name=closefile2,fd=2 82*9801SAndrew.W.Wilson@sun.com flowop deletefile name=deletefile1,fd=1 83*9801SAndrew.W.Wilson@sun.com} 84*9801SAndrew.W.Wilson@sun.com 85*9801SAndrew.W.Wilson@sun.comdefine flowop name=launch, $filesetlch 86*9801SAndrew.W.Wilson@sun.com{ 87*9801SAndrew.W.Wilson@sun.com flowop openfile name=openfile3,filesetname=$filesetlch,indexed=$fileidx,fd=3 88*9801SAndrew.W.Wilson@sun.com flowop readwholefile name=readfile3,iosize=$rdiosize,fd=3 89*9801SAndrew.W.Wilson@sun.com flowop openfile name=openfile4,filesetname=$filesetlch,indexed=$fileidx,fd=4 90*9801SAndrew.W.Wilson@sun.com flowop readwholefile name=readfile4,iosize=$rdiosize,fd=4 91*9801SAndrew.W.Wilson@sun.com flowop closefile name=closefile3,fd=3 92*9801SAndrew.W.Wilson@sun.com flowop openfile name=openfile5,filesetname=$filesetlch,indexed=$fileidx,fd=5 93*9801SAndrew.W.Wilson@sun.com flowop readwholefile name=readfile5,iosize=$rdiosize,fd=5 94*9801SAndrew.W.Wilson@sun.com flowop closefile name=closefile4,fd=4 95*9801SAndrew.W.Wilson@sun.com flowop closefile name=closefile5,fd=5 96*9801SAndrew.W.Wilson@sun.com} 97*9801SAndrew.W.Wilson@sun.com 98*9801SAndrew.W.Wilson@sun.comdefine flowop name=appnd, $filesetapd 99*9801SAndrew.W.Wilson@sun.com{ 100*9801SAndrew.W.Wilson@sun.com flowop openfile name=openfile6,filesetname=$filesetapd,indexed=$fileidx,fd=6 101*9801SAndrew.W.Wilson@sun.com flowop appendfilerand name=appendfilerand6,iosize=$wrtiosize,fd=6 102*9801SAndrew.W.Wilson@sun.com flowop closefile name=closefile6,fd=6 103*9801SAndrew.W.Wilson@sun.com} 104*9801SAndrew.W.Wilson@sun.com 105*9801SAndrew.W.Wilson@sun.comdefine process name=netclient,instances=1 106*9801SAndrew.W.Wilson@sun.com{ 107*9801SAndrew.W.Wilson@sun.com thread name=fileuser,memsize=10m,instances=$nthreads 108*9801SAndrew.W.Wilson@sun.com { 109*9801SAndrew.W.Wilson@sun.com flowop launch name=launch1, iters=1, $filesetlch=bigfileset 110*9801SAndrew.W.Wilson@sun.com flowop rmw name=rmw1, iters=6, $filesetrmw=bigfileset 111*9801SAndrew.W.Wilson@sun.com flowop appnd name=appnd1, iters=3, $filesetapd=bigfileset 112*9801SAndrew.W.Wilson@sun.com flowop statfile name=statfile1,filesetname=bigfileset,indexed=$fileidx 113*9801SAndrew.W.Wilson@sun.com flowop eventlimit name=ratecontrol 114*9801SAndrew.W.Wilson@sun.com } 115*9801SAndrew.W.Wilson@sun.com} 116*9801SAndrew.W.Wilson@sun.com 117*9801SAndrew.W.Wilson@sun.comecho "NetworkFileServer Version 1.0 personality successfully loaded" 118*9801SAndrew.W.Wilson@sun.comusage "Usage: set \$dir=<dir> defaults to $dir" 119*9801SAndrew.W.Wilson@sun.comusage " set \$cached=<bool> defaults to $cached" 120*9801SAndrew.W.Wilson@sun.comusage " set \$eventrate=<value> defaults to $eventrate" 121*9801SAndrew.W.Wilson@sun.comusage " set \$wrtiosize.type=<type> defaults to $wrtiosize.type" 122*9801SAndrew.W.Wilson@sun.comusage " set \$wrtiosize.randsrc=<src> defaults to $wrtiosize.randsrc" 123*9801SAndrew.W.Wilson@sun.comusage " set \$rdiosize.type=<type> defaults to $rdiosize.type" 124*9801SAndrew.W.Wilson@sun.comusage " set \$rdiosize.randsrc=<src> defaults to $rdiosize.randsrc" 125*9801SAndrew.W.Wilson@sun.comusage " set \$filesize.type=<type> defaults to $filesize.type" 126*9801SAndrew.W.Wilson@sun.comusage " set \$filesize.randsrc=<src> defaults to $filesize.randsrc" 127*9801SAndrew.W.Wilson@sun.comusage " set \$nfiles=<value> defaults to $nfiles" 128*9801SAndrew.W.Wilson@sun.comusage " set \$nthreads=<value> defaults to $nthreads" 129*9801SAndrew.W.Wilson@sun.comusage " set \$sync=<bool> defaults to $sync" 130*9801SAndrew.W.Wilson@sun.comusage " " 131*9801SAndrew.W.Wilson@sun.comusage " run runtime (e.g. run 60)" 132