xref: /onnv-gate/usr/src/cmd/filebench/workloads/videoserver.f (revision 9801:4a9784073e11)
17946SAndrew.W.Wilson@sun.com#
27946SAndrew.W.Wilson@sun.com# CDDL HEADER START
37946SAndrew.W.Wilson@sun.com#
47946SAndrew.W.Wilson@sun.com# The contents of this file are subject to the terms of the
57946SAndrew.W.Wilson@sun.com# Common Development and Distribution License (the "License").
67946SAndrew.W.Wilson@sun.com# You may not use this file except in compliance with the License.
77946SAndrew.W.Wilson@sun.com#
87946SAndrew.W.Wilson@sun.com# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97946SAndrew.W.Wilson@sun.com# or http://www.opensolaris.org/os/licensing.
107946SAndrew.W.Wilson@sun.com# See the License for the specific language governing permissions
117946SAndrew.W.Wilson@sun.com# and limitations under the License.
127946SAndrew.W.Wilson@sun.com#
137946SAndrew.W.Wilson@sun.com# When distributing Covered Code, include this CDDL HEADER in each
147946SAndrew.W.Wilson@sun.com# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157946SAndrew.W.Wilson@sun.com# If applicable, add the following below this CDDL HEADER, with the
167946SAndrew.W.Wilson@sun.com# fields enclosed by brackets "[]" replaced with your own identifying
177946SAndrew.W.Wilson@sun.com# information: Portions Copyright [yyyy] [name of copyright owner]
187946SAndrew.W.Wilson@sun.com#
197946SAndrew.W.Wilson@sun.com# CDDL HEADER END
207946SAndrew.W.Wilson@sun.com#
217946SAndrew.W.Wilson@sun.com#
22*9801SAndrew.W.Wilson@sun.com# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237946SAndrew.W.Wilson@sun.com# Use is subject to license terms.
247946SAndrew.W.Wilson@sun.com#
257946SAndrew.W.Wilson@sun.com# This workloads emulates a video server. It has two filesets, one of videos
267946SAndrew.W.Wilson@sun.com# being actively served, and one of videos availabe but currently inactive
277946SAndrew.W.Wilson@sun.com# (passive). However, one thread, vidwriter, is writing new videos to replace
287946SAndrew.W.Wilson@sun.com# no longer viewed videos in the passive set. Meanwhile $nthreads threads are
297946SAndrew.W.Wilson@sun.com# serving up videos from the activevids fileset. If the desired rate is R mb/s,
307946SAndrew.W.Wilson@sun.com# and $nthreads is set to T, then set the $srvbwrate to R * T to get the
317946SAndrew.W.Wilson@sun.com# desired rate per video stream. The video replacement rate of one video
327946SAndrew.W.Wilson@sun.com# file per replacement interval, is set by $repintval which defaults to
337946SAndrew.W.Wilson@sun.com# 10 seconds. Thus the write bandwidth will be set as $filesize/$repintval.
347946SAndrew.W.Wilson@sun.com
357946SAndrew.W.Wilson@sun.comset $dir=/tmp
36*9801SAndrew.W.Wilson@sun.comset $eventrate=96
377946SAndrew.W.Wilson@sun.comset $filesize=10g
387946SAndrew.W.Wilson@sun.comset $nthreads=48
397946SAndrew.W.Wilson@sun.comset $numactivevids=32
407946SAndrew.W.Wilson@sun.comset $numpassivevids=194
418404SAndrew.W.Wilson@sun.comset $reuseit=false
428404SAndrew.W.Wilson@sun.comset $readiosize=256k
438404SAndrew.W.Wilson@sun.comset $writeiosize=1m
448404SAndrew.W.Wilson@sun.com#
458404SAndrew.W.Wilson@sun.comset $passvidsname=passivevids
468404SAndrew.W.Wilson@sun.comset $actvidsname=activevids
478404SAndrew.W.Wilson@sun.com#
488404SAndrew.W.Wilson@sun.comset $repintval=10
497946SAndrew.W.Wilson@sun.com
50*9801SAndrew.W.Wilson@sun.comeventgen rate=$eventrate
517946SAndrew.W.Wilson@sun.com
528404SAndrew.W.Wilson@sun.comdefine fileset name=$actvidsname,path=$dir,size=$filesize,entries=$numactivevids,dirwidth=4,prealloc,paralloc,reuse=$reuseit
538404SAndrew.W.Wilson@sun.comdefine fileset name=$passvidsname,path=$dir,size=$filesize,entries=$numpassivevids,dirwidth=20,prealloc=50,paralloc,reuse=$reuseit
547946SAndrew.W.Wilson@sun.com
557946SAndrew.W.Wilson@sun.comdefine process name=vidwriter,instances=1
567946SAndrew.W.Wilson@sun.com{
577946SAndrew.W.Wilson@sun.com  thread name=vidwriter,memsize=10m,instances=1
587946SAndrew.W.Wilson@sun.com  {
598404SAndrew.W.Wilson@sun.com    flowop deletefile name=vidremover,filesetname=$passvidsname
608404SAndrew.W.Wilson@sun.com    flowop createfile name=wrtopen,filesetname=$passvidsname,fd=1
617946SAndrew.W.Wilson@sun.com    flowop writewholefile name=newvid,iosize=$writeiosize,fd=1,srcfd=1
627946SAndrew.W.Wilson@sun.com    flowop closefile name=wrtclose, fd=1
637946SAndrew.W.Wilson@sun.com    flowop delay name=replaceinterval, value=$repintval
647946SAndrew.W.Wilson@sun.com  }
657946SAndrew.W.Wilson@sun.com}
667946SAndrew.W.Wilson@sun.com
677946SAndrew.W.Wilson@sun.comdefine process name=vidreaders,instances=1
687946SAndrew.W.Wilson@sun.com{
697946SAndrew.W.Wilson@sun.com  thread name=vidreaders,memsize=10m,instances=$nthreads
707946SAndrew.W.Wilson@sun.com  {
718404SAndrew.W.Wilson@sun.com    flowop read name=vidreader,filesetname=$actvidsname,iosize=$readiosize
727946SAndrew.W.Wilson@sun.com    flowop bwlimit name=serverlimit, target=vidreader
737946SAndrew.W.Wilson@sun.com  }
747946SAndrew.W.Wilson@sun.com}
757946SAndrew.W.Wilson@sun.com
76*9801SAndrew.W.Wilson@sun.comecho  "Video Server Version 1.1 personality successfully loaded"
777946SAndrew.W.Wilson@sun.comusage "Usage: set \$dir=<dir>              defaults to $dir"
78*9801SAndrew.W.Wilson@sun.comusage "       set \$eventrate=<value>      defaults to $eventrate"
797946SAndrew.W.Wilson@sun.comusage "       set \$filesize=<size>        defaults to $filesize"
807946SAndrew.W.Wilson@sun.comusage "       set \$nthreads=<value>       defaults to $nthreads"
817946SAndrew.W.Wilson@sun.comusage "       set \$writeiosize=<value>    defaults to $writeiosize"
827946SAndrew.W.Wilson@sun.comusage "       set \$readiosize=<value>     defaults to $readiosize"
837946SAndrew.W.Wilson@sun.comusage "       set \$numactivevids=<value>  defaults to $numactivevids"
847946SAndrew.W.Wilson@sun.comusage "       set \$numpassivevids=<value> defaults to $numpassivevids"
857946SAndrew.W.Wilson@sun.comusage " "
867946SAndrew.W.Wilson@sun.comusage "       run runtime (e.g. run 60)"
877946SAndrew.W.Wilson@sun.com
88