Demetri,
   As I said in my previous answer, the way the rest of us do what you 
want to do is through .prof scripts interpreted by filebench.pl. Each 
entry in the profile script causes  go_filebench to be run, modified 
with any changes specified. For example:

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

DEFAULTS {
        runtime = 120;
        dir = /filebench/local;
        stats =/tmp;
        filesystem = ufs;
        description = "randomwrite ufs";
}

CONFIG randwrite8k {
        function = generic;
        personality = randomwriter;
        filesize = 128m;
        nthreads = 1;
        iosize = 8k;
}

CONFIG randwrite16k {
        function = generic;
        personality = randomwriter;
        filesize = 128m;
        nthreads = 1;
        iosize = 16k;
}

CONFIG randwrite64k {
        function = generic;
        personality = randomwriter;
        filesize = 128m;
        nthreads = 1;
        iosize = 64k;
}

CONFIG randwrite8k10t {
        function = generic;
        personality = randomwriter;
        filesize = 128m;
        nthreads = 10;
        iosize = 8k;
}

CONFIG randwrite16k10t {
        function = generic;
        personality = randomwriter;
        filesize = 128m;
        nthreads = 10;
        iosize = 16k;
}

CONFIG randwrite64k10t {
        function = generic;
        personality = randomwriter;
        filesize = 128m;
        nthreads = 10;
        iosize = 64k;
}

Separately, randomwriter.f would have your code, slightly modified as 
follows:

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

define file name=data, path=$dir, size=$filesize, prealloc, reuse

define process name=randWriteProcess,instances=1
{
   thread name=randWriteThread,memsize=8m,instances=$nthreads
   {
      flowop write name=randWriter1,filename=data,iosize=$iosize,random
   }
}


typing: /opt/filebench/bin/filebench randwriter

will run randwriter.prof (assuming that is what you named it), which 
will cause go_filebench to run six times using randwriter.f with i/o 
sizes of 8k, 16k and 64k, and 1 and 10 threads.

An added advantage is that you start out with a new instance of 
go_filebench each time, and the six sets of results are compiled into a 
convenient html document for viewing.

Drew

On 12/15/08 11:54 AM, Demetri S. Mouratis wrote:
> Hi Drew,
>
> It *sorta* works if I create processes before the loop (and use Rich's 
> suggestion of sleep 10 instead of run 10):
>
>   create files
>   create processes
>   foreach $iosize in 8k, 16k, 64k
>   {
>     stats clear
>     sleep $runtime
>     stats snap
>   }
>   shutdown processes
>   quit
>
> ...but then I can't iterate over number of threads because they're fixed at 
> create process time.  I tried creating processes at the start of the loop and 
> then shutdown processes before the closing brace, but then it hangs again.
>
> Also, none of this works in the 'config harness' method.  So maybe I'll just 
> unroll the loops and enumerate each run in the config harness .conf file 
> instead of fighting the foreach battle.
>
> Meanwhile, I'm deep into disk testing right now, so if you shake free to work 
> on loops, I'd be happy to help test!
>
> ...Demetri
>   

_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to