]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/doc/papers/sysperf/5.t
MFV r289003:
[FreeBSD/FreeBSD.git] / share / doc / papers / sysperf / 5.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 .\"     @(#)5.t 5.1 (Berkeley) 4/17/91
29 .\"
30 .\" $FreeBSD$
31 .\"
32 .ds RH Functional Extensions
33 .NH
34 Functional Extensions
35 .PP
36 Some of the facilities introduced in 4.2BSD were not completely
37 implemented.  An important part of the effort that went into
38 4.3BSD was to clean up and unify both new and old facilities.
39 .NH 2
40 Kernel Extensions
41 .PP
42 A significant effort went into improving
43 the networking part of the kernel.
44 The work consisted of fixing bugs,
45 tuning the algorithms,
46 and revamping the lowest levels of the system
47 to better handle heterogeneous network topologies.
48 .NH 3
49 Subnets, Broadcasts and Gateways
50 .PP
51 To allow sites to expand their network in an autonomous
52 and orderly fashion, subnetworks have been introduced in 4.3BSD [GADS85].
53 This facility allows sites to subdivide their local Internet address
54 space into multiple subnetwork address spaces that are visible
55 only by hosts at that site.  To off-site hosts machines on a site's
56 subnetworks appear to reside on a single network.  The routing daemon
57 has been reworked to provide routing support in this type of
58 environment.
59 .PP
60 The default Internet broadcast address is now specified with a host part
61 of all one's, rather than all zero's.
62 The broadcast address may be set at boot time on a per-interface basis.
63 .NH 3
64 Interface Addressing
65 .PP
66 The organization of network interfaces has been
67 reworked to more cleanly support multiple
68 network protocols.  Network interfaces no longer
69 contain a host's address on that network; instead
70 each interface contains a pointer to a list of addresses
71 assigned to that interface.  This permits a single
72 interface to support, for example, Internet protocols
73 at the same time as XNS protocols.
74 .PP
75 The Address Resolution Protocol (ARP) support
76 for 10 megabyte/second Ethernet\(dg
77 .FS
78 \(dg Ethernet is a trademark of Xerox.
79 .FE
80 has been made more flexible by allowing hosts to
81 act as a ``clearing house'' for hosts that do
82 not support ARP.  In addition, system managers have
83 more control over the contents of the ARP translation
84 cache and may interactively interrogate and modify
85 the cache's contents.
86 .NH 3
87 User Control of Network Buffering
88 .PP
89 Although the system allocates reasonable default amounts of buffering
90 for most connections, certain operations such as file system dumps
91 to remote machines benefit from significant increases in buffering [Walsh84].
92 The \fIsetsockopt\fP system call has been extended to allow such requests.
93 In addition, \fIgetsockopt\fP and \fIsetsockopt\fP,
94 are now interfaced to the protocol level allowing protocol-specific
95 options to be manipulated by the user.
96 .NH 3
97 Number of File Descriptors
98 .PP
99 To allow full use of the many descriptor based services available,
100 the previous hard limit of 30 open files per process has been relaxed.
101 The changes entailed generalizing \fIselect\fP to handle arrays of
102 32-bit words, removing the dependency on file descriptors from
103 the page table entries,
104 and limiting most of the linear scans of a process's file table.
105 The default per-process descriptor limit was raised from 20 to 64,
106 though there are no longer any hard upper limits on the number
107 of file descriptors.
108 .NH 3
109 Kernel Limits
110 .PP
111 Many internal kernel configuration limits have been increased by suitable
112 modifications to data structures.
113 The limit on physical memory has been changed from 8 megabyte to 64 megabyte,
114 and the limit of 15 mounted file systems has been changed to 255.
115 The maximum file system size has been increased to 8 gigabyte,
116 number of processes to 65536,
117 and per process size to 64 megabyte of data and 64 megabyte of stack.
118 Note that these are upper bounds,
119 the default limits for these quantities are tuned for systems
120 with 4-8 megabyte of physical memory.
121 .NH 3
122 Memory Management
123 .PP
124 The global clock page replacement algorithm used to have a single
125 hand that was used both to mark and to reclaim memory.
126 The first time that it encountered a page it would clear its reference bit.
127 If the reference bit was still clear on its next pass across the page,
128 it would reclaim the page.
129 The use of a single hand does not work well with large physical
130 memories as the time to complete a single revolution of the hand
131 can take up to a minute or more.
132 By the time the hand gets around to the marked pages,
133 the information is usually no longer pertinent.
134 During periods of sudden shortages,
135 the page daemon will not be able to find any reclaimable pages until
136 it has completed a full revolution.
137 To alleviate this problem,
138 the clock hand has been split into two separate hands.
139 The front hand clears the reference bits,
140 the back hand follows a constant number of pages behind
141 reclaiming pages that still have cleared reference bits.
142 While the code has been written to allow the distance between
143 the hands to be varied, we have not found any algorithms
144 suitable for determining how to dynamically adjust this distance.
145 .PP
146 The configuration of the virtual memory system used to require
147 a significant understanding of its operation to do such
148 simple tasks as increasing the maximum process size.
149 This process has been significantly improved so that the most
150 common configuration parameters, such as the virtual memory sizes,
151 can be specified using a single option in the configuration file.
152 Standard configurations support data and stack segments
153 of 17, 33 and 64 megabytes.
154 .NH 3
155 Signals
156 .PP
157 The 4.2BSD signal implementation would push several words
158 onto the normal run-time stack before switching to an
159 alternate signal stack.
160 The 4.3BSD implementation has been corrected so that
161 the entire signal handler's state is now pushed onto the signal stack.
162 Another limitation in the original signal implementation was
163 that it used an undocumented system call to return from signals.
164 Users could not write their own return from exceptions;
165 4.3BSD formally specifies the \fIsigreturn\fP system call.
166 .PP
167 Many existing programs depend on interrupted system calls.
168 The restartable system call semantics of 4.2BSD signals caused
169 many of these programs to break.
170 To simplify porting of programs from inferior versions of
171 .UX
172 the \fIsigvec\fP system call has been extended so that
173 programmers may specify that system calls are not to be
174 restarted after particular signals.
175 .NH 3
176 System Logging
177 .PP
178 A system logging facility has been added
179 that sends kernel messages to the
180 syslog daemon for logging in /usr/adm/messages and possibly for
181 printing on the system console.
182 The revised scheme for logging messages
183 eliminates the time lag in updating the messages file,
184 unifies the format of kernel messages,
185 provides a finer granularity of control over the messages
186 that get printed on the console,
187 and eliminates the degradation in response during the printing of
188 low-priority kernel messages.
189 Recoverable system errors and common resource limitations are logged
190 using this facility.
191 Most system utilities such as init and login,
192 have been modified to log errors to syslog
193 rather than writing directly on the console.
194 .NH 3
195 Windows
196 .PP
197 The tty structure has been augmented to hold
198 information about the size
199 of an associated window or terminal.
200 These sizes can be obtained by programs such as editors that want
201 to know the size of the screen they are manipulating.
202 When these sizes are changed,
203 a new signal, SIGWINCH, is sent the current process group.
204 The editors have been modified to catch this signal and reshape
205 their view of the world, and the remote login program and server
206 now cooperate to propagate window sizes and window size changes
207 across a network.
208 Other programs and libraries such as curses that need the width
209 or height of the screen have been modified to use this facility as well.
210 .NH 3
211 Configuration of UNIBUS Devices
212 .PP
213 The UNIBUS configuration routines have been extended to allow auto-configuration
214 of dedicated UNIBUS memory held by devices.
215 The new routines simplify the configuration of memory-mapped devices
216 and correct problems occurring on reset of the UNIBUS.
217 .NH 3
218 Disk Recovery from Errors
219 .PP
220 The MASSBUS disk driver's error recovery routines have been fixed to
221 retry before correcting ECC errors, support ECC on bad-sector replacements,
222 and correctly attempt retries after earlier
223 corrective actions in the same transfer.
224 The error messages are more accurate.
225 .NH 2
226 Functional Extensions to Libraries and Utilities
227 .PP
228 Most of the changes to the utilities and libraries have been to
229 allow them to handle a more general set of problems,
230 or to handle the same set of problems more quickly.
231 .NH 3
232 Name Server
233 .PP
234 In 4.2BSD the name resolution routines (\fIgethostbyname\fP,
235 \fIgetservbyname\fP,
236 etc.) were implemented by a set of database files maintained on the
237 local machine.
238 Inconsistencies or obsolescence in these files resulted in inaccessibility of
239 hosts or services.
240 In 4.3BSD these files may be replaced by a network name server that can
241 insure a consistent view of the name space in a multimachine environment.
242 This name server operates in accordance with Internet standards
243 for service on the ARPANET [Mockapetris83].
244 .NH 3
245 System Management
246 .PP
247 A new utility, \fIrdist\fP,
248 has been provided to assist system managers in keeping
249 all their machines up to date with a consistent set of sources and binaries.
250 A master set of sources may reside on a single central machine,
251 or be distributed at (known) locations throughout the environment.
252 New versions of \fIgetty\fP, \fIinit\fP, and \fIlogin\fP
253 merge the functions of several
254 files into a single place, and allow more flexibility in the
255 startup of processes such as window managers.
256 .PP
257 The new utility \fItimed\fP keeps the time on a group of cooperating machines
258 (within a single LAN) synchronized to within 30 milliseconds.
259 It does its corrections using a new system call that changes
260 the rate of time advance without stopping or reversing the system clock.
261 It normally selects one machine to act as a master.
262 If the master dies or is partitioned, a new master is elected.
263 Other machines may participate in a purely slave role.
264 .NH 3
265 Routing
266 .PP
267 Many bugs in the routing daemon have been fixed;
268 it is considerably more robust,
269 and now understands how to properly deal with
270 subnets and point-to-point networks.
271 Its operation has been made more efficient by tuning with the use
272 of execution profiles, along with inline expansion of common operations
273 using the kernel's \fIinline\fP optimizer.
274 .NH 3
275 Compilers
276 .PP
277 The symbolic debugger \fIdbx\fP has had many new features added,
278 and all the known bugs fixed.  In addition \fIdbx\fP
279 has been extended to work with the Pascal compiler.
280 The fortran compiler \fIf77\fP has had numerous bugs fixed.
281 The C compiler has been modified so that it can, optionally,
282 generate single precision floating point instructions when operating
283 on single precision variables.