]> git.saurik.com Git - apple/xnu.git/blame - tools/tests/libMicro/bench.sh
xnu-1504.3.12.tar.gz
[apple/xnu.git] / tools / tests / libMicro / bench.sh
CommitLineData
b0d623f7
A
1#!/bin/sh
2#
3#
4# CDDL HEADER START
5#
6# The contents of this file are subject to the terms
7# of the Common Development and Distribution License
8# (the "License"). You may not use this file except
9# in compliance with the License.
10#
11# You can obtain a copy of the license at
12# src/OPENSOLARIS.LICENSE
13# or http://www.opensolaris.org/os/licensing.
14# See the License for the specific language governing
15# permissions and limitations under the License.
16#
17# When distributing Covered Code, include this CDDL
18# HEADER in each file and include the License file at
19# usr/src/OPENSOLARIS.LICENSE. If applicable,
20# add the following below this CDDL HEADER, with the
21# fields enclosed by brackets "[]" replaced with your
22# own identifying information: Portions Copyright [yyyy]
23# [name of copyright owner]
24#
25# CDDL HEADER END
26#
27
28#
29# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
30# Use is subject to license terms.
31#
32
33tattle="./tattle"
34
35bench_version=0.4.0
36libmicro_version=`$tattle -V`
37
38case $libmicro_version in
39$bench_version)
40 ;;
41*)
42 echo "ERROR: libMicro version doesn't match 'bench' script version"
43 exit 1
44esac
45
46TMPROOT=/private/tmp/libmicro.$$
47VARROOT=/private/var/tmp/libmicro.$$
48mkdir -p $TMPROOT
49mkdir -p $VARROOT
50trap "rm -rf $TMPROOT $VARROOT && exit" 0 2
51
52TFILE=$TMPROOT/data
53IFILE=$TMPROOT/ifile
54TDIR1=$TMPROOT/0/1/2/3/4/5/6/7/8/9
55TDIR2=$TMPROOT/1/2/3/4/5/6/7/8/9/0
56VFILE=$VARROOT/data
57VDIR1=$VARROOT/0/1/2/3/4/5/6/7/8/9
58VDIR2=$VARROOT/1/2/3/4/5/6/7/8/9/0
59
60
61OPTS="-E -C 200 -L -S -W"
62
63dd if=/dev/zero of=$TFILE bs=1024k count=10 2>/dev/null
64dd if=/dev/zero of=$VFILE bs=1024k count=10 2>/dev/null
65mkdir -p $TDIR1 $TDIR2
66mkdir -p $VDIR1 $VDIR2
67
68touch $IFILE
69/usr/bin/touch /private/var/tmp/lmbench
70
71
72# produce benchmark header for easier comparisons
73
74hostname=`uname -n`
75
76if [ -f /usr/sbin/psrinfo ]; then
77 p_count=`psrinfo|wc -l`
78 p_mhz=`psrinfo -v | awk '/operates/{print $6 "MHz"; exit }'`
79 p_type=`psrinfo -vp 2>/dev/null | awk '{if (NR == 3) {print $0; exit}}'`
80 p_ipaddr=`getent hosts $hostname | awk '{print $1}'`
81fi
82
83if [ -f /proc/cpuinfo ]; then
84 p_count=`egrep processor /proc/cpuinfo | wc -l`
85 p_mhz=`awk -F: '/cpu MHz/{printf("%5.0f00Mhz\n",$2/100); exit}' /proc/cpuinfo`
86 p_type=`awk -F: '/model name/{print $2; exit}' /proc/cpuinfo`
87 p_ipaddr=`getent hosts $hostname | awk '{print $1}'`
88else
89## Mac OS X specific stuff
90# first, get ugly output, in case pretty output isn't available
91#
92 p_count=`sysctl -n hw.physicalcpu`
93 p_mhz=`sysctl -n hw.cpufrequency`
94 p_type=`sysctl -n hw.model`
95
96if [ -x /usr/sbin/system_profiler ]; then
97 # <rdar://4655981> requires this hunk of work-around
98 # grep the XML for the characteristic we need. The key appears twice, so grep for the useful key (with 'string')
99 # use sed to strip off the <string></string> and the tabs in front of the string. So much work for so little result.
100 #
101 p_mhz=`system_profiler -xml -detailLevel mini SPHardwareDataType | \
102 grep -A1 current_processor_speed | grep string | \
103 sed -E 's/<string>(.+)<\/string>/\1/' | sed 's- --g'`
104 p_type=`system_profiler -xml -detailLevel mini SPHardwareDataType | \
105 grep -A1 cpu_type | grep string | \
106 sed -E 's/<string>(.+)<\/string>/\1/' | sed 's- --g'`
107fi
108
109# look for en0 (usually ethernet) if that isn't there try en1 (usually wireless) else give up
110 p_ipaddr=`ipconfig getpacket en0 | grep yiaddr | tr "= " "\n" | grep [0-9]`
111 if [ ! $p_ipaddr ]; then
112 p_ipaddr=`ipconfig getpacket en1 | grep yiaddr | tr "= " "\n" | grep [0-9]`
113 elif [ ! $p_ipaddr ]; then
114 p_ipaddr="unknown"
115 fi
116fi
117
118printf "\n\n!Libmicro_#: %30s\n" $libmicro_version
119printf "!Options: %30s\n" "$OPTS"
120printf "!Machine_name: %30s\n" "$hostname"
121printf "!OS_name: %30s\n" `uname -s`
122printf "!OS_release: %30s\n" `sw_vers -productVersion`
123printf "!OS_build: %30.18s\n" "`sw_vers -buildVersion`"
124printf "!Processor: %30s\n" `arch`
125printf "!#CPUs: %30s\n" $p_count
126printf "!CPU_MHz: %30s\n" "$p_mhz"
127printf "!CPU_NAME: %30s\n" "$p_type"
128printf "!IP_address: %30s\n" "$p_ipaddr"
129printf "!Run_by: %30s\n" $LOGNAME
130printf "!Date: %30s\n" "`date '+%D %R'`"
131printf "!Compiler: %30s\n" `$tattle -c`
132printf "!Compiler Ver.:%30s\n" "`$tattle -v`"
133printf "!sizeof(long): %30s\n" `$tattle -s`
134printf "!extra_CFLAGS: %30s\n" "`$tattle -f`"
135printf "!TimerRes: %30s\n\n\n" "`$tattle -r`"
136
137bin_dir="$TMPROOT/bin"
138
139mkdir -p $bin_dir
140cp bin-*/exec_bin $bin_dir/$A
141
142cp ./apple/bin-*/posix_spawn_bin $bin_dir/$A
143
144newline=0
145
146#
147# Everything below the while loop is input for the while loop
148# if you have any tests which can't run in the while loop, put
149# them above this comment
150#
151while read A B
152do
153 # $A contains the command, $B contains the arguments
154 # we echo blank lines and comments
155 # we skip anything which fails to match *$1* (useful
156 # if we only want to test one case, but a nasty hack)
157
158 case $A in
159 \#*)
160 echo "$A $B"
161 newline=1
162 continue
163 ;;
164
165 "")
166 if [ $newline -eq 1 ]
167 then
168 newline=0
169 echo
170 echo
171 fi
172
173 continue
174 ;;
175
176 *$1*)
177 ;;
178
179 *)
180 continue
181 ;;
182 esac
183
184 if [ ! -f $bin_dir/$A ]
185 then
186 cp bin-*/$A $bin_dir/$A
187 fi
188
189 echo
190
191 (cd $TMPROOT && eval "bin/$A $B")
192
193 echo
194 echo
195done <<.
196
197#
198# Obligatory null system call: use very short time
199# for default since SuSe implements this "syscall" in userland
200#
201
202getpid $OPTS -N "getpid" -I 5
203getppid $OPTS -N "getppid" -I 5
204
205getenv $OPTS -N "getenv" -s 100 -I 100
206getenv $OPTS -N "getenvT2" -s 100 -I 100 -T 2
207
208gettimeofday $OPTS -N "gettimeofday"
209
210log $OPTS -N "log" -I 20 -B 300000
211exp $OPTS -N "exp" -I 20 -B 100000
212lrand48 $OPTS -N "lrand48"
213
214memset $OPTS -N "memset_10" -s 10 -I 10
215memset $OPTS -N "memset_256" -s 256 -I 20
216memset $OPTS -N "memset_256_u" -s 256 -a 1 -I 20
217memset $OPTS -N "memset_1k" -s 1k -I 100 -B 2000
218memset $OPTS -N "memset_4k" -s 4k -I 250 -B 500
219memset $OPTS -N "memset_4k_uc" -s 4k -u -I 400
220
221memset $OPTS -N "memset_10k" -s 10k -I 600 -B 500
222memset $OPTS -N "memset_1m" -s 1m -I 200000
223memset $OPTS -N "memset_10m" -s 10m -I 2000000
224memset $OPTS -N "memsetP2_10m" -s 10m -P 2 -I 2000000
225
226memrand $OPTS -N "memrand" -s 40m -B 10000
227
228# This is an elided test and is not ported yet.
229# Check Makefile.darwin for list of elided tests
230# cachetocache $OPTS -N "cachetocache" -s 100k -T 2 -I 200
231
232isatty $OPTS -N "isatty_yes"
233isatty $OPTS -N "isatty_no" -f $IFILE
234
235malloc $OPTS -N "malloc_10" -s 10 -g 10 -I 50
236malloc $OPTS -N "malloc_100" -s 100 -g 10 -I 50
237malloc $OPTS -N "malloc_1k" -s 1k -g 10 -I 50
238malloc $OPTS -N "malloc_10k" -s 10k -g 10 -I 50
239malloc $OPTS -N "malloc_100k" -s 100k -g 10 -I 2000
240
241malloc $OPTS -N "mallocT2_10" -s 10 -g 10 -T 2 -I 200
242malloc $OPTS -N "mallocT2_100" -s 100 -g 10 -T 2 -I 200
243malloc $OPTS -N "mallocT2_1k" -s 1k -g 10 -T 2 -I 200
244malloc $OPTS -N "mallocT2_10k" -s 10k -g 10 -T 2 -I 200
245malloc $OPTS -N "mallocT2_100k" -s 100k -g 10 -T 2 -I 10000
246
247close $OPTS -N "close_bad" -B 96 -b
248close $OPTS -N "close_tmp" -B 64 -f $TFILE
249close $OPTS -N "close_usr" -B 64 -f $VFILE
250close $OPTS -N "close_zero" -B 64 -f /dev/zero
251close_tcp $OPTS -N "close_tcp" -B 32
252
253memcpy $OPTS -N "memcpy_10" -s 10 -I 10
254memcpy $OPTS -N "memcpy_1k" -s 1k -I 50
255memcpy $OPTS -N "memcpy_10k" -s 10k -I 800
256memcpy $OPTS -N "memcpy_1m" -s 1m -I 500000
257memcpy $OPTS -N "memcpy_10m" -s 10m -I 5000000
258
259strcpy $OPTS -N "strcpy_10" -s 10 -I 5
260strcpy $OPTS -N "strcpy_1k" -s 1k -I 100
261
262strlen $OPTS -N "strlen_10" -s 10 -I 5
263strlen $OPTS -N "strlen_1k" -s 1k -I 100
264
265strchr $OPTS -N "strchr_10" -s 10 -I 5
266strchr $OPTS -N "strchr_1k" -s 1k -I 200
267strcmp $OPTS -N "strcmp_10" -s 10 -I 10
268strcmp $OPTS -N "strcmp_1k" -s 1k -I 200
269
270strcasecmp $OPTS -N "scasecmp_10" -s 10 -I 50 -B 2000
271strcasecmp $OPTS -N "scasecmp_1k" -s 1k -I 20000 -B 100
272
273strtol $OPTS -N "strtol" -I 20
274
275# This is an elided test and is not ported yet.
276# Check Makefile.darwin for list of elided tests
277# getcontext $OPTS -N "getcontext" -I 100
278
279# This is an elided test and is not ported yet.
280# Check Makefile.darwin for list of elided tests
281# setcontext $OPTS -N "setcontext" -I 100
282
283mutex $OPTS -N "mutex_st" -I 10
284mutex $OPTS -N "mutex_mt" -t -I 10
285mutex $OPTS -N "mutex_T2" -T 2 -I 100
286
287longjmp $OPTS -N "longjmp" -I 10
288siglongjmp $OPTS -N "siglongjmp" -I 20
289
290getrusage $OPTS -N "getrusage" -I 200
291
292times $OPTS -N "times" -I 200
293time $OPTS -N "time" -I 50
294localtime_r $OPTS -N "localtime_r" -I 200
295strftime $OPTS -N "strftime" -I 10000 -B 100
296
297mktime $OPTS -N "mktime" -I 500
298mktime $OPTS -N "mktimeT2" -T 2 -I 1000
299
300cascade_mutex $OPTS -N "c_mutex_1" -I 50
301cascade_mutex $OPTS -N "c_mutex_10" -T 10 -I 5000
302cascade_mutex $OPTS -N "c_mutex_200" -T 200 -I 2000000
303
304cascade_cond $OPTS -N "c_cond_1" -I 100
305cascade_cond $OPTS -N "c_cond_10" -T 10 -I 3000
306cascade_cond $OPTS -N "c_cond_200" -T 200 -I 2000000
307
308cascade_lockf $OPTS -N "c_lockf_1" -I 1000
309cascade_lockf $OPTS -N "c_lockf_10" -P 10 -I 50000
310cascade_lockf $OPTS -N "c_lockf_200" -P 200 -I 5000000
311
312cascade_flock $OPTS -N "c_flock" -I 1000
313cascade_flock $OPTS -N "c_flock_10" -P 10 -I 50000
314cascade_flock $OPTS -N "c_flock_200" -P 200 -I 5000000
315
316cascade_fcntl $OPTS -N "c_fcntl_1" -I 2000
317cascade_fcntl $OPTS -N "c_fcntl_10" -P 10 -I 20000
318cascade_fcntl $OPTS -N "c_fcntl_200" -P 200 -I 5000000
319
320file_lock $OPTS -N "file_lock" -I 1000
321
322getsockname $OPTS -N "getsockname" -I 100
323getpeername $OPTS -N "getpeername" -I 100
324
325chdir $OPTS -N "chdir_tmp" -I 2000 $TDIR1 $TDIR2
326chdir $OPTS -N "chdir_usr" -I 2000 $VDIR1 $VDIR2
327
328chdir $OPTS -N "chgetwd_tmp" -I 3000 -g $TDIR1 $TDIR2
329chdir $OPTS -N "chgetwd_usr" -I 3000 -g $VDIR1 $VDIR2
330
331realpath $OPTS -N "realpath_tmp" -I 3000 -f $TDIR1
332realpath $OPTS -N "realpath_usr" -I 3000 -f $VDIR1
333
334stat $OPTS -N "stat_tmp" -I 1000 -f $TFILE
335stat $OPTS -N "stat_usr" -I 1000 -f $VFILE
336
337lmbench_stat $OPTS -N "lmbench_stat_tmp" -I 1000 -f $TFILE
338lmbench_stat $OPTS -N "lmbench_stat_usr" -I 10000 -B 100 -f /private/var/tmp/lmbench
339
340#
341# lmbench uses a touched empty file in /private/var/tmp
342# libMicro uses a 1M file in a directory off /private/var/tmp
343# performance difference is ~ 0.2 usecs/call
344#
345# why? - walking the dir tree, empty file vs. non-empty file, non-empty dir
346# in the case of libMicro, etc., etc.
347#
348
349lmbench_stat $OPTS -N "lmbench_stat_usr - Default" -I 10000 -B 100 -f /private/var/tmp/lmbench
350
351lmbench_fstat $OPTS -N "lmbench_fstat_tmp" -I 1000 -f $TFILE
352lmbench_fstat $OPTS -N "lmbench_fstat_usr" -I 10000 -B 100 -f /private/var/tmp/lmbench
353
354# see stat test to understand why we are using /private/var/tmp/lmbench
355
356lmbench_fstat $OPTS -N "lmbench_fstat_usr - Default" -I 10000 -B 100 -f /private/var/tmp/lmbench
357
358lmbench_openclose $OPTS -N "lmbench_openclose - Default" -I 10000 -B 100 -f /private/var/tmp/lmbench
359
360lmbench_select_file $OPTS -N "lmbench_select_file_10" -n 10 -B 100
361lmbench_select_file $OPTS -N "lmbench_select_file_100" -n 100 -B 100
362lmbench_select_file $OPTS -N "lmbench_select_file_250" -n 250 -B 100
363lmbench_select_file $OPTS -N "lmbench_select_file_500" -n 500 -B 100
364
365lmbench_select_tcp $OPTS -N "lmbench_select_tcp_10" -n 10 -B 100
366lmbench_select_tcp $OPTS -N "lmbench_select_tcp_100" -n 100 -B 100
367lmbench_select_tcp $OPTS -N "lmbench_select_tcp_250" -n 250 -B 100
368lmbench_select_tcp $OPTS -N "lmbench_select_tcp_500" -n 500 -B 100
369
370fcntl $OPTS -N "fcntl_tmp" -I 100 -f $TFILE
371fcntl $OPTS -N "fcntl_usr" -I 100 -f $VFILE
372fcntl_ndelay $OPTS -N "fcntl_ndelay" -I 100
373
374lseek $OPTS -N "lseek_t8k" -s 8k -I 50 -f $TFILE
375lseek $OPTS -N "lseek_u8k" -s 8k -I 50 -f $VFILE
376
377open $OPTS -N "open_tmp" -B 256 -f $TFILE
378open $OPTS -N "open_usr" -B 256 -f $VFILE
379open $OPTS -N "open_zero" -B 256 -f /dev/zero
380
381dup $OPTS -N "dup" -B 512
382
383socket $OPTS -N "socket_u" -B 256
384socket $OPTS -N "socket_i" -B 256 -f PF_INET
385
386socketpair $OPTS -N "socketpair" -B 256
387
388setsockopt $OPTS -N "setsockopt" -I 200
389
390bind $OPTS -N "bind" -B 100
391
392listen $OPTS -N "listen" -B 100
393
394#connection $OPTS -N "connection" -B 256
395
396poll $OPTS -N "poll_10" -n 10 -I 500
397poll $OPTS -N "poll_100" -n 100 -I 1000
398poll $OPTS -N "poll_1000" -n 1000 -I 5000
399
400poll $OPTS -N "poll_w10" -n 10 -I 500 -w 1
401poll $OPTS -N "poll_w100" -n 100 -I 2000 -w 10
402poll $OPTS -N "poll_w1000" -n 1000 -I 40000 -w 100
403
404select $OPTS -N "select_10" -n 10 -I 500
405select $OPTS -N "select_100" -n 100 -I 1000
406select $OPTS -N "select_1000" -n 1000 -I 5000
407
408select $OPTS -N "select_w10" -n 10 -I 500 -w 1
409select $OPTS -N "select_w100" -n 100 -I 2000 -w 10
410select $OPTS -N "select_w1000" -n 1000 -I 40000 -w 100
411
412semop $OPTS -N "semop" -I 200
413
414sigaction $OPTS -N "sigaction" -I 100
415signal $OPTS -N "signal" -I 1000
416sigprocmask $OPTS -N "sigprocmask" -I 200
417
418lmbench_lat_sig_install $OPTS -N "lmbench_siginstall"
419# sigcatch and sigsend need to be evaluated together
420# lmbench framework will allow multiple measurements within the same
421# benchmark test which allow them to factor out the cost of sending
422# a signal from catching one
423#
424# for our purposes sigcatch results - sigsend results yield
425# lmbench sig handler overhead measurements
426lmbench_lat_sig_catch $OPTS -N "lmbench_sigcatch"
427lmbench_lat_sig_send $OPTS -N "lmbench_sigsend"
428
429
430pthread_create $OPTS -N "pthread_8" -B 8
431pthread_create $OPTS -N "pthread_32" -B 32
432pthread_create $OPTS -N "pthread_128" -B 128
433pthread_create $OPTS -N "pthread_512" -B 512
434
435fork $OPTS -N "fork_10" -B 10
436fork $OPTS -N "fork_100" -B 100 -C 100
437
438#fork $OPTS -N "fork_1000" -B 1000 -C 50
439
440exit $OPTS -N "exit_10" -B 10
441exit $OPTS -N "exit_100" -B 100
442
443#exit $OPTS -N "exit_1000" -B 1000 -C 50
444
445exit $OPTS -N "exit_10_nolibc" -e -B 10
446
447exec $OPTS -N "exec" -B 10
448
449posix_spawn $OPTS -N "posix_spawn" -B 10
450
451system $OPTS -N "system" -I 1000000
452
453recurse $OPTS -N "recurse" -B 512
454
455read $OPTS -N "read_t1k" -s 1k -B 50 -f $TFILE
456read $OPTS -N "read_t10k" -s 10k -B 16 -f $TFILE
457read $OPTS -N "read_t100k" -s 100k -B 4 -f $TFILE
458
459read $OPTS -N "read_u1k" -s 1k -B 50 -f $VFILE
460read $OPTS -N "read_u10k" -s 10k -B 16 -f $VFILE
461read $OPTS -N "read_u100k" -s 100k -B 4 -f $VFILE
462
463read $OPTS -N "read_z1k" -s 1k -B 100 -f /dev/zero
464read $OPTS -N "read_z10k" -s 10k -B 30 -f /dev/zero
465read $OPTS -N "read_z100k" -s 100k -B 4 -f /dev/zero
466read $OPTS -N "read_zw100k" -s 100k -B 4 -w -f /dev/zero
467
468lmbench_read $OPTS -N "read_t1b" -s 1 -B 50 -f $TFILE
469lmbench_read $OPTS -N "read_t1k" -s 1k -B 50 -f $TFILE
470lmbench_read $OPTS -N "read_t10k" -s 10k -B 16 -f $TFILE
471lmbench_read $OPTS -N "read_t100k" -s 100k -B 4 -f $TFILE
472
473lmbench_read $OPTS -N "read_u1b" -s 1 -B 50 -f $VFILE
474lmbench_read $OPTS -N "read_u1k" -s 1k -B 50 -f $VFILE
475lmbench_read $OPTS -N "read_u10k" -s 10k -B 16 -f $VFILE
476lmbench_read $OPTS -N "read_u100k" -s 100k -B 4 -f $VFILE
477
478lmbench_read $OPTS -N "read_z1b - Default" -s 1 -B 100 -f /dev/zero
479lmbench_read $OPTS -N "read_z1k" -s 1k -B 100 -f /dev/zero
480lmbench_read $OPTS -N "read_z10k" -s 10k -B 30 -f /dev/zero
481lmbench_read $OPTS -N "read_z100k" -s 100k -B 4 -f /dev/zero
482lmbench_read $OPTS -N "read_zw100k" -s 100k -B 4 -w -f /dev/zero
483
484write $OPTS -N "write_t1k" -s 1k -B 50 -f $TFILE
485write $OPTS -N "write_t10k" -s 10k -B 25 -f $TFILE
486write $OPTS -N "write_t100k" -s 100k -B 4 -f $TFILE
487
488write $OPTS -N "write_u1k" -s 1k -B 50 -f $VFILE
489write $OPTS -N "write_u10k" -s 10k -B 25 -f $VFILE
490write $OPTS -N "write_u100k" -s 100k -B 4 -f $VFILE
491
492write $OPTS -N "write_n1k" -s 1k -I 100 -B 0 -f /dev/null
493write $OPTS -N "write_n10k" -s 10k -I 100 -B 0 -f /dev/null
494write $OPTS -N "write_n100k" -s 100k -I 100 -B 0 -f /dev/null
495
496lmbench_write $OPTS -N "lmbench_write_t1b" -s 1 -B 50 -f $TFILE
497lmbench_write $OPTS -N "lmbench_write_t1k" -s 1k -B 50 -f $TFILE
498lmbench_write $OPTS -N "lmbench_write_t10k" -s 10k -B 25 -f $TFILE
499lmbench_write $OPTS -N "lmbench_write_t100k" -s 100k -B 4 -f $TFILE
500
501lmbench_write $OPTS -N "lmbench_write_u1b" -s 1 -B 50 -f $VFILE
502lmbench_write $OPTS -N "lmbench_write_u1k" -s 1k -B 50 -f $VFILE
503lmbench_write $OPTS -N "lmbench_write_u10k" -s 10k -B 25 -f $VFILE
504lmbench_write $OPTS -N "lmbench_write_u100k" -s 100k -B 4 -f $VFILE
505
506lmbench_write $OPTS -N "lmbench_write_n1b - Default" -s 1 -I 100 -B 0 -f /dev/null
507lmbench_write $OPTS -N "lmbench_write_n1k" -s 1k -I 100 -B 0 -f /dev/null
508lmbench_write $OPTS -N "lmbench_write_n10k" -s 10k -I 100 -B 0 -f /dev/null
509lmbench_write $OPTS -N "lmbench_write_n100k" -s 100k -I 100 -B 0 -f /dev/null
510
511writev $OPTS -N "writev_t1k" -s 1k -B 20 -f $TFILE
512writev $OPTS -N "writev_t10k" -s 10k -B 4 -f $TFILE
513writev $OPTS -N "writev_t100k" -s 100k -f $TFILE
514
515writev $OPTS -N "writev_u1k" -s 1k -B 20 -f $VFILE
516writev $OPTS -N "writev_u10k" -s 10k -B 4 -f $VFILE
517writev $OPTS -N "writev_u100k" -s 100k -f $VFILE
518
519writev $OPTS -N "writev_n1k" -s 1k -I 100 -B 0 -f /dev/null
520writev $OPTS -N "writev_n10k" -s 10k -I 100 -B 0 -f /dev/null
521writev $OPTS -N "writev_n100k" -s 100k -I 100 -B 0 -f /dev/null
522
523pread $OPTS -N "pread_t1k" -s 1k -I 300 -f $TFILE
524pread $OPTS -N "pread_t10k" -s 10k -I 1000 -f $TFILE
525pread $OPTS -N "pread_t100k" -s 100k -I 10000 -f $TFILE
526
527pread $OPTS -N "pread_u1k" -s 1k -I 300 -f $VFILE
528pread $OPTS -N "pread_u10k" -s 10k -I 1000 -f $VFILE
529pread $OPTS -N "pread_u100k" -s 100k -I 10000 -f $VFILE
530
531pread $OPTS -N "pread_z1k" -s 1k -I 300 -f /dev/zero
532pread $OPTS -N "pread_z10k" -s 10k -I 1000 -f /dev/zero
533pread $OPTS -N "pread_z100k" -s 100k -I 2000 -f /dev/zero
534pread $OPTS -N "pread_zw100k" -s 100k -w -I 10000 -f /dev/zero
535
536pwrite $OPTS -N "pwrite_t1k" -s 1k -I 500 -f $TFILE
537pwrite $OPTS -N "pwrite_t10k" -s 10k -I 1000 -f $TFILE
538pwrite $OPTS -N "pwrite_t100k" -s 100k -I 10000 -f $TFILE
539
540pwrite $OPTS -N "pwrite_u1k" -s 1k -I 500 -f $VFILE
541pwrite $OPTS -N "pwrite_u10k" -s 10k -I 1000 -f $VFILE
542pwrite $OPTS -N "pwrite_u100k" -s 100k -I 20000 -f $VFILE
543
544pwrite $OPTS -N "pwrite_n1k" -s 1k -I 100 -f /dev/null
545pwrite $OPTS -N "pwrite_n10k" -s 10k -I 100 -f /dev/null
546pwrite $OPTS -N "pwrite_n100k" -s 100k -I 100 -f /dev/null
547
548mmap $OPTS -N "mmap_z8k" -l 8k -I 1000 -B 50 -f /dev/zero
549mmap $OPTS -N "mmap_z128k" -l 128k -I 2000 -B 100 -f /dev/zero
550mmap $OPTS -N "mmap_t8k" -l 8k -I 1000 -f $TFILE
551mmap $OPTS -N "mmap_t128k" -l 128k -I 1000 -f $TFILE
552mmap $OPTS -N "mmap_u8k" -l 8k -I 1000 -f $VFILE
553mmap $OPTS -N "mmap_u128k" -l 128k -I 1000 -f $VFILE
554mmap $OPTS -N "mmap_a8k" -l 8k -I 200 -f MAP_ANON
555mmap $OPTS -N "mmap_a128k" -l 128k -I 200 -f MAP_ANON
556
557
558mmap $OPTS -N "mmap_rz8k" -l 8k -I 2000 -r -f /dev/zero
559mmap $OPTS -N "mmap_rz128k" -l 128k -I 2000 -r -f /dev/zero
560mmap $OPTS -N "mmap_rt8k" -l 8k -I 2000 -r -f $TFILE
561mmap $OPTS -N "mmap_rt128k" -l 128k -I 20000 -r -f $TFILE
562mmap $OPTS -N "mmap_ru8k" -l 8k -I 2000 -r -f $VFILE
563mmap $OPTS -N "mmap_ru128k" -l 128k -I 20000 -r -f $VFILE
564mmap $OPTS -N "mmap_ra8k" -l 8k -I 2000 -r -f MAP_ANON
565mmap $OPTS -N "mmap_ra128k" -l 128k -I 20000 -r -f MAP_ANON
566
567mmap $OPTS -N "mmap_wz8k" -l 8k -I 5000 -w -B 50 -f /dev/zero
568mmap $OPTS -N "mmap_wz128k" -l 128k -I 50000 -w -B 50 -f /dev/zero
569mmap $OPTS -N "mmap_wt8k" -l 8k -I 5000 -w -f $TFILE
570mmap $OPTS -N "mmap_wt128k" -l 128k -I 50000 -w -f $TFILE
571mmap $OPTS -N "mmap_wu8k" -l 8k -I 5000 -w -f $VFILE
572mmap $OPTS -N "mmap_wu128k" -l 128k -I 500000 -w -f $VFILE
573mmap $OPTS -N "mmap_wa8k" -l 8k -I 3000 -w -f MAP_ANON
574mmap $OPTS -N "mmap_wa128k" -l 128k -I 50000 -w -f MAP_ANON
575
576munmap $OPTS -N "unmap_z8k" -l 8k -I 500 -f /dev/zero
577munmap $OPTS -N "unmap_z128k" -l 128k -I 500 -B 100 -f /dev/zero
578munmap $OPTS -N "unmap_t8k" -l 8k -I 500 -f $TFILE
579munmap $OPTS -N "unmap_t128k" -l 128k -I 500 -f $TFILE
580munmap $OPTS -N "unmap_u8k" -l 8k -I 500 -f $VFILE
581munmap $OPTS -N "unmap_u128k" -l 128k -I 500 -f $VFILE
582munmap $OPTS -N "unmap_a8k" -l 8k -I 500 -f MAP_ANON
583munmap $OPTS -N "unmap_a128k" -l 128k -I 500 -f MAP_ANON
584
585munmap $OPTS -N "unmap_rz8k" -l 8k -I 1000 -r -f /dev/zero
586munmap $OPTS -N "unmap_rz128k" -l 128k -I 2000 -r -B 100 -f /dev/zero
587munmap $OPTS -N "unmap_rt8k" -l 8k -I 1000 -r -f $TFILE
588munmap $OPTS -N "unmap_rt128k" -l 128k -I 3000 -r -f $TFILE
589munmap $OPTS -N "unmap_ru8k" -l 8k -I 1000 -r -f $VFILE
590munmap $OPTS -N "unmap_ru128k" -l 128k -I 3000 -r -f $VFILE
591munmap $OPTS -N "unmap_ra8k" -l 8k -I 1000 -r -f MAP_ANON
592munmap $OPTS -N "unmap_ra128k" -l 128k -I 2000 -r -f MAP_ANON
593
594connection $OPTS -N "conn_connect" -B 256 -c
595
596munmap $OPTS -N "unmap_wz8k" -l 8k -I 1000 -w -f /dev/zero
597munmap $OPTS -N "unmap_wz128k" -l 128k -I 8000 -w -B 100 -f /dev/zero
598munmap $OPTS -N "unmap_wt8k" -l 8k -I 1000 -w -f $TFILE
599munmap $OPTS -N "unmap_wt128k" -l 128k -I 10000 -w -f $TFILE
600munmap $OPTS -N "unmap_wu8k" -l 8k -I 1000 -w -f $VFILE
601munmap $OPTS -N "unmap_wu128k" -l 128k -I 50000 -w -B 10 -f $VFILE
602munmap $OPTS -N "unmap_wa8k" -l 8k -I 1000 -w -f MAP_ANON
603munmap $OPTS -N "unmap_wa128k" -l 128k -I 10000 -w -f MAP_ANON
604
605
606mprotect $OPTS -N "mprot_z8k" -l 8k -I 300 -f /dev/zero
607mprotect $OPTS -N "mprot_z128k" -l 128k -I 500 -f /dev/zero
608mprotect $OPTS -N "mprot_wz8k" -l 8k -I 500 -w -f /dev/zero
609mprotect $OPTS -N "mprot_wz128k" -l 128k -I 1000 -w -f /dev/zero
610mprotect $OPTS -N "mprot_twz8k" -l 8k -I 1000 -w -t -f /dev/zero
611mprotect $OPTS -N "mprot_tw128k" -l 128k -I 2000 -w -t -f /dev/zero
612mprotect $OPTS -N "mprot_tw4m" -l 4m -w -t -B 1 -f /dev/zero
613
614pipe $OPTS -N "pipe_pst1" -s 1 -I 1000 -x pipe -m st
615pipe $OPTS -N "pipe_pmt1" -s 1 -I 8000 -x pipe -m mt
616pipe $OPTS -N "pipe_pmp1" -s 1 -I 8000 -x pipe -m mp
617pipe $OPTS -N "pipe_pst4k" -s 4k -I 1000 -x pipe -m st
618pipe $OPTS -N "pipe_pmt4k" -s 4k -I 8000 -x pipe -m mt
619pipe $OPTS -N "pipe_pmp4k" -s 4k -I 8000 -x pipe -m mp
620
621pipe $OPTS -N "pipe_sst1" -s 1 -I 1000 -x sock -m st
622pipe $OPTS -N "pipe_smt1" -s 1 -I 8000 -x sock -m mt
623pipe $OPTS -N "pipe_smp1" -s 1 -I 8000 -x sock -m mp
624pipe $OPTS -N "pipe_sst4k" -s 4k -I 1000 -x sock -m st
625pipe $OPTS -N "pipe_smt4k" -s 4k -I 8000 -x sock -m mt
626pipe $OPTS -N "pipe_smp4k" -s 4k -I 8000 -x sock -m mp
627
628pipe $OPTS -N "pipe_tst1" -s 1 -I 1000 -x tcp -m st
629pipe $OPTS -N "pipe_tmt1" -s 1 -I 8000 -x tcp -m mt
630pipe $OPTS -N "pipe_tmp1" -s 1 -I 8000 -x tcp -m mp
631pipe $OPTS -N "pipe_tst4k" -s 4k -I 1000 -x tcp -m st
632pipe $OPTS -N "pipe_tmt4k" -s 4k -I 8000 -x tcp -m mt
633pipe $OPTS -N "pipe_tmp4k" -s 4k -I 8000 -x tcp -m mp
634
635#connection $OPTS -N "conn_accept" -B 256 -a
636
637lmbench_bw_unix -B 11 -L -W
638
639lmbench_bw_mem $OPTS -N lmbench_bcopy_512 -s 512 -x bcopy
640lmbench_bw_mem $OPTS -N lmbench_bcopy_1k -s 1k -x bcopy
641lmbench_bw_mem $OPTS -N lmbench_bcopy_2k -s 2k -x bcopy
642lmbench_bw_mem $OPTS -N lmbench_bcopy_4k -s 4k -x bcopy
643lmbench_bw_mem $OPTS -N lmbench_bcopy_8k -s 8k -x bcopy
644lmbench_bw_mem $OPTS -N lmbench_bcopy_16k -s 16k -x bcopy
645lmbench_bw_mem $OPTS -N lmbench_bcopy_32k -s 32k -x bcopy
646lmbench_bw_mem $OPTS -N lmbench_bcopy_64k -s 64k -x bcopy
647lmbench_bw_mem $OPTS -N lmbench_bcopy_128k -s 128k -x bcopy
648lmbench_bw_mem $OPTS -N lmbench_bcopy_256k -s 256k -x bcopy
649lmbench_bw_mem $OPTS -N lmbench_bcopy_512k -s 512k -x bcopy
650lmbench_bw_mem $OPTS -N lmbench_bcopy_1m -s 1m -x bcopy
651lmbench_bw_mem $OPTS -N lmbench_bzero_512 -s 512 -x bzero
652lmbench_bw_mem $OPTS -N lmbench_bzero_1k -s 1k -x bzero
653lmbench_bw_mem $OPTS -N lmbench_bzero_2k -s 2k -x bzero
654lmbench_bw_mem $OPTS -N lmbench_bzero_4k -s 4k -x bzero
655lmbench_bw_mem $OPTS -N lmbench_bzero_8k -s 8k -x bzero
656lmbench_bw_mem $OPTS -N lmbench_bzero_16k -s 16k -x bzero
657lmbench_bw_mem $OPTS -N lmbench_bzero_32k -s 32k -x bzero
658lmbench_bw_mem $OPTS -N lmbench_bzero_64k -s 64k -x bzero
659lmbench_bw_mem $OPTS -N lmbench_bzero_128k -s 128k -x bzero
660lmbench_bw_mem $OPTS -N lmbench_bzero_256k -s 256k -x bzero
661lmbench_bw_mem $OPTS -N lmbench_bzero_512k -s 512k -x bzero
662lmbench_bw_mem $OPTS -N lmbench_bzero_1m -s 1m -x bzero
663lmbench_bw_mem $OPTS -N lmbench_bzero_512 -s 512 -x fcp
664lmbench_bw_mem $OPTS -N lmbench_bzero_1k -s 1k -x fcp
665lmbench_bw_mem $OPTS -N lmbench_bzero_2k -s 2k -x fcp
666lmbench_bw_mem $OPTS -N lmbench_bzero_4k -s 4k -x fcp
667lmbench_bw_mem $OPTS -N lmbench_bzero_8k -s 8k -x fcp
668lmbench_bw_mem $OPTS -N lmbench_bzero_16k -s 16k -x fcp
669lmbench_bw_mem $OPTS -N lmbench_bzero_32k -s 32k -x fcp
670lmbench_bw_mem $OPTS -N lmbench_bzero_64k -s 64k -x fcp
671lmbench_bw_mem $OPTS -N lmbench_bzero_128k -s 128k -x fcp
672lmbench_bw_mem $OPTS -N lmbench_bzero_256k -s 256k -x fcp
673lmbench_bw_mem $OPTS -N lmbench_bzero_512k -s 512k -x fcp
674lmbench_bw_mem $OPTS -N lmbench_bzero_1m -s 1m -x fcp
675lmbench_bw_mem $OPTS -N lmbench_cp_512 -s 512 -x cp
676lmbench_bw_mem $OPTS -N lmbench_cp_1k -s 1k -x cp
677lmbench_bw_mem $OPTS -N lmbench_cp_2k -s 2k -x cp
678lmbench_bw_mem $OPTS -N lmbench_cp_4k -s 4k -x cp
679lmbench_bw_mem $OPTS -N lmbench_cp_8k -s 8k -x cp
680lmbench_bw_mem $OPTS -N lmbench_cp_16k -s 16k -x cp
681lmbench_bw_mem $OPTS -N lmbench_cp_32k -s 32k -x cp
682lmbench_bw_mem $OPTS -N lmbench_cp_64k -s 64k -x cp
683lmbench_bw_mem $OPTS -N lmbench_cp_128k -s 128k -x cp
684lmbench_bw_mem $OPTS -N lmbench_cp_256k -s 256k -x cp
685lmbench_bw_mem $OPTS -N lmbench_cp_512k -s 512k -x cp
686lmbench_bw_mem $OPTS -N lmbench_cp_1m -s 1m -x cp
687lmbench_bw_mem $OPTS -N lmbench_frd_512 -s 512 -x frd
688lmbench_bw_mem $OPTS -N lmbench_frd_1k -s 1k -x frd
689lmbench_bw_mem $OPTS -N lmbench_frd_2k -s 2k -x frd
690lmbench_bw_mem $OPTS -N lmbench_frd_4k -s 4k -x frd
691lmbench_bw_mem $OPTS -N lmbench_frd_8k -s 8k -x frd
692lmbench_bw_mem $OPTS -N lmbench_frd_16k -s 16k -x frd
693lmbench_bw_mem $OPTS -N lmbench_frd_32k -s 32k -x frd
694lmbench_bw_mem $OPTS -N lmbench_frd_64k -s 64k -x frd
695lmbench_bw_mem $OPTS -N lmbench_frd_128k -s 128k -x frd
696lmbench_bw_mem $OPTS -N lmbench_frd_256k -s 256k -x frd
697lmbench_bw_mem $OPTS -N lmbench_frd_512k -s 512k -x frd
698lmbench_bw_mem $OPTS -N lmbench_frd_1m -s 1m -x frd
699lmbench_bw_mem $OPTS -N lmbench_rd_512 -s 512 -x rd
700lmbench_bw_mem $OPTS -N lmbench_rd_1k -s 1k -x rd
701lmbench_bw_mem $OPTS -N lmbench_rd_2k -s 2k -x rd
702lmbench_bw_mem $OPTS -N lmbench_rd_4k -s 4k -x rd
703lmbench_bw_mem $OPTS -N lmbench_rd_8k -s 8k -x rd
704lmbench_bw_mem $OPTS -N lmbench_rd_16k -s 16k -x rd
705lmbench_bw_mem $OPTS -N lmbench_rd_32k -s 32k -x rd
706lmbench_bw_mem $OPTS -N lmbench_rd_64k -s 64k -x rd
707lmbench_bw_mem $OPTS -N lmbench_rd_128k -s 128k -x rd
708lmbench_bw_mem $OPTS -N lmbench_rd_256k -s 256k -x rd
709lmbench_bw_mem $OPTS -N lmbench_rd_512k -s 512k -x rd
710lmbench_bw_mem $OPTS -N lmbench_rd_1m -s 1m -x rd
711lmbench_bw_mem $OPTS -N lmbench_fwr_512 -s 512 -x fwr
712lmbench_bw_mem $OPTS -N lmbench_fwr_1k -s 1k -x fwr
713lmbench_bw_mem $OPTS -N lmbench_fwr_2k -s 2k -x fwr
714lmbench_bw_mem $OPTS -N lmbench_fwr_4k -s 4k -x fwr
715lmbench_bw_mem $OPTS -N lmbench_fwr_8k -s 8k -x fwr
716lmbench_bw_mem $OPTS -N lmbench_fwr_16k -s 16k -x fwr
717lmbench_bw_mem $OPTS -N lmbench_fwr_32k -s 32k -x fwr
718lmbench_bw_mem $OPTS -N lmbench_fwr_64k -s 64k -x fwr
719lmbench_bw_mem $OPTS -N lmbench_fwr_128k -s 128k -x fwr
720lmbench_bw_mem $OPTS -N lmbench_fwr_256k -s 256k -x fwr
721lmbench_bw_mem $OPTS -N lmbench_fwr_512k -s 512k -x fwr
722lmbench_bw_mem $OPTS -N lmbench_fwr_1m -s 1m -x fwr
723lmbench_bw_mem $OPTS -N lmbench_wr_512 -s 512 -x wr
724lmbench_bw_mem $OPTS -N lmbench_wr_1k -s 1k -x wr
725lmbench_bw_mem $OPTS -N lmbench_wr_2k -s 2k -x wr
726lmbench_bw_mem $OPTS -N lmbench_wr_4k -s 4k -x wr
727lmbench_bw_mem $OPTS -N lmbench_wr_8k -s 8k -x wr
728lmbench_bw_mem $OPTS -N lmbench_wr_16k -s 16k -x wr
729lmbench_bw_mem $OPTS -N lmbench_wr_32k -s 32k -x wr
730lmbench_bw_mem $OPTS -N lmbench_wr_64k -s 64k -x wr
731lmbench_bw_mem $OPTS -N lmbench_wr_128k -s 128k -x wr
732lmbench_bw_mem $OPTS -N lmbench_wr_256k -s 256k -x wr
733lmbench_bw_mem $OPTS -N lmbench_wr_512k -s 512k -x wr
734lmbench_bw_mem $OPTS -N lmbench_wr_1m -s 1m -x wr
735lmbench_bw_mem $OPTS -N lmbench_rdwr_512 -s 512 -x rdwr
736lmbench_bw_mem $OPTS -N lmbench_rdwr_1k -s 1k -x rdwr
737lmbench_bw_mem $OPTS -N lmbench_rdwr_2k -s 2k -x rdwr
738lmbench_bw_mem $OPTS -N lmbench_rdwr_4k -s 4k -x rdwr
739lmbench_bw_mem $OPTS -N lmbench_rdwr_8k -s 8k -x rdwr
740lmbench_bw_mem $OPTS -N lmbench_rdwr_16k -s 16k -x rdwr
741lmbench_bw_mem $OPTS -N lmbench_rdwr_32k -s 32k -x rdwr
742lmbench_bw_mem $OPTS -N lmbench_rdwr_64k -s 64k -x rdwr
743lmbench_bw_mem $OPTS -N lmbench_rdwr_128k -s 128k -x rdwr
744lmbench_bw_mem $OPTS -N lmbench_rdwr_256k -s 256k -x rdwr
745lmbench_bw_mem $OPTS -N lmbench_rdwr_512k -s 512k -x rdwr
746lmbench_bw_mem $OPTS -N lmbench_rdwr_1m -s 1m -x rdwr
747
748lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_512 -s 512 -f $TFILE
749lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_1k -s 1k -f $TFILE
750lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_2k -s 2k -f $TFILE
751lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_4k -s 4k -f $TFILE
752lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_8k -s 8k -f $TFILE
753lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_16k -s 16k -f $TFILE
754lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_32k -s 32k -f $TFILE
755lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_64k -s 64k -f $TFILE
756lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_128k -s 128k -f $TFILE
757lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_256k -s 256k -f $TFILE
758lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_512k -s 512k -f $TFILE
759lmbench_bw_mmap_rd $OPTS -N bw_mmap_rd_1m -s 1m -f $TFILE
760
761.