1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 # 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 25 set $dir=/tmp 26 set $nfiles=700 27 set $meandirwidth=20 28 set $filesize=128k 29 set $nthreads=10 30 set $meaniosize=16k 31 32 define fileset name=bigfileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=80, paralloc 33 34 define fileset name=u2fileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=80, paralloc 35 36 define fileset name=u3fileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=80, paralloc 37 38 define flowop name=readwrite, $fileset 39 { 40 flowop openfile name=openfile4,filesetname=$fileset,fd=1 41 flowop openfile name=openfile5,filesetname=$fileset,fd=2 42 flowop readwholefile name=readfile1,fd=1 43 flowop writewholefile name=writefile1,fd=2,srcfd=1 44 flowop closefile name=closefile4,fd=1 45 flowop closefile name=closefile5,fd=2 46 } 47 48 define flowop name=dowork, $filesetnm, $rwiters 49 { 50 flowop createfile name=createfile1,filesetname=$filesetnm,fd=1 51 flowop appendfilerand name=appendfilerand1,iosize=$meaniosize,fd=1 52 flowop closefile name=closefile1,fd=1 53 flowop readwrite name=rw1, iters=$rwiters, $fileset=$filesetnm 54 flowop deletefile name=deletefile1,filesetname=$filesetnm 55 flowop statfile name=statfile1,filesetname=$filesetnm 56 } 57 58 define process name=filereader1,instances=1 59 { 60 thread name=user1,memsize=10m,instances=$nthreads 61 { 62 flowop dowork name=dowork1, iters=1, $rwiters=5, $filesetnm=bigfileset 63 } 64 65 thread name=user2,memsize=10m,instances=$nthreads 66 { 67 flowop dowork name=dowork2, iters=1, $rwiters=4, $filesetnm=u2fileset 68 } 69 70 thread name=user3,memsize=10m,instances=$nthreads 71 { 72 flowop dowork name=dowork3, iters=1, $rwiters=3, $filesetnm=u3fileset 73 } 74 } 75 76 echo "CompFlow_Demo Version 1.1 personality successfully loaded" 77 usage "Usage: set \$dir=<dir> defaults to $dir" 78 usage " set \$filesize=<size> defaults to $filesize" 79 usage " set \$nfiles=<value> defaults to $nfiles" 80 usage " set \$nthreads=<value> defaults to $nthreads" 81 usage " set \$meaniosize=<value> defaults to $meaniosize" 82 usage " set \$meandirwidth=<size> defaults to $meandirwidth" 83 usage "(sets mean dir width and dir depth is calculated as log (width, nfiles)" 84 usage " " 85 usage " run runtime (e.g. run 60)"