PageRenderTime 24ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/share/doc/papers/sysperf/appendix.ms

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