Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

105 lines (91 sloc) 3.74 KB
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "@prefix@/share/@PACKAGE_NAME@/@DTD@">
<tsung loglevel="notice" dumptraffic="false">
<!-- Get clients from torque batch manager. Ideally, we need 256 cores to do this test. -->
<client type="batch" batch="torque" maxusers="8000"/>
<!-- server is not used by fs plugin, so this is meaningless -->
<server host="" port="5432" type="erlang"/>
<monitor batch="true" host="torque" type="erlang"/>
<monitor host="nef-server" type="munin"/>
<!-- 4 phases, from 32 to 256 simultaneous users -->
<arrivalphase phase="1" duration="10" unit="minute">
<users maxnumber="32" arrivalrate="10" unit="second"/>
<arrivalphase phase="2" duration="20" unit="minute">
<users maxnumber="64" arrivalrate="10" unit="second"/>
<arrivalphase phase="3" duration="30" unit="minute">
<users maxnumber="128" arrivalrate="10" unit="second"/>
<arrivalphase phase="4" duration="45" unit="minute">
<users maxnumber="256" arrivalrate="10" unit="second"/>
<!-- Use the same seed for each test -->
<option name="seed" value="43"/>
<session probability="100" name="fs-example" type="ts_fs">
<!-- First create a directory for the current user -->
<transaction name="mkdir">
<request subst="true">
<fs cmd="make_dir" path="/mnt/bench/%%_tsung_userid%%"/>
<!-- Then write 100 files (6.5MB per file) sequentially-->
<for from="1" to="100" var="file" incr="1">
<transaction name="write_file">
<request subst="true">
<fs cmd="open" mode="write" path="/mnt/bench/%%_tsung_userid%%/tsung-write.bin.%%_file%%"/>
<for from="0" to="100" var="chunk" incr="1">
<request><fs cmd="write_chunk" size="65536"/></request>
<request><fs cmd="close"/></request>
<thinktime random='false' value="1"/>
<!-- Get an id of a users from another node to avoid cache effects on the
client side. Here we assume that each client machine has 8 cores -->
<setdynvars sourcetype="eval" code="fun({Pid,DynVars})->
{ok,Val} = ts_dynvars:lookup(tsung_userid,DynVars),
{Id,Mod} = case list_to_integer(Val) of
I when I > 128 -> {I,256};
I when I > 64 -> {I,128};
I when I > 32 -> {I,64};
I -> {I,32}
case Id &lt; 9 of
true -> (abs(Id+8) rem Mod) +1;
_ ->
(abs(Id-9) rem Mod) +1
<var name="previd"/>
<!-- Wait 30 sec -->
<thinktime min="30" max="31"/>
<!-- Read 100 files from another tsung user, using the computed id -->
<for from="1" to="100" var="file" incr="1">
<transaction name="read_file">
<request subst="true">
<fs cmd="open" mode="read" path="/mnt/bench/%%_previd%%/tsung-write.bin.%%_file%%"/>
<for from="1" to="100" var="chunk" incr="1">
<request><fs cmd="read_chunk" size="65536"/></request>
<request><fs cmd="close"/></request>
<thinktime random='false' value="1"/>
Jump to Line
Something went wrong with that request. Please try again.