]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/doc/papers/sysperf/appendix.ms
MFV: r334448
[FreeBSD/FreeBSD.git] / share / doc / papers / sysperf / appendix.ms
1 .\" $FreeBSD$
2 .am vS
3 ..
4 .am vE
5 ..
6 'ss 23
7 'ds _ \d\(mi\u
8 'ps 9z
9 'vs 10p
10 'ds - \(mi
11 'ds / \\h'\\w' 'u-\\w'/'u'/
12 'ds /* \\h'\\w' 'u-\\w'/'u'/*
13 'bd B 3
14 'bd S B 3
15 'nr cm 0
16 'nf
17 'de vH
18 'ev 2
19 'ft 1
20 'sp .35i
21 'tl '\s14\f3\\*(=F\fP\s0'\\*(=H'\f3\s14\\*(=F\fP\s0'
22 'sp .25i
23 'ft 1
24 \f2\s12\h'\\n(.lu-\w'\\*(=f'u'\\*(=f\fP\s0\h'|0u'
25 .sp .05i
26 'ev
27 'ds =G \\*(=F
28 ..
29 'de vF
30 'ev 2
31 'sp .35i
32 'ie o 'tl '\f2\\*(=M''Page % of \\*(=G\fP'
33 'el 'tl '\f2Page % of \\*(=G''\\*(=M\fP'
34 'bp
35 'ev
36 'ft 1
37 'if \\n(cm=1 'ft 2
38 ..
39 'de ()
40 'pn 1
41 ..
42 'de +C
43 'nr cm 1
44 'ft 2
45 'ds +K
46 'ds -K
47 ..
48 'de -C
49 'nr cm 0
50 'ft 1
51 'ds +K \f3
52 'ds -K \fP
53 ..
54 '+C
55 '-C
56 'am +C
57 'ne 3
58 ..
59 'de FN
60 \f2\s14\h'\\n(.lu-\w'\\$1'u'\\$1\fP\s0\h'|0u'\c
61 .if r x .if \\nx .if d =F .tm \\$1 \\*(=F \\n%
62 'ds =f \&...\\$1
63 ..
64 'de FC
65 .if r x .if \\nx .if d =F .tm \\$1 \\*(=F \\n%
66 'ds =f \&...\\$1
67 ..
68 'de -F
69 'rm =f
70 ..
71 'ft 1
72 'lg 0
73 '-F
74 .\" Copyright (c) 1985 The Regents of the University of California.
75 .\" All rights reserved.
76 .\"
77 .\" Redistribution and use in source and binary forms, with or without
78 .\" modification, are permitted provided that the following conditions
79 .\" are met:
80 .\" 1. Redistributions of source code must retain the above copyright
81 .\"    notice, this list of conditions and the following disclaimer.
82 .\" 2. Redistributions in binary form must reproduce the above copyright
83 .\"    notice, this list of conditions and the following disclaimer in the
84 .\"    documentation and/or other materials provided with the distribution.
85 .\" 3. Neither the name of the University nor the names of its contributors
86 .\"    may be used to endorse or promote products derived from this software
87 .\"    without specific prior written permission.
88 .\"
89 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
90 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
91 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
92 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
93 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
94 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
95 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
96 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
97 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
98 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
99 .\" SUCH DAMAGE.
100 .\"
101 .\"     @(#)a1.t        5.1 (Berkeley) 4/17/91
102 .\"
103 .ds RH Appendix A \- Benchmark sources
104 .nr H2 1
105 .sp 2
106 .de vS
107 .nf
108 ..
109 .de vE
110 .fi
111 ..
112 .bp
113 .SH
114 \s+2Appendix A \- Benchmark sources\s-2
115 .LP
116 The programs shown here run under 4.2 with only routines
117 from the standard libraries.  When run under 4.1 they were augmented
118 with a \fIgetpagesize\fP routine and a copy of the \fIrandom\fP
119 function from the C library.  The \fIvforks\fP and \fIvexecs\fP
120 programs are constructed from the \fIforks\fP and \fIexecs\fP programs,
121 respectively, by substituting calls to \fIfork\fP with calls to
122 \fIvfork\fP.
123 .SH
124 syscall
125 .LP
126 .vS
127 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
128 '+C
129
130  \fI*\fP System call overhead benchmark\&.
131  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
132 '-C
133
134 'FN main
135 main(argc, argv)
136 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
137 \*(+K{\*(-K
138 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K ncalls;
139
140 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
141 \h'|21n'printf("usage: %s #syscalls\en", argv[0]);
142 \h'|21n'exit(1);
143 \h'|11n'\*(+K}\*(-K
144 \h'|11n'ncalls = atoi(argv[1]);
145 \h'|11n'\*(+Kwhile\*(-K (ncalls\*-\*- > 0)
146 \h'|21n'(\*(+Kvoid\*(-K) getpid();
147 \*(+K}\*(-K\c\c
148 '-F
149
150 .vE
151 .SH
152 csw
153 .LP
154 .vS
155 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
156 '+C
157
158  \fI*\fP Context switching benchmark\&.
159  \fI*\fP
160  \fI*\fP Force system to context switch 2\fI*\fPnsigs
161  \fI*\fP times by forking and exchanging signals\&.
162  \fI*\fP To calculate system overhead for a context
163  \fI*\fP switch, the signocsw program must be run
164  \fI*\fP with nsigs\&.  Overhead is then estimated by
165  \fI*\fP\h'|11n't1 = time csw <n>
166  \fI*\fP\h'|11n't2 = time signocsw <n>
167  \fI*\fP\h'|11n'overhead = t1 \*- 2 \fI*\fP t2;
168  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
169 '-C
170
171 \*(+K#include\*(-K <signal\&.h>
172
173 \*(+Kint\*(-K\h'|11n'sigsub();
174 \*(+Kint\*(-K\h'|11n'otherpid;
175 \*(+Kint\*(-K\h'|11n'nsigs;
176
177 'FN main
178 main(argc, argv)
179 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
180 \*(+K{\*(-K
181 \h'|11n'\*(+Kint\*(-K pid;
182
183 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
184 \h'|21n'printf("usage: %s nsignals\en", argv[0]);
185 \h'|21n'exit(1);
186 \h'|11n'\*(+K}\*(-K
187 \h'|11n'nsigs = atoi(argv[1]);
188 \h'|11n'signal(SIGALRM, sigsub);
189 \h'|11n'otherpid = getpid();
190 \h'|11n'pid = fork();
191 \h'|11n'\*(+Kif\*(-K (pid != 0) \*(+K{\*(-K
192 \h'|21n'otherpid = pid;
193 \h'|21n'kill(otherpid, SIGALRM);
194 \h'|11n'\*(+K}\*(-K
195 \h'|11n'\*(+Kfor\*(-K (;;)
196 \h'|21n'sigpause(0);
197 \*(+K}\*(-K\c\c
198 '-F
199
200
201 'FN sigsub
202 sigsub()
203 \*(+K{\*(-K
204
205 \h'|11n'signal(SIGALRM, sigsub);
206 \h'|11n'kill(otherpid, SIGALRM);
207 \h'|11n'\*(+Kif\*(-K (\*-\*-nsigs <= 0)
208 \h'|21n'exit(0);
209 \*(+K}\*(-K\c\c
210 '-F
211
212 .vE
213 .SH
214 signocsw
215 .LP
216 .vS
217 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
218 '+C
219
220  \fI*\fP Signal without context switch benchmark\&.
221  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
222 '-C
223
224 \*(+K#include\*(-K <signal\&.h>
225
226 \*(+Kint\*(-K\h'|11n'pid;
227 \*(+Kint\*(-K\h'|11n'nsigs;
228 \*(+Kint\*(-K\h'|11n'sigsub();
229
230 'FN main
231 main(argc, argv)
232 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
233 \*(+K{\*(-K
234 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i;
235
236 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
237 \h'|21n'printf("usage: %s nsignals\en", argv[0]);
238 \h'|21n'exit(1);
239 \h'|11n'\*(+K}\*(-K
240 \h'|11n'nsigs = atoi(argv[1]);
241 \h'|11n'signal(SIGALRM, sigsub);
242 \h'|11n'pid = getpid();
243 \h'|11n'\*(+Kfor\*(-K (i = 0; i < nsigs; i++)
244 \h'|21n'kill(pid, SIGALRM);
245 \*(+K}\*(-K\c\c
246 '-F
247
248
249 'FN sigsub
250 sigsub()
251 \*(+K{\*(-K
252
253 \h'|11n'signal(SIGALRM, sigsub);
254 \*(+K}\*(-K\c\c
255 '-F
256
257 .vE
258 .SH
259 pipeself
260 .LP
261 .vS
262 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
263 '+C
264
265  \fI*\fP IPC benchmark,
266  \fI*\fP write to self using pipes\&.
267  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
268 '-C
269
270
271 'FN main
272 main(argc, argv)
273 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
274 \*(+K{\*(-K
275 \h'|11n'\*(+Kchar\*(-K buf[512];
276 \h'|11n'\*(+Kint\*(-K fd[2], msgsize;
277 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
278
279 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
280 \h'|21n'printf("usage: %s iterations message\*-size\en", argv[0]);
281 \h'|21n'exit(1);
282 \h'|11n'\*(+K}\*(-K
283 \h'|11n'argc\*-\*-, argv++;
284 \h'|11n'iter = atoi(\fI*\fPargv);
285 \h'|11n'argc\*-\*-, argv++;
286 \h'|11n'msgsize = atoi(\fI*\fPargv);
287 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
288 \h'|21n'printf("%s: Bad message size\&.\en", \fI*\fPargv);
289 \h'|21n'exit(2);
290 \h'|11n'\*(+K}\*(-K
291 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
292 \h'|21n'perror("pipe");
293 \h'|21n'exit(3);
294 \h'|11n'\*(+K}\*(-K
295 \h'|11n'\*(+Kfor\*(-K (i = 0; i < iter; i++) \*(+K{\*(-K
296 \h'|21n'write(fd[1], buf, msgsize);
297 \h'|21n'read(fd[0], buf, msgsize);
298 \h'|11n'\*(+K}\*(-K
299 \*(+K}\*(-K\c\c
300 '-F
301
302 .vE
303 .SH
304 pipediscard
305 .LP
306 .vS
307 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
308 '+C
309
310  \fI*\fP IPC benchmarkl,
311  \fI*\fP write and discard using pipes\&.
312  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
313 '-C
314
315
316 'FN main
317 main(argc, argv)
318 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
319 \*(+K{\*(-K
320 \h'|11n'\*(+Kchar\*(-K buf[512];
321 \h'|11n'\*(+Kint\*(-K fd[2], msgsize;
322 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
323
324 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
325 \h'|21n'printf("usage: %s iterations message\*-size\en", argv[0]);
326 \h'|21n'exit(1);
327 \h'|11n'\*(+K}\*(-K
328 \h'|11n'argc\*-\*-, argv++;
329 \h'|11n'iter = atoi(\fI*\fPargv);
330 \h'|11n'argc\*-\*-, argv++;
331 \h'|11n'msgsize = atoi(\fI*\fPargv);
332 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
333 \h'|21n'printf("%s: Bad message size\&.\en", \fI*\fPargv);
334 \h'|21n'exit(2);
335 \h'|11n'\*(+K}\*(-K
336 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
337 \h'|21n'perror("pipe");
338 \h'|21n'exit(3);
339 \h'|11n'\*(+K}\*(-K
340 \h'|11n'\*(+Kif\*(-K (fork() == 0)
341 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++)
342 \h'|31n'read(fd[0], buf, msgsize);
343 \h'|11n'\*(+Kelse\*(-K
344 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++)
345 \h'|31n'write(fd[1], buf, msgsize);
346 \*(+K}\*(-K\c\c
347 '-F
348
349 .vE
350 .SH
351 pipeback
352 .LP
353 .vS
354 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
355 '+C
356
357  \fI*\fP IPC benchmark,
358  \fI*\fP read and reply using pipes\&.
359  \fI*\fP
360  \fI*\fP Process forks and exchanges messages
361  \fI*\fP over a pipe in a request\*-response fashion\&.
362  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
363 '-C
364
365
366 'FN main
367 main(argc, argv)
368 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
369 \*(+K{\*(-K
370 \h'|11n'\*(+Kchar\*(-K buf[512];
371 \h'|11n'\*(+Kint\*(-K fd[2], fd2[2], msgsize;
372 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
373
374 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
375 \h'|21n'printf("usage: %s iterations message\*-size\en", argv[0]);
376 \h'|21n'exit(1);
377 \h'|11n'\*(+K}\*(-K
378 \h'|11n'argc\*-\*-, argv++;
379 \h'|11n'iter = atoi(\fI*\fPargv);
380 \h'|11n'argc\*-\*-, argv++;
381 \h'|11n'msgsize = atoi(\fI*\fPargv);
382 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
383 \h'|21n'printf("%s: Bad message size\&.\en", \fI*\fPargv);
384 \h'|21n'exit(2);
385 \h'|11n'\*(+K}\*(-K
386 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
387 \h'|21n'perror("pipe");
388 \h'|21n'exit(3);
389 \h'|11n'\*(+K}\*(-K
390 \h'|11n'\*(+Kif\*(-K (pipe(fd2) < 0) \*(+K{\*(-K
391 \h'|21n'perror("pipe");
392 \h'|21n'exit(3);
393 \h'|11n'\*(+K}\*(-K
394 \h'|11n'\*(+Kif\*(-K (fork() == 0)
395 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++) \*(+K{\*(-K
396 \h'|31n'read(fd[0], buf, msgsize);
397 \h'|31n'write(fd2[1], buf, msgsize);
398 \h'|21n'\*(+K}\*(-K
399 \h'|11n'\*(+Kelse\*(-K
400 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++) \*(+K{\*(-K
401 \h'|31n'write(fd[1], buf, msgsize);
402 \h'|31n'read(fd2[0], buf, msgsize);
403 \h'|21n'\*(+K}\*(-K
404 \*(+K}\*(-K\c\c
405 '-F
406
407 .vE
408 .SH
409 forks
410 .LP
411 .vS
412 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
413 '+C
414
415  \fI*\fP Benchmark program to calculate fork+wait
416  \fI*\fP overhead (approximately)\&.  Process
417  \fI*\fP forks and exits while parent waits\&.
418  \fI*\fP The time to run this program is used
419  \fI*\fP in calculating exec overhead\&.
420  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
421 '-C
422
423
424 'FN main
425 main(argc, argv)
426 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
427 \*(+K{\*(-K
428 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K nforks, i;
429 \h'|11n'\*(+Kchar\*(-K \fI*\fPcp;
430 \h'|11n'\*(+Kint\*(-K pid, child, status, brksize;
431
432 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
433 \h'|21n'printf("usage: %s number\*-of\*-forks sbrk\*-size\en", argv[0]);
434 \h'|21n'exit(1);
435 \h'|11n'\*(+K}\*(-K
436 \h'|11n'nforks = atoi(argv[1]);
437 \h'|11n'\*(+Kif\*(-K (nforks < 0) \*(+K{\*(-K
438 \h'|21n'printf("%s: bad number of forks\en", argv[1]);
439 \h'|21n'exit(2);
440 \h'|11n'\*(+K}\*(-K
441 \h'|11n'brksize = atoi(argv[2]);
442 \h'|11n'\*(+Kif\*(-K (brksize < 0) \*(+K{\*(-K
443 \h'|21n'printf("%s: bad size to sbrk\en", argv[2]);
444 \h'|21n'exit(3);
445 \h'|11n'\*(+K}\*(-K
446 \h'|11n'cp = (\*(+Kchar\*(-K \fI*\fP)sbrk(brksize);
447 \h'|11n'\*(+Kif\*(-K ((\*(+Kint\*(-K)cp == \*-1) \*(+K{\*(-K
448 \h'|21n'perror("sbrk");
449 \h'|21n'exit(4);
450 \h'|11n'\*(+K}\*(-K
451 \h'|11n'\*(+Kfor\*(-K (i = 0; i < brksize; i += 1024)
452 \h'|21n'cp[i] = i;
453 \h'|11n'\*(+Kwhile\*(-K (nforks\*-\*- > 0) \*(+K{\*(-K
454 \h'|21n'child = fork();
455 \h'|21n'\*(+Kif\*(-K (child == \*-1) \*(+K{\*(-K
456 \h'|31n'perror("fork");
457 \h'|31n'exit(\*-1);
458 \h'|21n'\*(+K}\*(-K
459 \h'|21n'\*(+Kif\*(-K (child == 0)
460 \h'|31n'\*_exit(\*-1);
461 \h'|21n'\*(+Kwhile\*(-K ((pid = wait(&status)) != \*-1 && pid != child)
462 \h'|31n';
463 \h'|11n'\*(+K}\*(-K
464 \h'|11n'exit(0);
465 \*(+K}\*(-K\c\c
466 '-F
467
468 .vE
469 .SH
470 execs
471 .LP
472 .vS
473 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
474 '+C
475
476  \fI*\fP Benchmark program to calculate exec
477  \fI*\fP overhead (approximately)\&.  Process
478  \fI*\fP forks and execs "null" test program\&.
479  \fI*\fP The time to run the fork program should
480  \fI*\fP then be deducted from this one to
481  \fI*\fP estimate the overhead for the exec\&.
482  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
483 '-C
484
485
486 'FN main
487 main(argc, argv)
488 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
489 \*(+K{\*(-K
490 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K nexecs, i;
491 \h'|11n'\*(+Kchar\*(-K \fI*\fPcp, \fI*\fPsbrk();
492 \h'|11n'\*(+Kint\*(-K pid, child, status, brksize;
493
494 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
495 \h'|21n'printf("usage: %s number\*-of\*-execs sbrk\*-size job\*-name\en",
496 \h'|21n'    argv[0]);
497 \h'|21n'exit(1);
498 \h'|11n'\*(+K}\*(-K
499 \h'|11n'nexecs = atoi(argv[1]);
500 \h'|11n'\*(+Kif\*(-K (nexecs < 0) \*(+K{\*(-K
501 \h'|21n'printf("%s: bad number of execs\en", argv[1]);
502 \h'|21n'exit(2);
503 \h'|11n'\*(+K}\*(-K
504 \h'|11n'brksize = atoi(argv[2]);
505 \h'|11n'\*(+Kif\*(-K (brksize < 0) \*(+K{\*(-K
506 \h'|21n'printf("%s: bad size to sbrk\en", argv[2]);
507 \h'|21n'exit(3);
508 \h'|11n'\*(+K}\*(-K
509 \h'|11n'cp = sbrk(brksize);
510 \h'|11n'\*(+Kif\*(-K ((\*(+Kint\*(-K)cp == \*-1) \*(+K{\*(-K
511 \h'|21n'perror("sbrk");
512 \h'|21n'exit(4);
513 \h'|11n'\*(+K}\*(-K
514 \h'|11n'\*(+Kfor\*(-K (i = 0; i < brksize; i += 1024)
515 \h'|21n'cp[i] = i;
516 \h'|11n'\*(+Kwhile\*(-K (nexecs\*-\*- > 0) \*(+K{\*(-K
517 \h'|21n'child = fork();
518 \h'|21n'\*(+Kif\*(-K (child == \*-1) \*(+K{\*(-K
519 \h'|31n'perror("fork");
520 \h'|31n'exit(\*-1);
521 \h'|21n'\*(+K}\*(-K
522 \h'|21n'\*(+Kif\*(-K (child == 0) \*(+K{\*(-K
523 \h'|31n'execv(argv[3], argv);
524 \h'|31n'perror("execv");
525 \h'|31n'\*_exit(\*-1);
526 \h'|21n'\*(+K}\*(-K
527 \h'|21n'\*(+Kwhile\*(-K ((pid = wait(&status)) != \*-1 && pid != child)
528 \h'|31n';
529 \h'|11n'\*(+K}\*(-K
530 \h'|11n'exit(0);
531 \*(+K}\*(-K\c\c
532 '-F
533
534 .vE
535 .SH
536 nulljob
537 .LP
538 .vS
539 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
540 '+C
541
542  \fI*\fP Benchmark "null job" program\&.
543  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
544 '-C
545
546
547 'FN main
548 main(argc, argv)
549 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
550 \*(+K{\*(-K
551
552 \h'|11n'exit(0);
553 \*(+K}\*(-K\c\c
554 '-F
555
556 .vE
557 .SH
558 bigjob
559 .LP
560 .vS
561 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
562 '+C
563
564  \fI*\fP Benchmark "null big job" program\&.
565  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
566 '-C
567
568 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
569 '+C
570  250 here is intended to approximate vi\'s text+data size \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
571 '-C
572
573 \*(+Kchar\*(-K\h'|11n'space[1024 \fI*\fP 250] = "force into data segment";
574
575 'FN main
576 main(argc, argv)
577 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
578 \*(+K{\*(-K
579
580 \h'|11n'exit(0);
581 \*(+K}\*(-K\c\c
582 '-F
583
584 .vE
585 .bp
586 .SH
587 seqpage
588 .LP
589 .vS
590 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
591 '+C
592
593  \fI*\fP Sequential page access benchmark\&.
594  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
595 '-C
596
597 \*(+K#include\*(-K <sys\fI\h'\w' 'u-\w'/'u'/\fPvadvise\&.h>
598
599 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
600
601 'FN main
602 main(argc, argv)
603 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
604 \*(+K{\*(-K
605 \h'|11n'\*(+Kregister\*(-K i, niter;
606 \h'|11n'\*(+Kregister\*(-K \*(+Kchar\*(-K \fI*\fPpf, \fI*\fPlastpage;
607 \h'|11n'\*(+Kint\*(-K npages = 4096, pagesize, vflag = 0;
608 \h'|11n'\*(+Kchar\*(-K \fI*\fPpages, \fI*\fPname;
609
610 \h'|11n'name = argv[0];
611 \h'|11n'argc\*-\*-, argv++;
612 again:
613 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
614 usage:
615 \h'|21n'printf("usage: %s [ \*-v ] [ \*-p #pages ] niter\en", name);
616 \h'|21n'exit(1);
617 \h'|11n'\*(+K}\*(-K
618 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
619 \h'|21n'argc\*-\*-, argv++;
620 \h'|21n'\*(+Kif\*(-K (argc < 1)
621 \h'|31n'\*(+Kgoto\*(-K usage;
622 \h'|21n'npages = atoi(\fI*\fPargv);
623 \h'|21n'\*(+Kif\*(-K (npages <= 0) \*(+K{\*(-K
624 \h'|31n'printf("%s: Bad page count\&.\en", \fI*\fPargv);
625 \h'|31n'exit(2);
626 \h'|21n'\*(+K}\*(-K
627 \h'|21n'argc\*-\*-, argv++;
628 \h'|21n'\*(+Kgoto\*(-K again;
629 \h'|11n'\*(+K}\*(-K
630 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-v") == 0) \*(+K{\*(-K
631 \h'|21n'argc\*-\*-, argv++;
632 \h'|21n'vflag++;
633 \h'|21n'\*(+Kgoto\*(-K again;
634 \h'|11n'\*(+K}\*(-K
635 \h'|11n'niter = atoi(\fI*\fPargv);
636 \h'|11n'pagesize = getpagesize();
637 \h'|11n'pages = valloc(npages \fI*\fP pagesize);
638 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
639 \h'|21n'printf("Can\'t allocate %d pages (%2\&.1f megabytes)\&.\en",
640 \h'|21n'    npages, (npages \fI*\fP pagesize) \fI\h'\w' 'u-\w'/'u'/\fP (1024\&. \fI*\fP 1024\&.));
641 \h'|21n'exit(3);
642 \h'|11n'\*(+K}\*(-K
643 \h'|11n'lastpage = pages + (npages \fI*\fP pagesize);
644 \h'|11n'\*(+Kif\*(-K (vflag)
645 \h'|21n'vadvise(VA\*_SEQL);
646 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++)
647 \h'|21n'\*(+Kfor\*(-K (pf = pages; pf < lastpage; pf += pagesize)
648 \h'|31n'\fI*\fPpf = 1;
649 \*(+K}\*(-K\c\c
650 '-F
651
652 .vE
653 .SH
654 randpage
655 .LP
656 .vS
657 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
658 '+C
659
660  \fI*\fP Random page access benchmark\&.
661  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
662 '-C
663
664 \*(+K#include\*(-K <sys\fI\h'\w' 'u-\w'/'u'/\fPvadvise\&.h>
665
666 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
667 \*(+Kint\*(-K\h'|11n'rand();
668
669 'FN main
670 main(argc, argv)
671 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
672 \*(+K{\*(-K
673 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K npages = 4096, pagesize, pn, i, niter;
674 \h'|11n'\*(+Kint\*(-K vflag = 0, debug = 0;
675 \h'|11n'\*(+Kchar\*(-K \fI*\fPpages, \fI*\fPname;
676
677 \h'|11n'name = argv[0];
678 \h'|11n'argc\*-\*-, argv++;
679 again:
680 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
681 usage:
682 \h'|21n'printf("usage: %s [ \*-d ] [ \*-v ] [ \*-p #pages ] niter\en", name);
683 \h'|21n'exit(1);
684 \h'|11n'\*(+K}\*(-K
685 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
686 \h'|21n'argc\*-\*-, argv++;
687 \h'|21n'\*(+Kif\*(-K (argc < 1)
688 \h'|31n'\*(+Kgoto\*(-K usage;
689 \h'|21n'npages = atoi(\fI*\fPargv);
690 \h'|21n'\*(+Kif\*(-K (npages <= 0) \*(+K{\*(-K
691 \h'|31n'printf("%s: Bad page count\&.\en", \fI*\fPargv);
692 \h'|31n'exit(2);
693 \h'|21n'\*(+K}\*(-K
694 \h'|21n'argc\*-\*-, argv++;
695 \h'|21n'\*(+Kgoto\*(-K again;
696 \h'|11n'\*(+K}\*(-K
697 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-v") == 0) \*(+K{\*(-K
698 \h'|21n'argc\*-\*-, argv++;
699 \h'|21n'vflag++;
700 \h'|21n'\*(+Kgoto\*(-K again;
701 \h'|11n'\*(+K}\*(-K
702 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-d") == 0) \*(+K{\*(-K
703 \h'|21n'argc\*-\*-, argv++;
704 \h'|21n'debug++;
705 \h'|21n'\*(+Kgoto\*(-K again;
706 \h'|11n'\*(+K}\*(-K
707 \h'|11n'niter = atoi(\fI*\fPargv);
708 \h'|11n'pagesize = getpagesize();
709 \h'|11n'pages = valloc(npages \fI*\fP pagesize);
710 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
711 \h'|21n'printf("Can\'t allocate %d pages (%2\&.1f megabytes)\&.\en",
712 \h'|21n'    npages, (npages \fI*\fP pagesize) \fI\h'\w' 'u-\w'/'u'/\fP (1024\&. \fI*\fP 1024\&.));
713 \h'|21n'exit(3);
714 \h'|11n'\*(+K}\*(-K
715 \h'|11n'\*(+Kif\*(-K (vflag)
716 \h'|21n'vadvise(VA\*_ANOM);
717 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++) \*(+K{\*(-K
718 \h'|21n'pn = random() % npages;
719 \h'|21n'\*(+Kif\*(-K (debug)
720 \h'|31n'printf("touch page %d\en", pn);
721 \h'|21n'pages[pagesize \fI*\fP pn] = 1;
722 \h'|11n'\*(+K}\*(-K
723 \*(+K}\*(-K\c\c
724 '-F
725
726 .vE
727 .SH
728 gausspage
729 .LP
730 .vS
731 \fI\h'\w' 'u-\w'/'u'/\fP\fI*\fP\c\c
732 '+C
733
734  \fI*\fP Random page access with
735  \fI*\fP a gaussian distribution\&.
736  \fI*\fP
737  \fI*\fP Allocate a large (zero fill on demand) address
738  \fI*\fP space and fault the pages in a random gaussian
739  \fI*\fP order\&.
740  \fI*\fP\fI\h'\w' 'u-\w'/'u'/\fP\c
741 '-C
742
743
744 \*(+Kfloat\*(-K\h'|11n'sqrt(), log(), rnd(), cos(), gauss();
745 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
746 \*(+Kint\*(-K\h'|11n'rand();
747
748 'FN main
749 main(argc, argv)
750 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
751 \*(+K{\*(-K
752 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K pn, i, niter, delta;
753 \h'|11n'\*(+Kregister\*(-K \*(+Kchar\*(-K \fI*\fPpages;
754 \h'|11n'\*(+Kfloat\*(-K sd = 10\&.0;
755 \h'|11n'\*(+Kint\*(-K npages = 4096, pagesize, debug = 0;
756 \h'|11n'\*(+Kchar\*(-K \fI*\fPname;
757
758 \h'|11n'name = argv[0];
759 \h'|11n'argc\*-\*-, argv++;
760 again:
761 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
762 usage:
763 \h'|21n'printf(
764 "usage: %s [ \*-d ] [ \*-p #pages ] [ \*-s standard\*-deviation ] iterations\en", name);
765 \h'|21n'exit(1);
766 \h'|11n'\*(+K}\*(-K
767 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-s") == 0) \*(+K{\*(-K
768 \h'|21n'argc\*-\*-, argv++;
769 \h'|21n'\*(+Kif\*(-K (argc < 1)
770 \h'|31n'\*(+Kgoto\*(-K usage;
771 \h'|21n'sscanf(\fI*\fPargv, "%f", &sd);
772 \h'|21n'\*(+Kif\*(-K (sd <= 0) \*(+K{\*(-K
773 \h'|31n'printf("%s: Bad standard deviation\&.\en", \fI*\fPargv);
774 \h'|31n'exit(2);
775 \h'|21n'\*(+K}\*(-K
776 \h'|21n'argc\*-\*-, argv++;
777 \h'|21n'\*(+Kgoto\*(-K again;
778 \h'|11n'\*(+K}\*(-K
779 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
780 \h'|21n'argc\*-\*-, argv++;
781 \h'|21n'\*(+Kif\*(-K (argc < 1)
782 \h'|31n'\*(+Kgoto\*(-K usage;
783 \h'|21n'npages = atoi(\fI*\fPargv);
784 \h'|21n'\*(+Kif\*(-K (npages <= 0) \*(+K{\*(-K
785 \h'|31n'printf("%s: Bad page count\&.\en", \fI*\fPargv);
786 \h'|31n'exit(2);
787 \h'|21n'\*(+K}\*(-K
788 \h'|21n'argc\*-\*-, argv++;
789 \h'|21n'\*(+Kgoto\*(-K again;
790 \h'|11n'\*(+K}\*(-K
791 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-d") == 0) \*(+K{\*(-K
792 \h'|21n'argc\*-\*-, argv++;
793 \h'|21n'debug++;
794 \h'|21n'\*(+Kgoto\*(-K again;
795 \h'|11n'\*(+K}\*(-K
796 \h'|11n'niter = atoi(\fI*\fPargv);
797 \h'|11n'pagesize = getpagesize();
798 \h'|11n'pages = valloc(npages\fI*\fPpagesize);
799 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
800 \h'|21n'printf("Can\'t allocate %d pages (%2\&.1f megabytes)\&.\en",
801 \h'|21n'    npages, (npages\fI*\fPpagesize) \fI\h'\w' 'u-\w'/'u'/\fP (1024\&. \fI*\fP 1024\&.));
802 \h'|21n'exit(3);
803 \h'|11n'\*(+K}\*(-K
804 \h'|11n'pn = 0;
805 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++) \*(+K{\*(-K
806 \h'|21n'delta = gauss(sd, 0\&.0);
807 \h'|21n'\*(+Kwhile\*(-K (pn + delta < 0 || pn + delta > npages)
808 \h'|31n'delta = gauss(sd, 0\&.0);
809 \h'|21n'pn += delta;
810 \h'|21n'\*(+Kif\*(-K (debug)
811 \h'|31n'printf("touch page %d\en", pn);
812 \h'|21n'\*(+Kelse\*(-K
813 \h'|31n'pages[pn \fI*\fP pagesize] = 1;
814 \h'|11n'\*(+K}\*(-K
815 \*(+K}\*(-K\c\c
816 '-F
817
818
819 \*(+Kfloat\*(-K
820 'FN gauss
821 gauss(sd, mean)
822 \h'|11n'\*(+Kfloat\*(-K sd, mean;
823 \*(+K{\*(-K
824 \h'|11n'\*(+Kregister\*(-K \*(+Kfloat\*(-K qa, qb;
825
826 \h'|11n'qa = sqrt(log(rnd()) \fI*\fP \*-2\&.0);
827 \h'|11n'qb = 3\&.14159 \fI*\fP rnd();
828 \h'|11n'\*(+Kreturn\*(-K (qa \fI*\fP cos(qb) \fI*\fP sd + mean);
829 \*(+K}\*(-K\c\c
830 '-F
831
832
833 \*(+Kfloat\*(-K
834 'FN rnd
835 rnd()
836 \*(+K{\*(-K
837 \h'|11n'\*(+Kstatic\*(-K \*(+Kint\*(-K seed = 1;
838 \h'|11n'\*(+Kstatic\*(-K \*(+Kint\*(-K biggest = 0x7fffffff;
839
840 \h'|11n'\*(+Kreturn\*(-K ((\*(+Kfloat\*(-K)rand(seed) \fI\h'\w' 'u-\w'/'u'/\fP (\*(+Kfloat\*(-K)biggest);
841 \*(+K}\*(-K\c\c
842 '-F
843
844 .vE
845 '-F
846 .\" $FreeBSD$
847 .am vS
848 ..
849 .am vE
850 ..
851 'ss 23
852 'ds _ \d\(mi\u
853 'ps 9z
854 'vs 10p
855 'ds - \(mi
856 'ds / \\h'\\w' 'u-\\w'/'u'/
857 'ds /* \\h'\\w' 'u-\\w'/'u'/*
858 'bd B 3
859 'bd S B 3
860 'nr cm 0
861 'nf
862 'de vH
863 'ev 2
864 'ft 1
865 'sp .35i
866 'tl '\s14\f3\\*(=F\fP\s0'\\*(=H'\f3\s14\\*(=F\fP\s0'
867 'sp .25i
868 'ft 1
869 \f2\s12\h'\\n(.lu-\w'\\*(=f'u'\\*(=f\fP\s0\h'|0u'
870 .sp .05i
871 'ev
872 'ds =G \\*(=F
873 ..
874 'de vF
875 'ev 2
876 'sp .35i
877 'ie o 'tl '\f2\\*(=M''Page % of \\*(=G\fP'
878 'el 'tl '\f2Page % of \\*(=G''\\*(=M\fP'
879 'bp
880 'ev
881 'ft 1
882 'if \\n(cm=1 'ft 2
883 ..
884 'de ()
885 'pn 1
886 ..
887 'de +C
888 'nr cm 1
889 'ft 2
890 'ds +K
891 'ds -K
892 ..
893 'de -C
894 'nr cm 0
895 'ft 1
896 'ds +K \f3
897 'ds -K \fP
898 ..
899 '+C
900 '-C
901 'am +C
902 'ne 3
903 ..
904 'de FN
905 \f2\s14\h'\\n(.lu-\w'\\$1'u'\\$1\fP\s0\h'|0u'\c
906 .if r x .if \\nx .if d =F .tm \\$1 \\*(=F \\n%
907 'ds =f \&...\\$1
908 ..
909 'de FC
910 .if r x .if \\nx .if d =F .tm \\$1 \\*(=F \\n%
911 'ds =f \&...\\$1
912 ..
913 'de -F
914 'rm =f
915 ..
916 'ft 1
917 'lg 0
918 '-F
919 .\" Copyright (c) 1985 The Regents of the University of California.
920 .\" All rights reserved.
921 .\"
922 .\" Redistribution and use in source and binary forms, with or without
923 .\" modification, are permitted provided that the following conditions
924 .\" are met:
925 .\" 1. Redistributions of source code must retain the above copyright
926 .\"    notice, this list of conditions and the following disclaimer.
927 .\" 2. Redistributions in binary form must reproduce the above copyright
928 .\"    notice, this list of conditions and the following disclaimer in the
929 .\"    documentation and/or other materials provided with the distribution.
930 .\" 3. Neither the name of the University nor the names of its contributors
931 .\"    may be used to endorse or promote products derived from this software
932 .\"    without specific prior written permission.
933 .\"
934 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
935 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
936 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
937 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
938 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
939 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
940 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
941 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
942 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
943 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
944 .\" SUCH DAMAGE.
945 .\"
946 .\"     @(#)a2.t        5.1 (Berkeley) 4/17/91
947 .\"
948 .SH
949 run (shell script)
950 .LP
951 .vS
952 \*(+K#\*(-K! \fI\h'\w' 'u-\w'/'u'/\fPbin\fI\h'\w' 'u-\w'/'u'/\fPcsh \*-fx
953 \*(+K#\*(-K Script to run benchmark programs\&.
954 \*(+K#\*(-K
955 date
956 make clean; time make
957 time syscall 100000
958 time seqpage \*-p 7500 10
959 time seqpage \*-v \*-p 7500 10
960 time randpage \*-p 7500 30000
961 time randpage \*-v \*-p 7500 30000
962 time gausspage \*-p 7500 \*-s 1 30000
963 time gausspage \*-p 7500 \*-s 10 30000
964 time gausspage \*-p 7500 \*-s 30 30000
965 time gausspage \*-p 7500 \*-s 40 30000
966 time gausspage \*-p 7500 \*-s 50 30000
967 time gausspage \*-p 7500 \*-s 60 30000
968 time gausspage \*-p 7500 \*-s 80 30000
969 time gausspage \*-p 7500 \*-s 10000 30000
970 time csw 10000
971 time signocsw 10000
972 time pipeself 10000 512
973 time pipeself 10000 4
974 time udgself 10000 512
975 time udgself 10000 4
976 time pipediscard 10000 512
977 time pipediscard 10000 4
978 time udgdiscard 10000 512
979 time udgdiscard 10000 4
980 time pipeback 10000 512
981 time pipeback 10000 4
982 time udgback 10000 512
983 time udgback 10000 4
984 size forks
985 time forks 1000 0
986 time forks 1000 1024
987 time forks 1000 102400
988 size vforks
989 time vforks 1000 0
990 time vforks 1000 1024
991 time vforks 1000 102400
992 countenv
993 size nulljob
994 time execs 1000 0 nulljob
995 time execs 1000 1024 nulljob
996 time execs 1000 102400 nulljob
997 time vexecs 1000 0 nulljob
998 time vexecs 1000 1024 nulljob
999 time vexecs 1000 102400 nulljob
1000 size bigjob
1001 time execs 1000 0 bigjob
1002 time execs 1000 1024 bigjob
1003 time execs 1000 102400 bigjob
1004 time vexecs 1000 0 bigjob
1005 time vexecs 1000 1024 bigjob
1006 time vexecs 1000 102400 bigjob
1007 \*(+K#\*(-K fill environment with ~1024 bytes
1008 setenv a 012345678901234567890123456789012345678901234567890123456780123456789
1009 setenv b 012345678901234567890123456789012345678901234567890123456780123456789
1010 setenv c 012345678901234567890123456789012345678901234567890123456780123456789
1011 setenv d 012345678901234567890123456789012345678901234567890123456780123456789
1012 setenv e 012345678901234567890123456789012345678901234567890123456780123456789
1013 setenv f 012345678901234567890123456789012345678901234567890123456780123456789
1014 setenv g 012345678901234567890123456789012345678901234567890123456780123456789
1015 setenv h 012345678901234567890123456789012345678901234567890123456780123456789
1016 setenv i 012345678901234567890123456789012345678901234567890123456780123456789
1017 setenv j 012345678901234567890123456789012345678901234567890123456780123456789
1018 setenv k 012345678901234567890123456789012345678901234567890123456780123456789
1019 setenv l 012345678901234567890123456789012345678901234567890123456780123456789
1020 setenv m 012345678901234567890123456789012345678901234567890123456780123456789
1021 setenv n 012345678901234567890123456789012345678901234567890123456780123456789
1022 setenv o 012345678901234567890123456789012345678901234567890123456780123456789
1023 countenv
1024 time execs 1000 0 nulljob
1025 time execs 1000 1024 nulljob
1026 time execs 1000 102400 nulljob
1027 time execs 1000 0 bigjob
1028 time execs 1000 1024 bigjob
1029 time execs 1000 102400 bigjob
1030 .vE
1031 .bp
1032 '-F