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