]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/doc/papers/sysperf/0.t
Merge OpenSSL 1.0.2f.
[FreeBSD/FreeBSD.git] / share / doc / papers / sysperf / 0.t
1 .\" Copyright (c) 1985 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)0.t 5.1 (Berkeley) 4/17/91
29 .\"
30 .if n .ND
31 .TL
32 Measuring and Improving the Performance of Berkeley UNIX*
33 .sp
34 April 17, 1991
35 .AU
36 Marshall Kirk McKusick,
37 Samuel J. Leffler\(dg,
38 Michael J. Karels
39 .AI
40 Computer Systems Research Group
41 Computer Science Division
42 Department of Electrical Engineering and Computer Science
43 University of California, Berkeley
44 Berkeley, CA  94720
45 .AB
46 .FS
47 * UNIX is a trademark of AT&T Bell Laboratories.
48 .FE
49 .FS
50 \(dg Samuel J. Leffler is currently employed by:
51 Silicon Graphics, Inc.
52 .FE
53 .FS
54 This work was done under grants from
55 the National Science Foundation under grant MCS80-05144,
56 and the Defense Advance Research Projects Agency (DoD) under
57 ARPA Order No. 4031 monitored by Naval Electronic System Command under
58 Contract No. N00039-82-C-0235.
59 .FE
60 The 4.2 Berkeley Software Distribution of 
61 .UX
62 for the VAX\(dd
63 .FS
64 \(dd VAX, MASSBUS, UNIBUS, and DEC are trademarks of
65 Digital Equipment Corporation.
66 .FE
67 had several problems that could severely affect the overall
68 performance of the system.
69 These problems were identified with
70 kernel profiling and system tracing during day to day use.
71 Once potential problem areas had been identified
72 benchmark programs were devised to highlight the bottlenecks.
73 These benchmarks verified that the problems existed and provided
74 a metric against which to validate proposed solutions.
75 This paper examines 
76 the performance problems encountered and describes
77 modifications that have been made
78 to the system since the initial distribution.
79 .PP
80 The changes to the system have consisted of improvements to the
81 performance of the existing facilities,
82 as well as enhancements to the current facilities.
83 Performance improvements in the kernel include cacheing of path name
84 translations, reductions in clock handling and scheduling overhead,
85 and improved throughput of the network subsystem.
86 Performance improvements in the libraries and utilities include replacement of
87 linear searches of system databases with indexed lookup,
88 merging of most network services into a single daemon,
89 and conversion of system utilities to use the more efficient
90 facilities available in 4.2BSD.
91 Enhancements in the kernel include the addition of subnets and gateways,
92 increases in many kernel limits,
93 cleanup of the signal and autoconfiguration implementations,
94 and support for windows and system logging.
95 Functional extensions in the libraries and utilities include
96 the addition of an Internet name server,
97 new system management tools,
98 and extensions to \fIdbx\fP to work with Pascal.
99 The paper concludes with a brief discussion of changes made to
100 the system to enhance security.
101 All of these enhancements are present in Berkeley UNIX 4.3BSD.
102 .AE
103 .LP
104 .sp 2
105 CR Categories and Subject Descriptors:
106 D.4.3
107 .B "[Operating Systems]":
108 File Systems Management \-
109 .I "file organization, directory structures, access methods";
110 D.4.8
111 .B "[Operating Systems]":
112 Performance \-
113 .I "measurements, operational analysis";
114 .sp
115 Additional Keywords and Phrases:
116 Berkeley UNIX,
117 system performance,
118 application program interface.
119 .sp
120 General Terms:
121 UNIX operating system,
122 measurement,
123 performance.
124 .de PT
125 .lt \\n(LLu
126 .pc %
127 .nr PN \\n%
128 .tl '\\*(LH'\\*(CH'\\*(RH'
129 .lt \\n(.lu
130 ..
131 .af PN i
132 .ds LH Performance
133 .ds RH Contents
134 .bp 1
135 .if t .ds CF April 17, 1991
136 .if t .ds LF DRAFT
137 .if t .ds RF McKusick, et. al.
138 .ce
139 .B "TABLE OF CONTENTS"
140 .LP
141 .sp 1
142 .nf
143 .B "1.  Introduction"
144 .LP
145 .sp .5v
146 .nf
147 .B "2.  Observation techniques
148 \0.1.    System maintenance tools
149 \0.2.    Kernel profiling
150 \0.3.    Kernel tracing
151 \0.4.    Benchmark programs
152 .LP
153 .sp .5v
154 .nf
155 .B "3.  Results of our observations
156 \0.1.    User programs
157 \0.1.1.    Mail system
158 \0.1.2.    Network servers
159 \0.2.    System overhead
160 \0.2.1.    Micro-operation benchmarks
161 \0.2.2.    Path name translation
162 \0.2.3.    Clock processing
163 \0.2.4.    Terminal multiplexors
164 \0.2.5.    Process table management
165 \0.2.6.    File system buffer cache
166 \0.2.7.    Network subsystem
167 \0.2.8.    Virtual memory subsystem
168 .LP
169 .sp .5v
170 .nf
171 .B "4.  Performance Improvements
172 \0.1.    Performance Improvements in the Kernel
173 \0.1.1.    Name Cacheing
174 \0.1.2.    Intelligent Auto Siloing
175 \0.1.3.    Process Table Management
176 \0.1.4.    Scheduling
177 \0.1.5.    Clock Handling
178 \0.1.6.    File System
179 \0.1.7.    Network
180 \0.1.8.    Exec
181 \0.1.9.    Context Switching
182 \0.1.10.   Setjmp and Longjmp
183 \0.1.11.   Compensating for Lack of Compiler Technology
184 \0.2.    Improvements to Libraries and Utilities
185 \0.2.1.    Hashed Databases
186 \0.2.2.    Buffered I/O
187 \0.2.3.    Mail System
188 \0.2.4.    Network Servers
189 \0.2.5.    The C Run-time Library
190 \0.2.6.    Csh
191 .LP
192 .sp .5v
193 .nf
194 .B "5.  Functional Extensions
195 \0.1.    Kernel Extensions
196 \0.1.1.    Subnets, Broadcasts, and Gateways
197 \0.1.2.    Interface Addressing
198 \0.1.3.    User Control of Network Buffering
199 \0.1.4.    Number of File Descriptors
200 \0.1.5.    Kernel Limits
201 \0.1.6.    Memory Management
202 \0.1.7.    Signals
203 \0.1.8.    System Logging
204 \0.1.9.    Windows
205 \0.1.10.   Configuration of UNIBUS Devices
206 \0.1.11.   Disk Recovery from Errors
207 \0.2.    Functional Extensions to Libraries and Utilities
208 \0.2.1.    Name Server
209 \0.2.2.    System Management
210 \0.2.3.    Routing
211 \0.2.4.    Compilers
212 .LP
213 .sp .5v
214 .nf
215 .B "6.  Security Tightening
216 \0.1.    Generic Kernel
217 \0.2.    Security Problems in Utilities
218 .LP
219 .sp .5v
220 .nf
221 .B "7.  Conclusions
222 .LP
223 .sp .5v
224 .nf
225 .B Acknowledgements
226 .LP
227 .sp .5v
228 .nf
229 .B References
230 .LP
231 .sp .5v
232 .nf
233 .B "Appendix \- Benchmark Programs"
234 .de _d
235 .if t .ta .6i 2.1i 2.6i
236 .\" 2.94 went to 2.6, 3.64 to 3.30
237 .if n .ta .84i 2.6i 3.30i
238 ..
239 .de _f
240 .if t .ta .5i 1.25i 2.5i
241 .\" 3.5i went to 3.8i
242 .if n .ta .7i 1.75i 3.8i
243 ..