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# 226305Saw148015# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 235184Sek110237# Use is subject to license terms. 245184Sek110237# 255184Sek110237 265184Sek110237set $dir=/tmp 27*8404SAndrew.W.Wilson@sun.comset $nfiles=10000 285184Sek110237set $meandirwidth=20 295184Sek110237set $filesize=128k 30*8404SAndrew.W.Wilson@sun.comset $nthreads=50 315184Sek110237set $meaniosize=16k 326305Saw148015set $fixediosize=1m 335184Sek110237 346305Saw148015define fileset name=bigfileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=80 355184Sek110237 365184Sek110237define process name=filereader,instances=1 375184Sek110237{ 385184Sek110237 thread name=filereaderthread,memsize=10m,instances=$nthreads 395184Sek110237 { 406305Saw148015 flowop createfile name=createfile1,filesetname=bigfileset,fd=1 416305Saw148015 flowop writewholefile name=wrtfile1,srcfd=1,fd=1,iosize=$fixediosize 426305Saw148015 flowop closefile name=closefile1,fd=1 435184Sek110237 flowop openfile name=openfile1,filesetname=bigfileset,fd=1 445184Sek110237 flowop appendfilerand name=appendfilerand1,iosize=$meaniosize,fd=1 456305Saw148015 flowop closefile name=closefile2,fd=1 465184Sek110237 flowop openfile name=openfile2,filesetname=bigfileset,fd=1 476305Saw148015 flowop readwholefile name=readfile1,fd=1,iosize=$fixediosize 486305Saw148015 flowop closefile name=closefile3,fd=1 495184Sek110237 flowop deletefile name=deletefile1,filesetname=bigfileset 505184Sek110237 flowop statfile name=statfile1,filesetname=bigfileset 515184Sek110237 } 525184Sek110237} 535184Sek110237 546305Saw148015echo "FileServer Version 2.2 personality successfully loaded" 555184Sek110237usage "Usage: set \$dir=<dir>" 566305Saw148015usage " set \$filesize=<size> defaults to $filesize" 576305Saw148015usage " set \$nfiles=<value> defaults to $nfiles" 586305Saw148015usage " set \$nthreads=<value> defaults to $nthreads" 596305Saw148015usage " set \$meaniosize=<value> defaults to $meaniosize" 606305Saw148015usage " set \$fixediosize=<size> defaults to $fixediosize" 615184Sek110237usage " set \$meandirwidth=<size> defaults to $meandirwidth" 625184Sek110237usage "(sets mean dir width and dir depth is calculated as log (width, nfiles)" 635184Sek110237usage " " 645184Sek110237usage " run runtime (e.g. run 60)" 65