usr/src/cmd/filebench/workloads/createfiles.f
author aw148015
Wed, 12 Dec 2007 10:23:36 -0800
changeset 5673 043503f0cca3
parent 5184 da60d2b4a9e2
child 6084 d5f45b4dae7e
permissions -rw-r--r--
6564960 filebench should handle larger iosize's or gracefully error out with a nicer message 6568378 Flowop reads and writes should be consistent about memory buffer usage 6581691 pre-allocation is molasses 6595374 "tf_memsize smaller than IO size" error when reading/writing large file 6601341 flowop_endop() needs to have the actual number of bytes of I/O done passed to it 6601818 Turn FileBench "files" into filesets with 1 entry. 6623079 oltp.f should use dsync for log writer

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"%Z%%M%	%I%	%E% SMI"

set $dir=/tmp
set $nfiles=50000
set $meandirwidth=100
set $filesize=16k
set $iosize=1m
set $nthreads=16

define fileset name=bigfileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth

define process name=filecreate,instances=1
{
  thread name=filecreatethread,memsize=10m,instances=$nthreads
  {
    flowop createfile name=createfile1,filesetname=bigfileset,fd=1
    flowop writewholefile name=writefile1,filesetname=bigfileset,fd=1,iosize=$iosize
    flowop closefile name=closefile1,fd=1
    flowop opslimit name=limit
  }
}

echo  "Createfiles Version 2.1 personality successfully loaded"
usage "Usage: set \$dir=<dir>"
usage "       set \$filesize=<size>    defaults to $filesize"
usage "       set \$iosize=<size>      defaults to $iosize"
usage "       set \$nfiles=<value>     defaults to $nfiles"
usage "       set \$nthreads=<value>   defaults to $nthreads"
usage "       set \$meandirwidth=<size> defaults to $meandirwidth"
usage "(sets mean dir width and dir depth is calculated as log (width, nfiles)"
usage " "
usage "       run runtime (e.g. run 60)"