16212Saw148015# 26212Saw148015# CDDL HEADER START 36212Saw148015# 46212Saw148015# The contents of this file are subject to the terms of the 56212Saw148015# Common Development and Distribution License (the "License"). 66212Saw148015# You may not use this file except in compliance with the License. 76212Saw148015# 86212Saw148015# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 96212Saw148015# or http://www.opensolaris.org/os/licensing. 106212Saw148015# See the License for the specific language governing permissions 116212Saw148015# and limitations under the License. 126212Saw148015# 136212Saw148015# When distributing Covered Code, include this CDDL HEADER in each 146212Saw148015# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 156212Saw148015# If applicable, add the following below this CDDL HEADER, with the 166212Saw148015# fields enclosed by brackets "[]" replaced with your own identifying 176212Saw148015# information: Portions Copyright [yyyy] [name of copyright owner] 186212Saw148015# 196212Saw148015# CDDL HEADER END 206212Saw148015# 216212Saw148015# 22*9326SAndrew.W.Wilson@sun.com# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 236212Saw148015# Use is subject to license terms. 246212Saw148015 256212Saw148015# Sequential write() of a 1G file, size picked from a table in 266212Saw148015# the [1K,64K] range with a mean of 5.5K, followed by close(), cached. 276212Saw148015 286212Saw148015 296212Saw148015 306212Saw148015set $dir=/tmp 316212Saw148015set $nthreads=1 326212Saw148015set $cached=false 336212Saw148015set $sync=false 346212Saw148015set $count=128k 356212Saw148015 366212Saw148015define randvar name=$iosize, type=tabular, min=1k, randtable = 376212Saw148015{{ 80, 1k, 4k}, 386212Saw148015 { 15, 4k, 16k}, 396212Saw148015 { 05, 16k, 64k}} 406212Saw148015 416212Saw148015define fileset name=bigfileset,path=$dir,size=0,entries=$nthreads,dirwidth=1024,prealloc=100,cached=$cached 426212Saw148015 436212Saw148015define process name=filewriter,instances=1 446212Saw148015{ 456212Saw148015 thread name=filewriterthread,memsize=10m,instances=$nthreads 466212Saw148015 { 47*9326SAndrew.W.Wilson@sun.com flowop openfile name=open-file,filesetname=bigfileset,fd=1 48*9326SAndrew.W.Wilson@sun.com flowop appendfile name=write-file,dsync=$sync,iosize=$iosize,fd=1,iters=$count 496212Saw148015 flowop closefile name=close,fd=1 506212Saw148015 flowop finishoncount name=finish,value=1 516212Saw148015 } 526212Saw148015} 536212Saw148015 54*9326SAndrew.W.Wilson@sun.comecho "FileMicro-SeqWriteRandVarTab Version 1.1 personality successfully loaded" 556212Saw148015usage "Usage: set \$dir=<dir>" 566212Saw148015usage " set \$cached=<bool> defaults to $cached" 576212Saw148015usage " set \$count=<value> defaults to $count" 586212Saw148015usage " set \$iosize.type=<type> defaults to $iosize.type" 596212Saw148015usage " set \$iosize.randsrc=<src> defaults to $iosize.randsrc" 606212Saw148015usage " set \$iosize.mean=<mean> defaults to $iosize.mean" 616212Saw148015usage " set \$iosize.gamma=<gamma> defaults to $iosize.gamma" 626212Saw148015usage " set \$nthreads=<value> defaults to $nthreads" 636212Saw148015usage " set \$sync=<bool> defaults to $sync" 646212Saw148015usage " " 656212Saw148015usage " run runtime (e.g. run 60)" 66