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 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 22 # Use is subject to license terms. 23 # 24 # Exercises the indexed attribute of the fileset_pick() function. 25 # 26 27 set $dir=/tmp 28 set $cached=false 29 set $meandirwidth=20 30 set $nthreads=5 31 set $nfiles=10000 32 set $sync=false 33 34 define randvar name=$wrtiosize, min=512, round=512, type=gamma, mean=16k 35 36 define randvar name=$rdiosize, type=tabular, min=8k, round=1k, randtable = 37 {{85, 8k, 8k}, 38 {15, 8k, 64k} 39 } 40 41 define randvar name=$filesize, type=tabular, min=1k, randtable = 42 {{33, 1k, 1k}, 43 {21, 1k, 3k}, 44 {13, 3k, 5k}, 45 {10, 5k, 11k}, 46 {08, 11k, 21k}, 47 {05, 21k, 43k}, 48 {04, 43k, 85k}, 49 {03, 85k, 171k}, 50 {02, 171k, 341k}, 51 {01, 341k, 1707k} 52 } 53 54 define randvar name=$fileidx, type=gamma, min=0, gamma=100 55 56 define fileset name=bigfileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=100,cached=$cached 57 58 define process name=netclient,instances=1 59 { 60 thread name=fileuser,memsize=10m,instances=$nthreads 61 { 62 flowop openfile name=openfile1,filesetname=bigfileset,indexed=$fileidx,fd=1 63 flowop openfile name=openfile2,filesetname=bigfileset,indexed=$fileidx,fd=2 64 flowop openfile name=openfile3,filesetname=bigfileset,indexed=$fileidx,fd=3 65 flowop appendfilerand name=appendfilerand1,iosize=$wrtiosize,fd=1 66 flowop closefile name=closefile1,fd=1 67 flowop readwholefile name=readfile1,iosize=$rdiosize,fd=2 68 flowop readwholefile name=readfile2,iosize=$rdiosize,fd=3 69 flowop closefile name=closefile2,fd=2 70 flowop closefile name=closefile3,fd=3 71 } 72 } 73 74 echo "NetworkServer Version 1.1 personality successfully loaded" 75 usage "Usage: set \$dir=<dir> defaults to $dir" 76 usage " set \$cached=<bool> defaults to $cached" 77 usage " set \$wrtiosize.type=<type> defaults to $wrtiosize.type" 78 usage " set \$wrtiosize.randsrc=<src> defaults to $wrtiosize.randsrc" 79 usage " set \$wrtiosize.mean=<mean> defaults to $wrtiosize.mean" 80 usage " set \$wrtiosize.gamma=<gamma> defaults to $wrtiosize.gamma" 81 usage " set \$rdiosize.type=<type> defaults to $rdiosize.type" 82 usage " set \$rdiosize.randsrc=<src> defaults to $rdiosize.randsrc" 83 usage " set \$filesize.type=<type> defaults to $filesize.type" 84 usage " set \$filesize.randsrc=<src> defaults to $filesize.randsrc" 85 usage " set \$nfiles=<value> defaults to $nfiles" 86 usage " set \$nthreads=<value> defaults to $nthreads" 87 usage " set \$sync=<bool> defaults to $sync" 88 usage " " 89 usage " run runtime (e.g. run 60)"