1 .\" Copyright (c) 1985 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)0.t 5.1 (Berkeley) 4/17/91
36 Measuring and Improving the Performance of Berkeley UNIX*
40 Marshall Kirk McKusick,
41 Samuel J. Leffler\(dg,
44 Computer Systems Research Group
45 Computer Science Division
46 Department of Electrical Engineering and Computer Science
47 University of California, Berkeley
51 * UNIX is a trademark of AT&T Bell Laboratories.
54 \(dg Samuel J. Leffler is currently employed by:
55 Silicon Graphics, Inc.
58 This work was done under grants from
59 the National Science Foundation under grant MCS80-05144,
60 and the Defense Advance Research Projects Agency (DoD) under
61 ARPA Order No. 4031 monitored by Naval Electronic System Command under
62 Contract No. N00039-82-C-0235.
64 The 4.2 Berkeley Software Distribution of
68 \(dd VAX, MASSBUS, UNIBUS, and DEC are trademarks of
69 Digital Equipment Corporation.
71 had several problems that could severely affect the overall
72 performance of the system.
73 These problems were identified with
74 kernel profiling and system tracing during day to day use.
75 Once potential problem areas had been identified
76 benchmark programs were devised to highlight the bottlenecks.
77 These benchmarks verified that the problems existed and provided
78 a metric against which to validate proposed solutions.
80 the performance problems encountered and describes
81 modifications that have been made
82 to the system since the initial distribution.
84 The changes to the system have consisted of improvements to the
85 performance of the existing facilities,
86 as well as enhancements to the current facilities.
87 Performance improvements in the kernel include cacheing of path name
88 translations, reductions in clock handling and scheduling overhead,
89 and improved throughput of the network subsystem.
90 Performance improvements in the libraries and utilities include replacement of
91 linear searches of system databases with indexed lookup,
92 merging of most network services into a single daemon,
93 and conversion of system utilities to use the more efficient
94 facilities available in 4.2BSD.
95 Enhancements in the kernel include the addition of subnets and gateways,
96 increases in many kernel limits,
97 cleanup of the signal and autoconfiguration implementations,
98 and support for windows and system logging.
99 Functional extensions in the libraries and utilities include
100 the addition of an Internet name server,
101 new system management tools,
102 and extensions to \fIdbx\fP to work with Pascal.
103 The paper concludes with a brief discussion of changes made to
104 the system to enhance security.
105 All of these enhancements are present in Berkeley UNIX 4.3BSD.
109 CR Categories and Subject Descriptors:
111 .B "[Operating Systems]":
112 File Systems Management \-
113 .I "file organization, directory structures, access methods";
115 .B "[Operating Systems]":
117 .I "measurements, operational analysis";
119 Additional Keywords and Phrases:
122 application program interface.
125 UNIX operating system,
132 .tl '\\*(LH'\\*(CH'\\*(RH'
139 .if t .ds CF April 17, 1991
141 .if t .ds RF McKusick, et. al.
143 .B "TABLE OF CONTENTS"
151 .B "2. Observation techniques
152 \0.1. System maintenance tools
153 \0.2. Kernel profiling
155 \0.4. Benchmark programs
159 .B "3. Results of our observations
162 \0.1.2. Network servers
163 \0.2. System overhead
164 \0.2.1. Micro-operation benchmarks
165 \0.2.2. Path name translation
166 \0.2.3. Clock processing
167 \0.2.4. Terminal multiplexors
168 \0.2.5. Process table management
169 \0.2.6. File system buffer cache
170 \0.2.7. Network subsystem
171 \0.2.8. Virtual memory subsystem
175 .B "4. Performance Improvements
176 \0.1. Performance Improvements in the Kernel
177 \0.1.1. Name Cacheing
178 \0.1.2. Intelligent Auto Siloing
179 \0.1.3. Process Table Management
181 \0.1.5. Clock Handling
185 \0.1.9. Context Switching
186 \0.1.10. Setjmp and Longjmp
187 \0.1.11. Compensating for Lack of Compiler Technology
188 \0.2. Improvements to Libraries and Utilities
189 \0.2.1. Hashed Databases
192 \0.2.4. Network Servers
193 \0.2.5. The C Run-time Library
198 .B "5. Functional Extensions
199 \0.1. Kernel Extensions
200 \0.1.1. Subnets, Broadcasts, and Gateways
201 \0.1.2. Interface Addressing
202 \0.1.3. User Control of Network Buffering
203 \0.1.4. Number of File Descriptors
204 \0.1.5. Kernel Limits
205 \0.1.6. Memory Management
207 \0.1.8. System Logging
209 \0.1.10. Configuration of UNIBUS Devices
210 \0.1.11. Disk Recovery from Errors
211 \0.2. Functional Extensions to Libraries and Utilities
213 \0.2.2. System Management
219 .B "6. Security Tightening
221 \0.2. Security Problems in Utilities
237 .B "Appendix \- Benchmark Programs"
239 .if t .ta .6i 2.1i 2.6i
240 .\" 2.94 went to 2.6, 3.64 to 3.30
241 .if n .ta .84i 2.6i 3.30i
244 .if t .ta .5i 1.25i 2.5i
245 .\" 3.5i went to 3.8i
246 .if n .ta .7i 1.75i 3.8i