xref: /onnv-gate/usr/src/cmd/filebench/workloads/compflow_demo.f (revision 8404:b96b8ad1c3e9)
16550Saw148015#
26550Saw148015# CDDL HEADER START
36550Saw148015#
46550Saw148015# The contents of this file are subject to the terms of the
56550Saw148015# Common Development and Distribution License (the "License").
66550Saw148015# You may not use this file except in compliance with the License.
76550Saw148015#
86550Saw148015# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96550Saw148015# or http://www.opensolaris.org/os/licensing.
106550Saw148015# See the License for the specific language governing permissions
116550Saw148015# and limitations under the License.
126550Saw148015#
136550Saw148015# When distributing Covered Code, include this CDDL HEADER in each
146550Saw148015# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156550Saw148015# If applicable, add the following below this CDDL HEADER, with the
166550Saw148015# fields enclosed by brackets "[]" replaced with your own identifying
176550Saw148015# information: Portions Copyright [yyyy] [name of copyright owner]
186550Saw148015#
196550Saw148015# CDDL HEADER END
206550Saw148015#
216550Saw148015#
226550Saw148015# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
236550Saw148015# Use is subject to license terms.
246550Saw148015
256550Saw148015set $dir=/tmp
266550Saw148015set $nfiles=700
276550Saw148015set $meandirwidth=20
286550Saw148015set $filesize=128k
296550Saw148015set $nthreads=10
306550Saw148015set $meaniosize=16k
316550Saw148015
32*8404SAndrew.W.Wilson@sun.comdefine fileset name=bigfileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=80, paralloc
336550Saw148015
34*8404SAndrew.W.Wilson@sun.comdefine fileset name=u2fileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=80, paralloc
356550Saw148015
36*8404SAndrew.W.Wilson@sun.comdefine fileset name=u3fileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=80, paralloc
376550Saw148015
386550Saw148015define flowop name=readwrite, $fileset
396550Saw148015{
406550Saw148015  flowop openfile name=openfile4,filesetname=$fileset,fd=1
416550Saw148015  flowop openfile name=openfile5,filesetname=$fileset,fd=2
426550Saw148015  flowop readwholefile name=readfile1,fd=1
436550Saw148015  flowop writewholefile name=writefile1,fd=2,srcfd=1
446550Saw148015  flowop closefile name=closefile4,fd=1
456550Saw148015  flowop closefile name=closefile5,fd=2
466550Saw148015}
476550Saw148015
486550Saw148015define flowop name=dowork, $filesetnm, $rwiters
496550Saw148015{
506550Saw148015  flowop createfile name=createfile1,filesetname=$filesetnm,fd=1
516550Saw148015  flowop appendfilerand name=appendfilerand1,iosize=$meaniosize,fd=1
526550Saw148015  flowop closefile name=closefile1,fd=1
536550Saw148015  flowop readwrite name=rw1, iters=$rwiters, $fileset=$filesetnm
546550Saw148015  flowop deletefile name=deletefile1,filesetname=$filesetnm
556550Saw148015  flowop statfile name=statfile1,filesetname=$filesetnm
566550Saw148015}
576550Saw148015
586550Saw148015define process name=filereader1,instances=1
596550Saw148015{
60*8404SAndrew.W.Wilson@sun.com  thread name=user1,memsize=10m,instances=$nthreads
616550Saw148015  {
62*8404SAndrew.W.Wilson@sun.com    flowop dowork name=dowork1, iters=1, $rwiters=5, $filesetnm=bigfileset
636550Saw148015  }
646550Saw148015
65*8404SAndrew.W.Wilson@sun.com  thread name=user2,memsize=10m,instances=$nthreads
666550Saw148015  {
67*8404SAndrew.W.Wilson@sun.com    flowop dowork name=dowork2, iters=1, $rwiters=4, $filesetnm=u2fileset
686550Saw148015  }
696550Saw148015
70*8404SAndrew.W.Wilson@sun.com  thread name=user3,memsize=10m,instances=$nthreads
716550Saw148015  {
72*8404SAndrew.W.Wilson@sun.com    flowop dowork name=dowork3, iters=1, $rwiters=3, $filesetnm=u3fileset
736550Saw148015  }
746550Saw148015}
756550Saw148015
766550Saw148015echo  "CompFlow_Demo Version 1.1 personality successfully loaded"
776550Saw148015usage "Usage: set \$dir=<dir>          defaults to $dir"
786550Saw148015usage "       set \$filesize=<size>    defaults to $filesize"
796550Saw148015usage "       set \$nfiles=<value>     defaults to $nfiles"
806550Saw148015usage "       set \$nthreads=<value>   defaults to $nthreads"
816550Saw148015usage "       set \$meaniosize=<value> defaults to $meaniosize"
826550Saw148015usage "       set \$meandirwidth=<size> defaults to $meandirwidth"
836550Saw148015usage "(sets mean dir width and dir depth is calculated as log (width, nfiles)"
846550Saw148015usage " "
856550Saw148015usage "       run runtime (e.g. run 60)"
86