<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://filebench.sourceforge.net/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://filebench.sourceforge.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vass-vass</id>
		<title>Filebench - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://filebench.sourceforge.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vass-vass"/>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Special:Contributions/Vass-vass"/>
		<updated>2026-04-19T20:20:54Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.1</generator>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Filebench</id>
		<title>Filebench</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Filebench"/>
				<updated>2016-07-14T15:52:00Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Filebench wiki was moved to github: https://github.com/filebench/filebench/wiki&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Filebench wiki was moved to github: https://github.com/filebench/filebench/wiki&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Filebench_Workload_Language</id>
		<title>Filebench Workload Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Filebench_Workload_Language"/>
				<updated>2016-07-13T19:41:29Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Moved to https://github.com/filebench/filebench/wiki/Workload-Model-Language&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moved to https://github.com/filebench/filebench/wiki/Workload-Model-Language&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2016-07-13T19:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Moved to https://github.com/filebench/filebench/wiki/Workload-Model-Language&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moved to https://github.com/filebench/filebench/wiki/Workload-Model-Language&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Writing_Workload_Models</id>
		<title>Writing Workload Models</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Writing_Workload_Models"/>
				<updated>2016-07-13T19:29:06Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Moved to https://github.com/filebench/filebench/wiki/Writing-Workload-Models&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moved to https://github.com/filebench/filebench/wiki/Writing-Workload-Models&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Roadmap</id>
		<title>Roadmap</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Roadmap"/>
				<updated>2016-07-13T19:23:30Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Saved to a local roadmap file, will later be cleaned, restructured, and published on github.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Saved to a local roadmap file, will later be cleaned, restructured, and published on github.&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Filebench_for_Programmers</id>
		<title>Filebench for Programmers</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Filebench_for_Programmers"/>
				<updated>2016-07-13T19:19:31Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Moved to https://github.com/filebench/filebench/wiki/For-programmers&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moved to https://github.com/filebench/filebench/wiki/For-programmers&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Random_Variable_Distributions</id>
		<title>Random Variable Distributions</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Random_Variable_Distributions"/>
				<updated>2016-07-13T19:02:33Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Moved to https://github.com/filebench/filebench/wiki/Custom-variable-distributions&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moved to https://github.com/filebench/filebench/wiki/Custom-variable-distributions&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Scaling_workload_personalities</id>
		<title>Scaling workload personalities</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Scaling_workload_personalities"/>
				<updated>2016-07-13T19:00:46Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cleaned. Nothing important was on this page.&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Contributing_Personalities</id>
		<title>Contributing Personalities</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Contributing_Personalities"/>
				<updated>2016-07-13T18:43:39Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cleaned. No useful information on this page.&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Tutorial</id>
		<title>Tutorial</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Tutorial"/>
				<updated>2016-07-13T18:42:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Cleaned. No useful information was here.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cleaned. No useful information was here.&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Roadmaps</id>
		<title>Roadmaps</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Roadmaps"/>
				<updated>2016-07-13T18:41:28Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Cleaned. Contents of this file are saved locally. After polishing and reorganization will be published at github.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cleaned. Contents of this file are saved locally. After polishing and reorganization will be published at github.&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Pre-defined_personalities</id>
		<title>Pre-defined personalities</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Pre-defined_personalities"/>
				<updated>2016-07-13T18:36:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: Replaced content with &amp;quot;Moved to https://github.com/filebench/filebench/wiki/Predefined-personalities&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Moved to https://github.com/filebench/filebench/wiki/Predefined-personalities&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-10-02T14:44:11Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files (e.g., all html files accessed by a Web-server) is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the &amp;#039;&amp;#039;path&amp;#039;&amp;#039; to the directory where the files will reside. In addition, a number of optional attrobites are allowed.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; entries&lt;br /&gt;
: Optional. The number of files in the fileset. This is the maximum number of files that can be created in a fileset. Not all files are created from the very beginning, see &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute. Default value is 1,024Bytes.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirwidth&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirgamma&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; didepthrv&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; leafdirs&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. Allocate in parallel with other defined files and filesets. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== process =====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute. Each process consists of one or more threads.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:Mandatory. Name of the process.&lt;br /&gt;
&lt;br /&gt;
;instances&lt;br /&gt;
:Optional. How many instances of this process to spawn. Default is 1.&lt;br /&gt;
&lt;br /&gt;
;nice&lt;br /&gt;
:Optional. Increase nice . Default is not to change the nice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-10-02T14:32:25Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files (e.g., all html files accessed by a Web-server) is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the &amp;#039;&amp;#039;path&amp;#039;&amp;#039; to the directory where the files will reside. In addition, a number of optional attrobites are allowed.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; entries&lt;br /&gt;
: Optional. The number of files in the fileset. This is the maximum number of files that can be created in a fileset. Not all files are created from the very beginning, see &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute. Default value is 1,024Bytes.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirwidth&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirgamma&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; didepthrv&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; leafdirs&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. Allocate in parallel with other defined files and filesets. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== process =====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute. Each process consists of one or more threads.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
;name&lt;br /&gt;
:name of the process&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-10-02T14:28:28Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* define */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files (e.g., all html files accessed by a Web-server) is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the &amp;#039;&amp;#039;path&amp;#039;&amp;#039; to the directory where the files will reside. In addition, a number of optional attrobites are allowed.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; entries&lt;br /&gt;
: Optional. The number of files in the fileset. This is the maximum number of files that can be created in a fileset. Not all files are created from the very beginning, see &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute. Default value is 1,024Bytes.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirwidth&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirgamma&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; didepthrv&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; leafdirs&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. Allocate in parallel with other defined files and filesets. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== process =====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-30T18:37:26Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* define */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files (e.g., all html files accessed by a Web-server) is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the &amp;#039;&amp;#039;path&amp;#039;&amp;#039; to the directory where the files will reside. In addition, a number of optional attrobites are allowed.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; entries&lt;br /&gt;
: Optional. The number of files in the fileset. This is the maximum number of files that can be created in a fileset. Not all files are created from the very beginning, see &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute. Default value is 1,024Bytes.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirwidth&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirgamma&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; didepthrv&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; leafdirs&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. Allocate in parallel with other defined files and filesets. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-30T18:11:14Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* fileset */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files (e.g., all html files accessed by a Web-server) is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the &amp;#039;&amp;#039;path&amp;#039;&amp;#039; to the directory where the files will reside. In addition, a number of optional attrobites are allowed.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; entries&lt;br /&gt;
: Optional. The number of files in the fileset. This is the maximum number of files that can be created in a fileset. Not all files are created from the very beginning, see &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute. Default value is 1,024Bytes.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirwidth&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirgamma&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; didepthrv&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; leafdirs&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-30T17:17:22Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* fileset */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files (e.g., all html files accessed by a Web-server) is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the &amp;#039;&amp;#039;path&amp;#039;&amp;#039; to the directory where the files will reside. In addition, a number of optional attrobites are allowed.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; entries&lt;br /&gt;
: Optional. The number of files in the fileset. This is the maximum number of files that can be created in a fileset. Not all files are created from the very beginning, see &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute. Default value is 1,024Bytes.&lt;br /&gt;
&lt;br /&gt;
; filesize&lt;br /&gt;
: Optional. The size of files in the fileset. Dedault is 1KiB (1,024B).&lt;br /&gt;
&lt;br /&gt;
; prealloc&lt;br /&gt;
: Optional. What percent of files to preallocate. Default value, if &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; is not specified, is 0. If &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; specified without a number then the value is 100.&lt;br /&gt;
&lt;br /&gt;
; reuse&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; trusttree&lt;br /&gt;
: Optional. whether to reuse the fileset or recreate it if it already exists. XXX&lt;br /&gt;
&lt;br /&gt;
; paralloc&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; readonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; writeonly&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; cached&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirwidth&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; dirgamma&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; didepthrv&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
; leafdirs&lt;br /&gt;
: Optional. XXX. Default value is XXX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-30T16:52:29Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* fileset */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files (e.g., all html files accessed by a Web-server) is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the &amp;#039;&amp;#039;path&amp;#039;&amp;#039; to the directory where the files will reside. In addition, a number of optional attrobites are allowed.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
; name&lt;br /&gt;
: Mandatory. The name of the fileset. During the definition of processes fileset names are used in flowops to refer to specific filesets.&lt;br /&gt;
&lt;br /&gt;
; path&lt;br /&gt;
: Mandatory. Path to the directory where the files are created.&lt;br /&gt;
&lt;br /&gt;
; entries&lt;br /&gt;
: Optional. The number of files in the fileset. This is the maximum number of files that can be created in a fileset. Not all files are created from the very beginning, see &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute. Default value is 1,000.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
, the number of files to be created, their size, width of the subdirectories, what percent of files to preallocate, whether to reuse the fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-30T15:26:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* define */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
Defines filesets, files,  processes, and flowops.&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T19:00:37Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
Executes quoted UNIX command, waits for the command to finish, and prints its output to the screen.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;&amp;lt;unixcommand&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;echo 3 &amp;gt; /proc/sys/vm/drop/caches&amp;quot;&lt;br /&gt;
&lt;br /&gt;
system &amp;quot;ls $dir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T18:18:59Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* create */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates all previously defined files and filesets. This would be automatically done by &amp;#039;&amp;#039;run&amp;#039;&amp;#039; or &amp;#039;&amp;#039;psrun&amp;#039;&amp;#039; commands but sometimes it is handy to separate file creation stage. E.g., when Filebench is used only to generate a file system tree or when one wants to execute system commands after file creation (e.g., drop caches).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T18:15:44Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* General Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== create ====&lt;br /&gt;
&lt;br /&gt;
Creates files defined in all files and filesets. This would be automatically done by run or psrun commands but in certain scenarios it is useful to separate this stage. E.g., 1) sometimes Filebench is used just to generate a file system tree; 2) at times one wants to execute system commands after files creation, e.g., drop caches.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
create files&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T18:11:24Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* enable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
===== lathist =====&lt;br /&gt;
Enables per-flowop latency histograms. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== multi =====&lt;br /&gt;
&lt;br /&gt;
Enables  multinode mode. Disabled by default. One has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable multi master=&amp;lt;hostname&amp;gt;,client=&amp;lt;clientname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T15:03:20Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
Enables per-flowop latency histograms or multinode mode. Both are disabled by default. For multinode mode one has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi master=masterhostname,client=myclientname&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Defines a single file. Mandatory attributes of the file are &amp;#039;&amp;#039;name&amp;#039;&amp;#039;, &amp;#039;&amp;#039;path&amp;#039;&amp;#039; (directory where the file will reside), and &amp;#039;&amp;#039;size&amp;#039;&amp;#039;. Optional attributes are &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; (create and fill the file with data), &amp;#039;&amp;#039;paralloc&amp;#039;&amp;#039; (allocate in parallel with other files), and &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; (reuse file if exists).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;XXX&amp;#039;&amp;#039;&amp;#039;&amp;#039;: What about readonly and cached?&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Examples:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
define file name=myfile,path=/tmp,size=100mb,prealloc&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T14:24:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* define */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
Enables per-flowop latency histograms or multinode mode. Both are disabled by default. For multinode mode one has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi master=masterhostname,client=myclientname&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fileset =====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T14:23:51Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* fileset */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
Enables per-flowop latency histograms or multinode mode. Both are disabled by default. For multinode mode one has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi master=masterhostname,client=myclientname&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T14:23:22Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* General Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
Enables per-flowop latency histograms or multinode mode. Both are disabled by default. For multinode mode one has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi master=masterhostname,client=myclientname&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== define ====&lt;br /&gt;
===== file =====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T14:22:35Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
Enables per-flowop latency histograms or multinode mode. Both are disabled by default. For multinode mode one has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi master=masterhostname,client=myclientname&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-23T02:05:05Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* Enable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== enable ====&lt;br /&gt;
&lt;br /&gt;
Enables per-flowop latency histograms or multinode mode. Both are disabled by default. For multinode mode one has to specify master&amp;#039;s hostname and client&amp;#039;s name.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi master=masterhostname,client=myclientname&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T21:58:40Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* lathist */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Enable ====&lt;br /&gt;
&lt;br /&gt;
Enables per-flowop latency histograms or multinode mode. Both are disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T21:57:39Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* lathist */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== lathist ====&lt;br /&gt;
&lt;br /&gt;
Enables latency histogram or multinode mode. Both are disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
enable lathist&lt;br /&gt;
&lt;br /&gt;
enable multi&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T21:31:28Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* General Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== lathist ====&lt;br /&gt;
&lt;br /&gt;
Enables or disables latency histogram collection for flowops. Disabled by default.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
lathist true&lt;br /&gt;
&lt;br /&gt;
lathist false&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T20:59:45Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* Debug Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== version ===&lt;br /&gt;
&lt;br /&gt;
Prints Filebench version.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
version&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T20:37:41Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* Statistics Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T20:22:06Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* sleep */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
Causes Filebench to sleep for the number of seconds supplied by the argument. Notice, this is not a flowop executed by workers but a command that Filebench&amp;#039;s master process executes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T20:16:27Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* Debug Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== sleep ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes Filebench to sleep for the number of seconds supplied by the argument.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep 10&lt;br /&gt;
&lt;br /&gt;
sleep $varname&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T20:14:39Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* sleep */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T15:03:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:43:10Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* load */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:41:44Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* Debug Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== quit ===&lt;br /&gt;
&lt;br /&gt;
Ends the Filebench execution. Can be used to terminate WML parsing in the middle of a WML script.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:40:29Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* quit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:40:15Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* exit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== quit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:35:14Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* foreach */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== exit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
exit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== quit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:34:06Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* help */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== exit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
exit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== foreach ====&lt;br /&gt;
&lt;br /&gt;
Assigns the designated variable successive values from the supplied comma separated integer or string list. After each successive value assignment, it executes the bracket enclosed list of commands.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foreach $iosize in 2k, 4k, 8k&lt;br /&gt;
{&lt;br /&gt;
    run 60&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above example will repeatedly run the loaded workload with increasing I/O sizes of 2 KB, 4 KB and 8 KB.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
foreach $varname in [integer[,integer]... | &amp;quot;string&amp;quot;[,&amp;quot;string&amp;quot;]...]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:command&lt;br /&gt;
:[command]&lt;br /&gt;
:...&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== quit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:33:55Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== exit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
exit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== foreach ====&lt;br /&gt;
&lt;br /&gt;
Assigns the designated variable successive values from the supplied comma separated integer or string list. After each successive value assignment, it executes the bracket enclosed list of commands.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foreach $iosize in 2k, 4k, 8k&lt;br /&gt;
{&lt;br /&gt;
    run 60&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above example will repeatedly run the loaded workload with increasing I/O sizes of 2 KB, 4 KB and 8 KB.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
foreach $varname in [integer[,integer]... | &amp;quot;string&amp;quot;[,&amp;quot;string&amp;quot;]...]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:command&lt;br /&gt;
:[command]&lt;br /&gt;
:...&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== quit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== help ====&lt;br /&gt;
&lt;br /&gt;
Prints usage string if the string exists, else just a message requesting load of a personality. Note that the usage string is typically created by &amp;#039;&amp;#039;&amp;#039;usage&amp;#039;&amp;#039;&amp;#039; commands embedded in the workload files.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
help&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:33:14Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* echo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables. It is usually used to print workload description.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files in workload is $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== exit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
exit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== foreach ====&lt;br /&gt;
&lt;br /&gt;
Assigns the designated variable successive values from the supplied comma separated integer or string list. After each successive value assignment, it executes the bracket enclosed list of commands.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foreach $iosize in 2k, 4k, 8k&lt;br /&gt;
{&lt;br /&gt;
    run 60&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above example will repeatedly run the loaded workload with increasing I/O sizes of 2 KB, 4 KB and 8 KB.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
foreach $varname in [integer[,integer]... | &amp;quot;string&amp;quot;[,&amp;quot;string&amp;quot;]...]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:command&lt;br /&gt;
:[command]&lt;br /&gt;
:...&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== quit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== help ====&lt;br /&gt;
&lt;br /&gt;
Prints usage string if the string exists, else just a message requesting load of a personality. Note that the usage string is typically created by &amp;#039;&amp;#039;&amp;#039;usage&amp;#039;&amp;#039;&amp;#039; commands embedded in the workload files.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
help&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== usage ====&lt;br /&gt;
&lt;br /&gt;
Adds the string supplied as the argument to the usage command to the end of the string printed by the help command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
usage &amp;quot;additional help string&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-22T14:19:03Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* echo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command prints text to the standard output. The text should be enclosed in quotes and can contain variables.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12 2005/06/21 21:18:52 personality successfully loaded&amp;quot;&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Number of files is set to $files&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== exit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
exit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== foreach ====&lt;br /&gt;
&lt;br /&gt;
Assigns the designated variable successive values from the supplied comma separated integer or string list. After each successive value assignment, it executes the bracket enclosed list of commands.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foreach $iosize in 2k, 4k, 8k&lt;br /&gt;
{&lt;br /&gt;
    run 60&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above example will repeatedly run the loaded workload with increasing I/O sizes of 2 KB, 4 KB and 8 KB.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
foreach $varname in [integer[,integer]... | &amp;quot;string&amp;quot;[,&amp;quot;string&amp;quot;]...]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:command&lt;br /&gt;
:[command]&lt;br /&gt;
:...&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== quit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== help ====&lt;br /&gt;
&lt;br /&gt;
Prints usage string if the string exists, else just a message requesting load of a personality. Note that the usage string is typically created by &amp;#039;&amp;#039;&amp;#039;usage&amp;#039;&amp;#039;&amp;#039; commands embedded in the workload files.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
help&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== usage ====&lt;br /&gt;
&lt;br /&gt;
Adds the string supplied as the argument to the usage command to the end of the string printed by the help command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
usage &amp;quot;additional help string&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Tutorial</id>
		<title>Tutorial</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Tutorial"/>
				<updated>2015-09-21T18:07:09Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The first step in using Filebench is to create a WML script.  WML script consists of a list of commands. The most important commands are:&lt;br /&gt;
&lt;br /&gt;
- define (filesets and files)&lt;br /&gt;
- define process&lt;br /&gt;
- run&lt;br /&gt;
&lt;br /&gt;
All commands have parameters. First one usese define commands to define filesets, and process&lt;br /&gt;
&lt;br /&gt;
All commands after the run or psrun command parsing stops.&lt;br /&gt;
&lt;br /&gt;
All threads execute commands in a loop, one after another. Before previos flowop is not over, the next won&amp;#039;t continue (of course, expelicitly defined threads will run in parallel).&lt;br /&gt;
&lt;br /&gt;
More sophisticated:&lt;br /&gt;
 - creating filesets w/o runnig workload&lt;br /&gt;
 - defining compisite flowops&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	<entry>
		<id>http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language</id>
		<title>Workload Model Language</title>
		<link rel="alternate" type="text/html" href="http://filebench.sourceforge.net/wiki/index.php/Workload_Model_Language"/>
				<updated>2015-09-21T17:39:21Z</updated>
		
		<summary type="html">&lt;p&gt;Vass-vass: /* eventgen */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Workload Model Language ==&lt;br /&gt;
&lt;br /&gt;
For a tutorial on WML read [[Writing Workload Models]].&lt;br /&gt;
&lt;br /&gt;
FileBench uses a synthetic application model description which can be used to derive analytic models and reconstruct the footprint of the application; allowing predictions and characterization but with greatly reduced time and cost.&lt;br /&gt;
&lt;br /&gt;
The language allows accurate representation of application workloads and thus facilitates prediction, modeling and measurement of system performance.&lt;br /&gt;
&lt;br /&gt;
Synthetic benchmarking is achieved by using the model described in the language to generate load on a test system in a manner similar to if the real application was running on the system. The performance of the system can be measured during load generation.&lt;br /&gt;
&lt;br /&gt;
For benchmarking, the model is realized by dynamically recreating the correct number of processes (or threads), memory footprint and I/O, together with all the inter-process synchronization seen in the real application.&lt;br /&gt;
&lt;br /&gt;
The language could also be used to drive an analytical model. This allows forward prediction of system performance changes when sub-components of the system are changed.&lt;br /&gt;
&lt;br /&gt;
The workload description is achieved by describing it as a series of processes, threads and flows. Each process represents an address space, which contains 1 or more threads. Each thread represents a flow of sequential execution of a closed queue of flow operations. Each flow operation is a pre-defined system operation, such as a file read/write etc...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  model -&amp;gt; process -&amp;gt; thread -&amp;gt; {flowop, flowop, flowop...}&lt;br /&gt;
                   -&amp;gt; thread -&amp;gt; ...&lt;br /&gt;
        -&amp;gt; process -&amp;gt; ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, a random I/O workload in the f language could be represented by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process randomizer&lt;br /&gt;
  define thread random-thread procname=randomizer&lt;br /&gt;
  {&lt;br /&gt;
        flowop random-read type=read,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
        flowop random-write type=write,filename=bigfile,&lt;br /&gt;
                                   random,iosize=2k&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We also introduce flow synchronization between flows; to facilitate  replication of inter-flow constraints as seen in real applications. For example, a database workload may consist of two critical process which are dependent on each other. The flow operation loop for each will be linked in this case:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  {read, read, read, block on other flowop} &amp;lt;--+&lt;br /&gt;
                                               |&lt;br /&gt;
  {write, write, write, wakeup other flowop}  -+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A simple database representation consisting of three processes would be represented by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  define process logwr&lt;br /&gt;
  define process dbwr instances=1&lt;br /&gt;
  define process shadow instances=$shadows&lt;br /&gt;
  &lt;br /&gt;
  define thread logwr procname=logwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop log-write type=write,filename=log,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop log-block type=semblock,value=40&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread dbwr procname=dbwr,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop dbwr-write type=write,filename=datafile,&lt;br /&gt;
        iosize=1m,workingset=1m,random,dsync&lt;br /&gt;
    flowop dbwr-block type=semblock,value=10,highwater=1000&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  define thread shadow procname=shadow,memsize=10m&lt;br /&gt;
  { &lt;br /&gt;
    flowop shadowread-a type=read,filename=datafile,&lt;br /&gt;
        iosize=2k,workingset=10m,random,dsync&lt;br /&gt;
    flowop shadow-post-log type=sempost,value=1,&lt;br /&gt;
                                  target=log-block&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model Language Example ===&lt;br /&gt;
(Subject to lots of change at the moment)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/benchmarks/filebench/go_filebench -f&lt;br /&gt;
&lt;br /&gt;
debug 1&lt;br /&gt;
&lt;br /&gt;
define file name=bigfile1,path=$datadir1/myrandfile,size=50g,prealloc,reuse,paralloc&lt;br /&gt;
&lt;br /&gt;
define process name=rand-read,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=rand-thread,memsize=10m,instances=100&lt;br /&gt;
  {&lt;br /&gt;
    flowop read name=rand-read1,filename=bigfile1,iosize=$iosize,random,directio&lt;br /&gt;
    flowop eventlimit name=rand-rate&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage:&lt;br /&gt;
filebench: interpret f script and generate file workload&lt;br /&gt;
Options:&lt;br /&gt;
   [-h] Display verbose help&lt;br /&gt;
   [-p] Disable opening /proc to set uacct to enable truss&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Workload Model &amp;#039;f&amp;#039; language definition: ===&lt;br /&gt;
&lt;br /&gt;
(Subject to change as new features are added)&lt;br /&gt;
&lt;br /&gt;
Variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $var = value&lt;br /&gt;
    $var   - regular variables&lt;br /&gt;
    ${var} - internal special variables&lt;br /&gt;
    $(var) - environment variables&lt;br /&gt;
define randvar name = $random_var&lt;br /&gt;
                       [, type=&amp;lt;uniform | gamma&amp;gt;]&lt;br /&gt;
                       [, seed=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, gamma=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, mean=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, round=&amp;lt;value&amp;gt;]&lt;br /&gt;
                       [, randsrc=&amp;lt;urandom | rand48&amp;gt;]&lt;br /&gt;
                       [[, type=tabular], randtable = {{&amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;value&amp;gt;}, {...}, ... }]&lt;br /&gt;
set $random_var.&amp;lt;type=&amp;lt;uniform | gamma&amp;gt;|seed=&amp;lt;value&amp;gt;|gamma=&amp;lt;value&amp;gt;|mean=&amp;lt;value&amp;gt;|min=&amp;lt;value&amp;gt;|round=&amp;lt;value&amp;gt;|randsrc=&amp;lt;urandom | rand48&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Files and Filesets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define file name=&amp;lt;file-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,paralloc]&lt;br /&gt;
                        [,prealloc]&lt;br /&gt;
                        [,reuse]&lt;br /&gt;
&lt;br /&gt;
define fileset name=&amp;lt;fileset-name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt;,size=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,dirwidth=&amp;lt;width&amp;gt;]&lt;br /&gt;
                        [,dirdepthrv=&amp;lt;$random_var&amp;gt;&lt;br /&gt;
                        [,dirgamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,sizegamma=[100-10000] (Gamma * 1000)&lt;br /&gt;
                        [,prealloc[=percent]]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Processes and Threads:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
{&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
  thread ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  thread  name=&amp;lt;name&amp;gt;[,instances=&amp;lt;count&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
    flowop ...&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flowops:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flowop [aiowrite|write|read] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;,&lt;br /&gt;
                        iosize=&amp;lt;size&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,random]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [appendfile|appendfilerand] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [writewholefile|readwholefile] name=&amp;lt;name&amp;gt;, &lt;br /&gt;
                        filename|filesetname=&amp;lt;file-name|fileset-name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,directio]&lt;br /&gt;
                        [,dsync]&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,iters=&amp;lt;count&amp;gt;]&lt;br /&gt;
                        [,workingset=&amp;lt;size&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [deletefile|statfile] name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filesetname=&amp;lt;fileset_name&amp;gt;|fd=&amp;lt;number&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt;, fd=&amp;lt;number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,&lt;br /&gt;
                        filename|filesetname=&amp;lt;file_name|fileset_name&amp;gt;,&lt;br /&gt;
                        [,opennext]&lt;br /&gt;
                        [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop [makedir|removedir] name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
                        [,indexed=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;, filesetname=&amp;lt;fileset_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;,target=&amp;lt;semblock-flowop&amp;gt;,&lt;br /&gt;
                        value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;,value=&amp;lt;decrement-to-receive&amp;gt;,&lt;br /&gt;
                        highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
flowop [bwlimit|iopslimit|opslimit] name=&amp;lt;name&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-ops&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;any-flowop&amp;gt;]&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;, value=&amp;lt;number-of-megabytes&amp;gt;&lt;br /&gt;
                        [,target=&amp;lt;io-producing-flowop&amp;gt;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eventgen rate=&amp;lt;rate&amp;gt;&lt;br /&gt;
create [files|processes]&lt;br /&gt;
stats [clear|snap]&lt;br /&gt;
stats command &amp;quot;shell command $var1,$var2...&amp;quot;&lt;br /&gt;
stats directory &amp;lt;directory&amp;gt;&lt;br /&gt;
run &amp;lt;run-time&amp;gt;&lt;br /&gt;
sleep &amp;lt;sleep-value&amp;gt;&lt;br /&gt;
quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Filebench Language Reference ==&lt;br /&gt;
&lt;br /&gt;
In this section, the Workload Model Language (WML), which runs to nearly 70 words, is detailed. There are four main categories of interest: Commands, Entities, Flowops and Attributes.&lt;br /&gt;
&lt;br /&gt;
Global parameters are set, Entities and Flowops created and benchmark runs are controlled using &amp;#039;&amp;#039;Commands&amp;#039;&amp;#039;. &amp;#039;&amp;#039;Entities&amp;#039;&amp;#039; are specific resources such as files and threads of control. The actions taken by the workload defined by the f program are implemented by &amp;#039;&amp;#039;Flowops&amp;#039;&amp;#039;. Finally, many Commands, Entities and Flowops can be passed parameters through the use of &amp;#039;&amp;#039;Attributes&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== General Commands ===&lt;br /&gt;
&lt;br /&gt;
==== eventgen ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command sets the rate (per second) at which internal Filebench events are generated. Events are then used by &amp;#039;&amp;#039;eventlimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;iopslimit&amp;#039;&amp;#039;, &amp;#039;&amp;#039;opslimit&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;bwlimit&amp;#039;&amp;#039; flowops. If there are no events available then a flowop blocks until new events are posted. There is one general pool of events used by all flowops in all threads.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
eventgen rate = 100&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== echo ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;echo&amp;#039;&amp;#039; command is used in f as in every other language to output text to the standard output. The text should be enclosed in quotes.  See also the &amp;#039;&amp;#039;usage&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
echo &amp;quot;Bringover Version 1.12 2005/06/21 21:18:52 personality successfully loaded&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Prints the following to the standard output and the log file:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; 7831: 8.900: Bringover Version 1.12 2005/06/21 21:18:52 personality successfully loaded &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== exit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
exit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== foreach ====&lt;br /&gt;
&lt;br /&gt;
Assigns the designated variable successive values from the supplied comma separated integer or string list. After each successive value assignment, it executes the bracket enclosed list of commands.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foreach $iosize in 2k, 4k, 8k&lt;br /&gt;
{&lt;br /&gt;
    run 60&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above example will repeatedly run the loaded workload with increasing I/O sizes of 2 KB, 4 KB and 8 KB.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
foreach $varname in [integer[,integer]... | &amp;quot;string&amp;quot;[,&amp;quot;string&amp;quot;]...]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:command&lt;br /&gt;
:[command]&lt;br /&gt;
:...&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== quit ====&lt;br /&gt;
&lt;br /&gt;
Ends the filebench run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
quit&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== help ====&lt;br /&gt;
&lt;br /&gt;
Prints usage string if the string exists, else just a message requesting load of a personality. Note that the usage string is typically created by &amp;#039;&amp;#039;&amp;#039;usage&amp;#039;&amp;#039;&amp;#039; commands embedded in the workload files.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
help&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== load ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;load&amp;#039;&amp;#039; command loads a workload specification&lt;br /&gt;
&amp;#039;&amp;#039;pathname&amp;#039;&amp;#039;.f, to be used in addition to the current&lt;br /&gt;
workload specification file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
load pathname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== log ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;log&amp;#039;&amp;#039; command prints the values of a list of variables to the log file and also the terminal. The list of variables is placed on the command line, separated by comas and the entire list is enclosed in quotes. For example, if $dir contains “/export/home/tmp” and $filesize is set to 1048576, then typing log “$dir, $filesize” at the prompt gives:&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
filebench&amp;gt; &amp;#039;&amp;#039;&amp;#039;log “$dir, $filesize”&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
6838: 24.459: log /export/home/tmp, 1048576&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
log &amp;quot;$varname1[, $varname2...]&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== run ====&lt;br /&gt;
&lt;br /&gt;
Do a file bench run. Calls routines to create file sets, files, and processes. It resets the statistics counters, then sleeps for the runtime passed as an argument to it on the command line in 1 second increments. When it is finished sleeping, it collects a snapshot of the statistics and ends the run.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
run runtime|$integervarname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set ====&lt;br /&gt;
&lt;br /&gt;
Set searches for the varname supplied as the first argument and if not found creates a new var of that name. It then supplies the integer, string, or $varname value on the rest of the line to it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;varname&amp;gt; = [ true | false | &amp;lt;integer&amp;gt; | &amp;lt;double&amp;gt; | &amp;quot;&amp;lt;string&amp;gt;&amp;quot; | $&amp;lt;othervarname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.type = [ uniform | gamma | tabular ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randsrc = [ urandom | rand48 ]&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.[ gamma | mean | min | round | seed ] = &amp;lt;value&amp;gt;&lt;br /&gt;
&lt;br /&gt;
set $&amp;lt;random varname&amp;gt;.randtable = {{ &amp;lt;%&amp;gt;, &amp;lt;min value&amp;gt;, &amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== set mode ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;set mode&amp;#039;&amp;#039; command is used to put FileBench into various special modes of operation. It is followed by a subcommand, of which &amp;#039;&amp;#039;quit&amp;#039;&amp;#039; is the only one presently defined. The default is &amp;#039;&amp;#039;quit timeout&amp;#039;&amp;#039;, which ends the run when the runtime specified in a &amp;#039;&amp;#039;run&amp;#039;&amp;#039; command has expired or when an explicit &amp;#039;&amp;#039;shutdown&amp;#039;&amp;#039; command is encountered. If the workload is expected to end when it runs out of resources, such as files to delete, then use either &amp;#039;&amp;#039;quit alldone&amp;#039;&amp;#039; to quit once all the threads have quit because of resource exhaustion, or &amp;#039;&amp;#039;quit firstdone&amp;#039;&amp;#039;, to quit as soon as the first thread detects resource exhaustion.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set mode quit [ timeout | alldone | firstdone ]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shutdown ====&lt;br /&gt;
&lt;br /&gt;
Shuts down filebench if &amp;#039;&amp;#039;process&amp;#039;&amp;#039; or &amp;#039;&amp;#039;processes&amp;#039;&amp;#039; is specified as an argument. Anything else is currently an error.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
shutdown process[es]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== sleep ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;sleep&amp;#039;&amp;#039; command causes the master process to sleep for the number of seconds supplied by the argument, one second at a time.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
sleep integer|$varname&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== system ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;system&amp;#039;&amp;#039; command runs the quoted unix command. It waits for the command to finish.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
system &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== usage ====&lt;br /&gt;
&lt;br /&gt;
Adds the string supplied as the argument to the usage command to the end of the string printed by the help command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
usage &amp;quot;additional help string&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Statistics Commands ===&lt;br /&gt;
&lt;br /&gt;
The statistics subsystem is controlled use &amp;#039;&amp;#039;stats&amp;#039;&amp;#039; commands. Using various subcommands the user can initialize and examine statistics collected by the flowops.&lt;br /&gt;
&lt;br /&gt;
==== stats all ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;all&amp;#039;&amp;#039; subcommand is not yet implemented.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats all&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats clear ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;clear&amp;#039;&amp;#039; subcommand clears all the statistics associated with all of the flowops and the global summary statistics.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats clear&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats command ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;command&amp;#039;&amp;#039; subcommand runs the quoted unix command as a background process. Intended for running statistics gathering utilities such as mpstat while the filebench workload is running. It also records the pid&amp;#039;s of the background processes so that the &amp;quot;stats snap&amp;quot; command can terminate them when the run completes. For example the following would run mpstat in the background and save the results to mpstat_log:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;mpstat 5 &amp;gt; mpstat_log&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats command &amp;quot;unixcommand&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats directory ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;directory&amp;#039;&amp;#039; subcommand changes the directory into which the statistics files will be placed.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats directory &amp;lt;pathname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats snap ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;snap&amp;#039;&amp;#039; subcommand kills off background statistics collection processes, then takes a snapshot of the filebench run&amp;#039;s collected statistics and rolls them up into summary statistics for each named flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats snap&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats dump ====&lt;br /&gt;
The &amp;#039;&amp;#039;dump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats dump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== stats xmldump ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;xmldump&amp;#039;&amp;#039; subcommand updates the global dump filename with the filename supplied as the command&amp;#039;s argument. Then dumps the statistics of each worker flowop into the dump file, followed by a summary of overall totals in xml format.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
stats xmldump &amp;lt;filename&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Entities ===&lt;br /&gt;
&lt;br /&gt;
The workload language defines the following entities:&lt;br /&gt;
* var  (a variable)&lt;br /&gt;
* file (a single file)&lt;br /&gt;
* fileset (a set of files)&lt;br /&gt;
* process (an operating system process)&lt;br /&gt;
* thread (an operating system thread)&lt;br /&gt;
* flowop (a Filebench workload operation)&lt;br /&gt;
&lt;br /&gt;
This section will cover all the entities except for the flowops, which have their own section following this one.&lt;br /&gt;
&lt;br /&gt;
==== vars ====&lt;br /&gt;
&lt;br /&gt;
A workload model can make use of variables, known as &amp;#039;&amp;#039;vars&amp;#039;&amp;#039; from within the model. Vars can be user defined, FileBench internally defined items, or externally defined environment variables. All vars are identified by a string preceded by a dollar sign &amp;quot;$&amp;quot;. User defined vars can be created and assigned either integer or string values using the &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. Internal vars can be accessed by specifying the appropriate name enclosed in braces, while environment vars can be accessed by specifying the appropriate name enclosed in parentencies.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Name Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
$user_defined_varname&lt;br /&gt;
&lt;br /&gt;
${stats | rate | date  |scriptname | hostname}&lt;br /&gt;
&lt;br /&gt;
$(environment_varname)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Variables can be used to set attributes for files, filesets, processes, threads, and flowops. Each var can hold either a boolean, 64 bit unsigned integer, double, or character string, or be empty.&lt;br /&gt;
&lt;br /&gt;
===== Regular vars =====&lt;br /&gt;
&lt;br /&gt;
Regular, user defined vars can be set to a value with a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Var Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt; = [true | false | &amp;lt;positive integer value&amp;gt; | &amp;lt;double precision floating point value&amp;gt; | &amp;lt;character string&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Random Vars =====&lt;br /&gt;
&lt;br /&gt;
Random variables are user defined entities that are defined with a random distribution which is used to pick a random value to return with each use. The are created with a &amp;#039;&amp;#039;define randvar&amp;#039;&amp;#039; command, and may have individual parameters set with &amp;#039;&amp;#039;set&amp;#039;&amp;#039; commands. The are used just like regular variables, but return a different value each time they are accessed. They are particularly useful with flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Define Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define randvar name = $&amp;lt;user_defined_varname&amp;gt;, [type=[uniform | gamma | table]]&lt;br /&gt;
[, seed=&amp;lt;value&amp;gt;] [, mean=&amp;lt;value&amp;gt;] [, gamma=&amp;lt;value&amp;gt;] [, min=&amp;lt;value&amp;gt;]&lt;br /&gt;
[, round=&amp;lt;value&amp;gt;] [, randsrc=[urandom | rand48]&lt;br /&gt;
[, randtable={{&amp;lt;%&amp;gt;,&amp;lt;min value&amp;gt;,&amp;lt;max value&amp;gt;}, ...}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Random Variable Set Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
set $&amp;lt;user_defined_varname&amp;gt;.&amp;lt;attribute name&amp;gt; = &amp;lt;value&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== file ====&lt;br /&gt;
&lt;br /&gt;
Information about a single file is contained in a &amp;#039;&amp;#039;file&amp;#039;&amp;#039; entity. File entities are specified using the &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define file&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the file, the path to the directory where the file will reside and the size of the file. In addition, the file can be specified to be allocated in parallel with any other files, pre allocated with null data, and reused if it already exists.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;prealloc&amp;#039; is not set, then regardless if &amp;#039;size&amp;#039; is specified or not, the file will not be preallocated (as expected).  A file specified with &amp;#039;prealloc&amp;#039; set and &amp;#039;size&amp;#039; set to 0 will preallocate a zero length file.  If &amp;#039;prealloc&amp;#039; is set, but &amp;#039;size&amp;#039; is not set, then a default file size of 0 will be used (the same as specifying &amp;#039;size&amp;#039; as 0).&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,size=&amp;lt;size&amp;gt; [,paralloc] [prealloc] [,reuse]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fileset ====&lt;br /&gt;
&lt;br /&gt;
Information about a group of related files is contained in a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; entity. Fileset entities are specified using the &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command. The &amp;#039;&amp;#039;define fileset&amp;#039;&amp;#039; command must provide a &amp;#039;&amp;#039;name&amp;#039;&amp;#039; for the fileset and the path to the directory where the fileset will reside. In addition, the number of files to be created, their average size, the average width of the subdirectories in the directory tree which contains the files of the fileset, whether to, and if so what percent to pre allocate with null data, and whether to reuse he fileset or recreate it if it already exists.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset name=&amp;lt;name&amp;gt;,path=&amp;lt;pathname&amp;gt;,entries=&amp;lt;number&amp;gt; [,dirwidth=&amp;lt;width&amp;gt;] [,dirgamma=&amp;lt;directory gamma value&amp;gt;] [,size=&amp;lt;mean file size&amp;gt;] [,sizegamma=&amp;lt;&amp;gt;] [,prealloc=&amp;lt;percent to preallocate&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Processes and Threads Entities ====&lt;br /&gt;
&lt;br /&gt;
A Filebench process represents and operating system process and contains one or more threads. In turn, each Filebench thread represents an operating system thread of control and contains a collection of flowops. The following example illustrates how to specify a process, thread and collection of flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $nthreads=1&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop appendfile name=write-file, filesetname=bigfileset, iosize=1m, fd=1, iters=20&lt;br /&gt;
    flowop closefile name=close,fd=1&lt;br /&gt;
    flowop finishoncount name=finish,value=1&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
Process entities are used to hold attributes and other information about each operating system process. The &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command is used to instantiate a given process entity, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1). The process(es) corresponding to the process entity may be run at a lower priority level by setting a value for the &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;process name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,nice=&amp;lt;additional niceness&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:thread ...&lt;br /&gt;
:[thread ... ]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== thread ====&lt;br /&gt;
&lt;br /&gt;
Thread entities are used to hold attributes and other information about each operating system thread. They are defined within a process definition, and become part of that process, which may spawn multiple, identical copies if &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; is specified as greater than 1 (the default is 1).&lt;br /&gt;
&lt;br /&gt;
Threads can also have a region of memory allocated which certain flowops will then use as buffer space for I/O. This region is created by setting a value for the &amp;#039;&amp;#039;memsize&amp;#039;&amp;#039; attribute. If the &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute is set then IPC shared memory will be used, otherwise thread local memory will be used.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread name=&amp;lt;thread name&amp;gt; [,instances=&amp;lt;number of instances&amp;gt;] [,memsize=&amp;lt;size of thead&amp;#039;s memory&amp;gt;] [,useism]&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
;&lt;br /&gt;
:flowop ...&lt;br /&gt;
:[flowop ...]&lt;br /&gt;
:...&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flowops ===&lt;br /&gt;
&lt;br /&gt;
The flowop clause determines what a thread actually does. The operations and their syntax is covered in this section.  &lt;br /&gt;
The flowop actions can be divided up into Basic I/O, Asynchronous I/O, Synchronization constructs and Misc other operations.&lt;br /&gt;
&lt;br /&gt;
Some of the flowop syntax is common to all flowops. They are defined with the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword within a thread definition. Immediately following the &amp;#039;&amp;#039;flowop&amp;#039;&amp;#039; keyword is the name of the particular operation that is to be performed. Following that are a list of attributes, of which the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; and &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attributes are common to all flowops. The &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute is required and provides the particular instance of the flowop with a name by which it can be referenced elsewhere. The name must be globally unique. The &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute is optional, but if specified allows the action specified by the flowop to happen multiple times each time the flowop is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Common Flowop Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop &amp;lt;operation type name&amp;gt; name=&amp;lt;name&amp;gt; [,iters=&amp;lt;number of iterations per invocation&amp;gt;] [additional attributes...] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Reading and writing to files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. Other read and write flowops will implicitly open a file for use if the filename or fileset name is provided without a file descriptor number. For filesets, specific files can be accessed by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== read =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix &amp;#039;&amp;#039;read&amp;#039;&amp;#039; or &amp;#039;&amp;#039;pread&amp;#039;&amp;#039;. The flowop must include either a fileset or filename attribute. If a &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute is supplied, the read operation will be done to a file from the fileset. Otherwise it will read the file specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute. If a fileset is specified along with an &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute, than the referenced file will be read. Otherwise the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; will be used or, if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set, the flowop will pick the next file in sequence to read. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The actual read is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location. The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute specifies the working set size for use in choosing the random disk offset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== readwholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;read&amp;#039;&amp;#039; of a whole file. The file from the supplied fileset &amp;#039;&amp;#039;fname&amp;#039;&amp;#039; that is referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Reading from ordinary files (fileobjs, as would be specified by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute) is not currently supported. The &amp;#039;&amp;#039;readwholefile&amp;#039;&amp;#039; flowop then reads from the beginning of the file to the end, using zero or more &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; reads, followed by a read of whatever remaining, less than &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; amount, needs to be read. If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then the file will be read in one read of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; bytes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop readwholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, [,iters=&amp;lt;count&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== write =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; to a file. The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The actual write is done to a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size if the &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is set, or at the next sequential location.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop write name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;] [,random] [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== writewholefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a &amp;#039;&amp;#039;write&amp;#039;&amp;#039; of a whole file.  The size of the file is taken from a filesetentry identified by the &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute, while the file used for the write is identified by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute. Both default to the filesetentry associated with &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;. Does multiple writes of &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; length until full file has been written. &lt;br /&gt;
If &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; is not defined or set to zero, then a single write of the size of the source file is done.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile name=&amp;lt;name&amp;gt;, fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt; [,dsync] [,iters=&amp;lt;count&amp;gt;] [,srfd=&amp;lt;source file desc num&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate a fixed size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. The size of each append is set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfile name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;][,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== appendfilerand =====&lt;br /&gt;
&lt;br /&gt;
Emulate a random size append to a file. Will append data to a file chosen from a fileset if one is specified with the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, or if the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is non zero and the attribute&amp;#039;s file associated with the file descriptor is open. If a fileset is specified but the referenced file is not open, &amp;#039;&amp;#039;appendfile&amp;#039;&amp;#039; will open it. If no fileset or non-zero &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute is specified, then a file named by the &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute will be used. If no appropriate file can be found, filebench will terminate. While the &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is accepted, it is not currently used. Thus the repeated invocation on the flowop for a given file will cause the file to grow arbitrarily large. A write to the current end of the file with a random transfer size of at most &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; bytes is done. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop appendfilerand name=&amp;lt;name&amp;gt;, filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;\  [,dsync] [,iters=&amp;lt;count&amp;gt;] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== File Meta Data Flowops ====&lt;br /&gt;
&lt;br /&gt;
Opening, closing and stating files and filesets. On opening or creating a file, a file descriptor number can be specified, which will save the returned file descriptor for later use. Then operations on the already open file can reference it by its file descriptor number. For filesets, specific files can be opened or created by passing a file index number to the flowop, which can be obtained from a random variable to provide random file accesses. Otherwise files will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== createfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate &amp;#039;&amp;#039;create&amp;#039;&amp;#039; of a file. Associates createfile&amp;#039;s fd attribute, if supplied, with the created file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. Selects a file entry (filesetentry) from the fileset whose file&lt;br /&gt;
does not currently exist for the file create operation. Then performs an &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the file with the O_CREATE flag set to create the file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop createfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== openfile =====&lt;br /&gt;
&lt;br /&gt;
Emulates a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation. Associates openfile&amp;#039;s fd attribute, if supplied, with the opened file&amp;#039;s operating system specific file descriptor so it can be referenced by other file operations. However, &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; will fail if the supplied fd attribute is already associated with an open file. Selects a file entry (filesetentry) from the fileset whose file exists for the file open operation. Then performs a file &amp;#039;&amp;#039;open&amp;#039;&amp;#039; operation on the filesetentry&amp;#039;s associated file. The file can be created with &amp;#039;&amp;#039;direct&amp;#039;&amp;#039; (as opposed to &amp;#039;&amp;#039;buffered&amp;#039;&amp;#039;) I/O by including the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; attribute and writes can be forced to behave as defined by synchronized I/O data integrity constraints by setting the &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop openfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,directio] [,dsync] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== closefile =====&lt;br /&gt;
&lt;br /&gt;
Emulate close of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Simply does a &amp;#039;&amp;#039;close&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop closefile name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsync =====&lt;br /&gt;
&lt;br /&gt;
Emulates fsync of a file. The file referenced by the &amp;#039;&amp;#039;fd&amp;#039;&amp;#039; attribute (if it is supplied) or by the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039;, must be open. Doing an fsync on an ordinary file (fileobj) works with &amp;quot;fd=0&amp;quot; (or &amp;quot;fd&amp;quot; not set).   Simply does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on the referenced file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsync name=&amp;lt;name&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== fsyncset =====&lt;br /&gt;
&lt;br /&gt;
Emulate fsync of an entire fileset. Does an &amp;#039;&amp;#039;fsync&amp;#039;&amp;#039; operation on every open file of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop fsyncset name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== statfile =====&lt;br /&gt;
&lt;br /&gt;
Emulate stat of a file. Picks an arbitrary fileset entry with an existing file from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, then performs a stat() operation on it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop statfile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=file-desc-number] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== deletefile =====&lt;br /&gt;
&lt;br /&gt;
Emulates delete of a file. Picks either an arbitrary, index specified, or file-descriptor-number specified, filesetentry whose file exists from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and deletes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop deletefile name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;file-desc-number&amp;gt;] [,index=&amp;lt;file-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Directory Flowops ====&lt;br /&gt;
&lt;br /&gt;
Making, Listing and removing directories. The fileset must have been defined to include empty directory entries in addition to or instead of files. Specific directories can be accessed by passing a directory index number to the flowop, which can be obtained from a random variable to provide random directory accesses. Otherwise directories will be accessed round robin style.&lt;br /&gt;
&lt;br /&gt;
===== MakeDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;mkdir&amp;#039;&amp;#039; command. Picks either an arbitrary or index specified filesetentry for a directory which not exist in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and makes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop makedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== ListDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates &amp;#039;&amp;#039;ls&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and lists it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop listdir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== RemoveDir =====&lt;br /&gt;
&lt;br /&gt;
Emulates an &amp;#039;&amp;#039;rm&amp;#039;&amp;#039; of a directory. Picks either an arbitrary or index specified filesetentry for a directory which exists in storage from the fileset specified by the &amp;#039;&amp;#039;fileset&amp;#039;&amp;#039; attribute, and removes it.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop removedir name=&amp;lt;name&amp;gt;,fileset=&amp;lt;fname&amp;gt; [,fd=&amp;lt;directory-desc-number&amp;gt;] [,index=&amp;lt;directory-index&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Asynchronous I/O Operations ====&lt;br /&gt;
&lt;br /&gt;
Filebench supports asynchronous writes and implements a mechanism to wait for their completion. An Asynchronous I/O (aio) element is used to associate the asynchronous write request with its subsequent completion. An &amp;#039;&amp;#039;aiowrite&amp;#039;&amp;#039; flowop will add an aio to the thread&amp;#039;s aio list, An &amp;#039;&amp;#039;aiowait&amp;#039;&amp;#039; flowop will wait for half the current list to complete (minimum of 1), removing completed ones from the list.&lt;br /&gt;
&lt;br /&gt;
===== aiowrite =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowrite(). The size of the write is specified by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute. If a fileset is specified, it writes to a file from the fileset referenced by the fd attribute, if it is supplied, to the default &amp;#039;&amp;#039;fd=0&amp;#039;&amp;#039; file, or to the next file of the sequence if the &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is set. If a &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute is supplied instead, it will write to the named file. If the file is not already open, this flowop will open it, using the &amp;#039;&amp;#039;directio&amp;#039;&amp;#039; and &amp;#039;&amp;#039;dsync&amp;#039;&amp;#039; attributes as described for the &amp;#039;&amp;#039;openfile&amp;#039;&amp;#039; flowop. The flowop&amp;#039;s &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute  will be used to set the maximum file size if it is non-zero, otherwise the filesetentry&amp;#039;s fse_size will be used. The flowop issues the asynchronous write from a random offset in the threadflow&amp;#039;s thread memory, with a size set by the &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute and at a random disk offset within the working set size.  This operation is currently only valid for random I/O, and returns an error if the flowop is set for sequential I/O. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowrite name=&amp;lt;name&amp;gt;,  filename|fileset=&amp;lt;fname&amp;gt;, iosize=&amp;lt;size&amp;gt;, random  [,directio] [,dsync] [,iters=&amp;lt;count&amp;gt;]  [,opennext] [,workingset=&amp;lt;size&amp;gt;] [,fd=&amp;lt;file desc num&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== aiowait =====&lt;br /&gt;
&lt;br /&gt;
Emulate posix aiowait(). Waits for the completion of half the outstanding asynchronous I/Os, or a single I/O, which ever is larger. The routine will return after a sufficient number of asynchronous writes issued by any thread in the procflow have completed, or a 1 second time-out elapses. All completed I/O operations are deleted from the thread&amp;#039;s list of asynchronous I/Os in progress.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop aiowait name=&amp;lt;name&amp;gt;,target=&amp;lt;aiowrite-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Synchronization Operations ====&lt;br /&gt;
&lt;br /&gt;
===== block =====&lt;br /&gt;
&lt;br /&gt;
Blocks the threadflow until woken up by the &amp;#039;&amp;#039;wakeup&amp;#039;&amp;#039; flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop block name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== wakeup =====&lt;br /&gt;
&lt;br /&gt;
Wakes up one or more blocked target flowops. The set of targets consists of all flowops whose name matches this flowop&amp;#039;s &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop wakeup name=&amp;lt;name&amp;gt;,target=&amp;lt;block-flowop&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== semblock =====&lt;br /&gt;
&lt;br /&gt;
Attempts to pass a semaphore and blocks if necessary. Can be compiled to use either System V or posix semaphores, but the System V semaphore version is produced by the currently set source code defines.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock name=&amp;lt;name&amp;gt;, value=&amp;lt;decrement-to-receive&amp;gt;, highwater=&amp;lt;inbound-queue-max&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== sempost =====&lt;br /&gt;
&lt;br /&gt;
Post to a set of &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; flowops identified by the &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute. Either System V or posix semaphores are used, as described for semblock.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost name=&amp;lt;name&amp;gt;, target=&amp;lt;semblock-flowop&amp;gt;, value=&amp;lt;increment-to-post&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flowop Misc Operation ====&lt;br /&gt;
&lt;br /&gt;
===== hog =====&lt;br /&gt;
&lt;br /&gt;
Consumes CPU cycles and memory bandwidth by looping for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; iterations, while setting the first byte of the thread&amp;#039;s memory region to 1 on each iteration.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop hog name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-mem-ops&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== delay =====&lt;br /&gt;
&lt;br /&gt;
Delays for &amp;#039;&amp;#039;value&amp;#039;&amp;#039; number of seconds using the user sleep routine.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop delay name=&amp;lt;name&amp;gt;,value=&amp;lt;number-of-seconds&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== eventlimit =====&lt;br /&gt;
&lt;br /&gt;
Completes one invocation per posted event. If events are available, it removes one and continues to the next flowop, otherwise it blocks until one or more new events are posted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop eventlimit name=&amp;lt;name&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== bwlimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of bytes of I/O issued exceeds one megabyte times the number of posted events, thus limiting the average I/O byte rate to one megabyte times the event rate.  To set the event rate see [http://www.solarisinternals.com/wiki/index.php/FileBench_Workload_Language#rate rate]. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop bwlimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== iopslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued I/O operations exceeds the number of posted events, thus limiting the average I/O operation rate to one I/O per event. If a target flowop is specified than the i/o operations produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop iopslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== opslimit =====&lt;br /&gt;
&lt;br /&gt;
Blocks the calling thread if the number of issued filebench operations exceeds the number of posted events, thus limiting the average filebench operation rate to one per event. If a target flowop is specified than the operations (generally number of times called) produced by that particular flowop (separately for each thread) sets the limit.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop opslimit name=&amp;lt;name&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishoncount =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of I/O operations specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been performed. If a target flowop is specified than the operations count produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishoncount name=&amp;lt;name&amp;gt;,value=&amp;lt;ops/s&amp;gt;,[target=&amp;lt;any-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== finishonbytes =====&lt;br /&gt;
&lt;br /&gt;
Stops the filebench run when the number of bytes of I/O specified by &amp;#039;&amp;#039;value&amp;#039;&amp;#039; have been read and/or written. If a target flowop is specified than the i/o bandwidth produced by that particular flowop (separately for each thread) determines when to stop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop finishonbytes name=&amp;lt;name&amp;gt;,value=&amp;lt;bytes&amp;gt;,[target=&amp;lt;io-producing-flowop]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
&lt;br /&gt;
The behavior of processes, threads and flowops can be modified by supplying them with attributes. Some attributes are required, others are optional and have default values which will be used if they are not supplied. Some attributes are booleans, that is they are true if supplied and false if not. Other attributes take numeric or string values, sometimes with default values if a value is not supplied. The supplied values may either be a constant string or integer, as appropriate, or may be a string or integer variable which has had a value assigned to it by a &amp;#039;&amp;#039;set&amp;#039;&amp;#039; command. For example, directing a fileset to pre allocate 100% of its files can be done by any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define fileset name=foo, prealloc&lt;br /&gt;
&lt;br /&gt;
define fileset name=foo, prealloc=100&lt;br /&gt;
&lt;br /&gt;
set $preallocpercent = 100&lt;br /&gt;
define fileset name=foo, prealloc=$preallocpercent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this section, &amp;#039;&amp;#039;&amp;lt;intval&amp;gt;&amp;#039;&amp;#039; will be used to designate either an integer or an integer variable, wile &amp;#039;&amp;#039;&amp;lt;strval&amp;gt;&amp;#039;&amp;#039; will be used to designate either a string or a string variable.&lt;br /&gt;
&lt;br /&gt;
==== cached ====&lt;br /&gt;
&lt;br /&gt;
When specified, this attribute prevents the filesystem caches from being flushed after file or fileset creation or reuse. If not specified, filebench will attempt to flush filesystem caches so as to prevent a workload&amp;#039;s I/Os from running completely out of filesystem cache.&lt;br /&gt;
&lt;br /&gt;
Note: for ZFS we will still do the &amp;#039;zpool export/import&amp;#039; (via the &amp;#039;fs_flush&amp;#039; script to get rid of the cached copy in the ARC) even if &amp;quot;cached&amp;quot; is set to true.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,cached ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirwidth ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirwidth&amp;#039;&amp;#039; attribute of a fileset specifies the average number of entries in each directory created as part of the fileset. Filebench also uses this in combination with the total number of files in the fileset to calculate the required mean depth of the fileset&amp;#039;s directory tree. The default is a dirwidth of 0, which specifies a single level directory containing all the files of the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirwidth=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dirgamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;dirgamma&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter of the gamma distribution which will be used to decide whether a given subdirectory contains files or additional subdirectories. If the dirgamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,dirgamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== namelength ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;namelength&amp;#039;&amp;#039; attribute is not presently supported.&lt;br /&gt;
&lt;br /&gt;
==== filesize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a file or fileset specifies the size of file(s) that will be created. If a fileset and filegamma has been specified as other than 0, the filesize attribute will actually specify the mean file size, with the actual size of each file based on the gamma distribution with alpha based on the filegamma attribute.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,filesize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesizegamma ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute of a fileset specifies the alpha parameter for the gamma distribution used to select the sizes of each file created as part of a fileset, where the mean file size is specified by the &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; attribute. If the filesizegamma attribute is set to zero, all files will be created with &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; number of bytes. This attribute also specifies the mean width of each created subdirectory, with the actual width selected from a gamma distribution with alpha of dirgamma. If the filesizegamma attribute is not specified, it defaults to 1500. The value can range from 100 to 10000, and the corresponds to a gamma of 0.1 to 10.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,filesizegamma=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== directio ====&lt;br /&gt;
&lt;br /&gt;
Specifies opening the file in direct, rather than buffered, I/O mode. Essentially bypasses filesystem caches, so each I/O request results in an actual I/O to the attached device. Needs to be specified with the flowop that opens the file, which is often openfile, but can be one of the other I/O flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,directio&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== dsync ====&lt;br /&gt;
&lt;br /&gt;
Specifies the use of synchronous writes, which do not complete until the attached device has written the data to non volatile storage. Not only does this disable filesystem write back caching, it also is supposed to prevent device (such as an attached disk drive) from doing write back caching. This attribute needs to be specified with all flowops that might open the file, as the file must be opened as a synchronous file for this attribute to be effective. While openfile is often used for that purpose, any of the other flowops will open a file if it is not already open, so they may need the attribute defined as well.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,dsync&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== fd ====&lt;br /&gt;
&lt;br /&gt;
The fd parameter to the flowop clause is used to explicitly set the file descriptor on which the file is opened. This is useful where the script is used to emulate an application that has a number of files open on different descriptors or does involved opens/closes using a limited or extended range of descriptors. In the example, an arbitrary file from the file bigfileset is opened by the first flowop, and assigned file descriptor 1. The read flowop which follows also references file descriptor 1, so it will read whichever file was opened by the first flowop. Finally, the closefile flowop will close the file referenced by file descriptor 1.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop read name=readfile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile,fd=1&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,fd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srcfd ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;srcfd&amp;#039;&amp;#039; attribute specifies the file descriptor to use as a source of &amp;#039;&amp;#039;filesize&amp;#039;&amp;#039; information when invoking the writewholefile flowop. In the example below the code is emulating a copy file operation, where the file is read in then written out to a new file, which, of course, would end up with the same size as the original.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
thread name=filereaderthread,memsize=10m,instances=$nthreads&lt;br /&gt;
  {&lt;br /&gt;
    flowop openfile name=openfile1,filesetname=bigfileset,fd=1&lt;br /&gt;
    flowop readwholefile name=readfile1,fd=1&lt;br /&gt;
    flowop createfile name=createfile2,filesetname=destfiles,fd=2&lt;br /&gt;
    flowop writewholefile name=writefile2,filesetname=destfiles,fd=2,srcfd=1&lt;br /&gt;
    flowop closefile name=closefile1,fd=1&lt;br /&gt;
    flowop closefile name=closefile2,fd=2&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop writewholefile ... ,srcfd=&amp;lt;integer&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== opennext ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;opennext&amp;#039;&amp;#039; attribute is used with I/O flowops to indicate that the flowop should open a different file with each invocation. This attribute only applies to filesets and is meaningless when used with a simple file.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,opennext&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filename ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filename&amp;#039;&amp;#039; attribute specifies the name of a file. It is used with I/O flowops to specify which particular file to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | appendfile | appendfilerand ... ,filename=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== filesetname ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;filesetname&amp;#039;&amp;#039; attribute specifies the name of a fileset. It is used with I/O flowops to specify which particular fileset to access.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | openfile | write | writewholefile | appendfile | appendfilerand ... ,filesetname=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== instances ====&lt;br /&gt;
&lt;br /&gt;
When process and threads are specified using the &amp;#039;&amp;#039;define&amp;#039;&amp;#039; command, the &amp;#039;&amp;#039;instances&amp;#039;&amp;#039; attribute may be used so request multiple copies of the defined process or threads. If used with the process definition, the requested number of operating system processes will be created, each with its own copy of the threads and flowops included in the definition. Similarly, if used with a thread definition, the requested number of threads will be created for each operating system process, each with its own copy of the specified flowops. If the &amp;#039;&amp;#039;instance&amp;#039;&amp;#039; flowop is not included, then a single instance of the process or thread is created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define process name=&amp;lt;procname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
threads name=&amp;lt;threadname&amp;gt; ... ,instances=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iosize ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;iosize&amp;#039;&amp;#039; attribute is used with I/O commands to specify the size of the I/O operations (i.e. disk reads) that they will perform. It defaults to zero if omitted.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read|aiowrite|openfile|write|appendfile|appendfilerand ... ,iosize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== iters ====&lt;br /&gt;
&lt;br /&gt;
Individual flowops may be executed multiple times each time they are invoked by setting the &amp;#039;&amp;#039;iters&amp;#039;&amp;#039; attribute to the desired number of executions. If not specified, the flowop will only be executed once each time it is invoked.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,iters=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== memsize ====&lt;br /&gt;
&lt;br /&gt;
This parameter in the thread clause sets the size of the private memory segment of the thread.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define process name=filewriter,instances=1&lt;br /&gt;
{&lt;br /&gt;
  thread name=filewriterthread,memsize=10m,instances=1&lt;br /&gt;
  {&lt;br /&gt;
    flowop ....&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,memsize=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== name ====&lt;br /&gt;
&lt;br /&gt;
Files, filesets, processes, threads and flowops all require names, which are set with the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; attribute. Names must be globally unique within an entity type. Thus if you have two processes, each of which has a read type flowop, you must make sure that both read flowops have unique names, such as name=read1 name=read2.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file|define fileset|define process|thread|flowop name=&amp;lt;strval&amp;gt; ...&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== nice ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; attribute allows you to lower the priority of the process (or set of processes if multiple instances are requested) below that of what it otherwise would be. Note that all processes are automatically set to a lower priority than the master process controlling the run. But if you want a particular process to be at a lower priority than the others, specify &amp;#039;&amp;#039;nice&amp;#039;&amp;#039; with some integer value to accomplish this.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
process ... ,nice=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== entries ====&lt;br /&gt;
&lt;br /&gt;
Filesets are typically used to create a group of files, and the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is used to set the number of such files. If the &amp;#039;&amp;#039;entries&amp;#039;&amp;#039; attribute is not specified, only one file will be created.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,entries=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== prealloc ====&lt;br /&gt;
&lt;br /&gt;
The files defined by the file or fileset entities can either exist as potential files or actual ones. As a potential one, information about them is kept by the file or fileset entity, but the do not occupy disk space or exist in a directory. If they do not exist they can be created later with the &amp;#039;&amp;#039;creatfile&amp;#039;&amp;#039; flowop. When used with a file, the &amp;#039;&amp;#039;prealloc&amp;#039;&amp;#039; attribute specifies that the file should actually exist. When used with a fileset, it specifies the percentage of files that should actually exist, with a default value of 100%.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,prealloc[=&amp;lt;intval&amp;gt;]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== paralloc ====&lt;br /&gt;
&lt;br /&gt;
Use of this attribute can speed up the pre allocation of files, by creating and writing them in parallel. However, it only works with files at present, not filesets.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file ... ,paralloc&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== reuse ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;reuse&amp;#039;&amp;#039; attribute allows the reuse of existing files or filesets which have the same name as the specified file or fileset. If the file is too large it will be truncated, and if it is too small it will be rewritten. A fileset with a matching name will also be reused, with individual files adjusted to match their new specified sizes.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,reuse&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== path ====&lt;br /&gt;
&lt;br /&gt;
The path directive is used in the fileset clause to set the prefix path for the dataset. It is often set at the head of the script or passed in as a parameter:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set $dir=/tmp&lt;br /&gt;
define fileset name=myset,path=$dir,size=16k,entries=1000,dirwidth=20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define fileset ... ,path=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== random ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;random&amp;#039;&amp;#039; attribute is used with the read, write and aiowrite flowops to specify that a random location within the file be picked for access. Without this attribute, the next sequential file blocks will be read or written.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write ... ,random&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== rate ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;rate&amp;#039;&amp;#039; attribute is used to set the event generation rate for the event generator as part of the &amp;#039;&amp;#039;eventgen&amp;#039;&amp;#039; command.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
eventgen rate=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== size ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;size&amp;#039;&amp;#039; attribute is used with the define file and define fileset commands. For define file it sets the size of the file. For define fileset, it sets the mean size of the files, with the actual size set by the gamma random distribution specified for the fileset.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
define file | fileset ... ,size=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== target ====&lt;br /&gt;
&lt;br /&gt;
Certain flowops depend on actions in other flowops, in which case they need a &amp;#039;&amp;#039;target&amp;#039;&amp;#039; attribute to tell them the name of the flowop on which they are depending. A prime example is the semaphore flowops, as illustrated in the following example from the oltp.f workload:&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop semblock name=lg-block,value=3200,highwater=1000&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
    flowop sempost name=shadow-post-lg,value=1,target=lg-block,blocking&lt;br /&gt;
&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Here the sempost flowop has a target of lg-block, the name of the associated semblock flowop. The actual semaphore is created by the semblock flowop, but the sempost flowop will use the &amp;#039;&amp;#039;lg-block&amp;#039;&amp;#039; target to find it and do the requested post operation on it.&lt;br /&gt;
 &lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,target=&amp;lt;strval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== useism ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;useism&amp;#039;&amp;#039; attribute tells the thread to use shared memory for its thread memory region.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
thread ... ,useism&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== value ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;value&amp;#039;&amp;#039; attribute is used for passing miscellaneous integer values to the flowops. The exact meaning is dependent on the particular use.&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop ... ,value=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== workingset ====&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;workingset&amp;#039;&amp;#039; attribute is used by some I/O flowops to specify a maximum byte range of the file that will actually be read from or written to. This can be less than the actual file size, or for writes may also be larger than the current size, where it serves to set the maximum size the file can grow to.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop read | aiowrite | write | appendfile | appendfilerand ... workingset=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== blocking ====&lt;br /&gt;
&lt;br /&gt;
Used with semaphore flowops.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop sempost|semblock ... ,blocking&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== highwater ====&lt;br /&gt;
&lt;br /&gt;
Used with the &amp;#039;&amp;#039;semblock&amp;#039;&amp;#039; semaphore flowop.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
flowop semblock ... ,highwater=&amp;lt;intval&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Debug Commands ==&lt;br /&gt;
&lt;br /&gt;
This section lists commands that are mainly used for debugging.&lt;br /&gt;
&lt;br /&gt;
=== list ===&lt;br /&gt;
&lt;br /&gt;
Depending on the argument, the &amp;#039;&amp;#039;list&amp;#039;&amp;#039; command either prints information about all defined files or flowops. &lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Syntax:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
list fileset&lt;br /&gt;
&lt;br /&gt;
list flowop&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== debug ===&lt;br /&gt;
&lt;br /&gt;
Sets the verbosity of debugging level. Allowed values are from 0 to 10. The higher the value the more debugging information is printed. By default this is set to 2 at the startup.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;90%&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|align=&amp;quot;left&amp;quot; |&amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
debug 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Vass-vass</name></author>	</entry>

	</feed>