1*7946SAndrew.W.Wilson@sun.com# 2*7946SAndrew.W.Wilson@sun.com# CDDL HEADER START 3*7946SAndrew.W.Wilson@sun.com# 4*7946SAndrew.W.Wilson@sun.com# The contents of this file are subject to the terms of the 5*7946SAndrew.W.Wilson@sun.com# Common Development and Distribution License (the "License"). 6*7946SAndrew.W.Wilson@sun.com# You may not use this file except in compliance with the License. 7*7946SAndrew.W.Wilson@sun.com# 8*7946SAndrew.W.Wilson@sun.com# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*7946SAndrew.W.Wilson@sun.com# or http://www.opensolaris.org/os/licensing. 10*7946SAndrew.W.Wilson@sun.com# See the License for the specific language governing permissions 11*7946SAndrew.W.Wilson@sun.com# and limitations under the License. 12*7946SAndrew.W.Wilson@sun.com# 13*7946SAndrew.W.Wilson@sun.com# When distributing Covered Code, include this CDDL HEADER in each 14*7946SAndrew.W.Wilson@sun.com# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*7946SAndrew.W.Wilson@sun.com# If applicable, add the following below this CDDL HEADER, with the 16*7946SAndrew.W.Wilson@sun.com# fields enclosed by brackets "[]" replaced with your own identifying 17*7946SAndrew.W.Wilson@sun.com# information: Portions Copyright [yyyy] [name of copyright owner] 18*7946SAndrew.W.Wilson@sun.com# 19*7946SAndrew.W.Wilson@sun.com# CDDL HEADER END 20*7946SAndrew.W.Wilson@sun.com# 21*7946SAndrew.W.Wilson@sun.com# 22*7946SAndrew.W.Wilson@sun.com# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*7946SAndrew.W.Wilson@sun.com# Use is subject to license terms. 24*7946SAndrew.W.Wilson@sun.com# 25*7946SAndrew.W.Wilson@sun.com# Creates a fileset with $nfiles empty files, then proceeds to open each one 26*7946SAndrew.W.Wilson@sun.com# and then close it. 27*7946SAndrew.W.Wilson@sun.com# 28*7946SAndrew.W.Wilson@sun.comset $dir=/tmp 29*7946SAndrew.W.Wilson@sun.comset $nfiles=50000 30*7946SAndrew.W.Wilson@sun.comset $meandirwidth=100 31*7946SAndrew.W.Wilson@sun.comset $nthreads=16 32*7946SAndrew.W.Wilson@sun.com 33*7946SAndrew.W.Wilson@sun.comdefine fileset name=bigfileset,path=$dir,size=0,entries=$nfiles,dirwidth=$meandirwidth,prealloc 34*7946SAndrew.W.Wilson@sun.com 35*7946SAndrew.W.Wilson@sun.comdefine process name=fileopen,instances=1 36*7946SAndrew.W.Wilson@sun.com{ 37*7946SAndrew.W.Wilson@sun.com thread name=fileopener,memsize=1m,instances=$nthreads 38*7946SAndrew.W.Wilson@sun.com { 39*7946SAndrew.W.Wilson@sun.com flowop openfile name=open1,filesetname=bigfileset,fd=1 40*7946SAndrew.W.Wilson@sun.com flowop closefile name=close1,fd=1 41*7946SAndrew.W.Wilson@sun.com } 42*7946SAndrew.W.Wilson@sun.com} 43*7946SAndrew.W.Wilson@sun.com 44*7946SAndrew.W.Wilson@sun.comecho "Openfiles Version 1.0 personality successfully loaded" 45*7946SAndrew.W.Wilson@sun.comusage "Usage: set \$dir=<dir> defaults to $dir" 46*7946SAndrew.W.Wilson@sun.comusage " set \$meandirwidth=<size> defaults to $meandirwidth" 47*7946SAndrew.W.Wilson@sun.comusage " set \$nfiles=<value> defaults to $nfiles" 48*7946SAndrew.W.Wilson@sun.comusage " set \$nthreads=<value> defaults to $nthreads" 49*7946SAndrew.W.Wilson@sun.comusage "(sets mean dir width and dir depth is calculated as log (width, nfiles)" 50*7946SAndrew.W.Wilson@sun.comusage " " 51*7946SAndrew.W.Wilson@sun.comusage " run 60" 52