source: trunk/minix/man/man8/config.8@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 10.2 KB
RevLine 
[9]1.TH CONFIG 8
2.SH NAME
3config \- configuring MINIX 3 tasks and servers
4.SH DESCRIPTION
5.de SP
6.if t .sp 0.4
7.if n .sp
8..
9MINIX 3 has a number of configuration files containing parameters that can
10be changed to enable or disable a device driver, to change the number of
11times a resource can be used, or to tune the performance of the system.
12We will name the file that contains the parameter, the name of the
13parameter, and the values it can be set to. Some comments are prefixed by
14"8086" for MINIX 3 running in 16-bit real mode, "286" for 16-bit protected
15mode, and "386" for 32-bit protected mode.
16Configuration file names can be
17.RI < file.h >
18for a file in
19.BR /usr/include/ ,
20or a simple file name for a file in
21.BR /usr/src/ .
22.PP
23There may be several definitions for a parameter with only one that is
24active. Which one this is is easy to find if you know that
25.B "(\s-2CPU\s+2\ ==\ \s-2INTEL\s+2)"
26is true, and
27.SB _WORD_SIZE
28equals
29.B 2
30in 16-bit mode, and
31.B 4
32in 32-bit mode.
33.PP
34.ti 2m
35.RB < minix/config.h >
36.br
37This is the main configuration file for the MINIX 3. It contains lots of
38boolean variables to enable or disable drivers and a number of parameters
39that specify the sizes of system data structures:
40.TP
41.SB NR_PROCS
42The number of slots in the process table, and thus the maximum number of
43processes that can be run concurrently. Should be increased from the
44default
45.B 32
46if networking is enabled (add
47.B 8
48for deamons), and if more users are using the system (add
49.B 4
50for each active session). There are a lot of
51loops in the kernel scanning the process table, so setting
52.SB NR_PROCS
53too high will slow things down a little bit, so don't overdo it.
54.TP
55.SB NR_BUFS
56The number of disk buffers in the file system server. It is used to keep
57frequently used disk blocks in memory.
58.BR 8086 " & " 286 :
59The default is
60.BR 40 ,
61and that's about as high as it can be set.
62.BR 386 :
63The default is
64.BR 80 ,
65which is best increased to
66.B 1024
67if you can spare the memory. More will help, but the effect won't be as
68pronounced as
69.B 1024
70is more than enough to contain the working set of one active user.
71.TP
72.SB NR_CTRLRS
73Number of tasks used for disk or tape controllers. By default 2, maximum 4.
74You need a controller task for each device class to be handled through a
75.BI /dev/c n "*"
76set of devices.
77.TP
78.SB ENABLE_CACHE2
79If set to 1 allows the RAM disk to be used as a second level file system
80cache. Any block that is evicted from the normal cache is both written to
81disk (if dirty), and copied to the second level cache. If it is needed
82again then the block is reloaded from the RAM disk if it is still there.
83.BR 8086 :
84Forget it, you don't have any memory for it.
85.BR 286 :
86Turn it on and set the boot environment variable
87.B ramsize
88to
89.B 512
90if you have the memory. That's enough to contain the working set of
91one active user, and is also the maximum FS can handle.
92.BR 386 :
93The installation scripts sets
94.B ramsize
95to
96.B 1024
97if there is enough memory. Your first point of call is to compile a
98new kernel with
99.SB ENABLE_CACHE2
100off,
101.SB NR_BUFS
102set to a large value, and
103.B ramsize
104set back to zero. A normal block cache works much better than a two level
105arrangement.
106.TP
107.SB ENABLE_AT_WINI
108Enables the AT or IDE disk driver. (The IDE interface grew out of the old
109AT disk interface.) Any run of the mill PC needs this driver. You need to
110assign a driver like this one to a controller task using one of the
111.BI c n
112boot variables. See
113.BR boot (8).
114.TP
115.SB ENABLE_BIOS_WINI
116Enables the BIOS disk driver. The BIOS driver uses the system BIOS to read
117or write disk blocks.
118.BR 8086 :
119The preferred disk driver for XT class machines.
120.BR 286 " & " 386 :
121Use a native driver if possible to avoid switching back to real mode to make
122BIOS calls. Especially on the 286 this is a painful affair.
123.TP
124.SB ENABLE_ESDI_WINI
125Enables the ESDI disk driver. Some PS/2 models have this disk.
126.TP
127.SB ENABLE_XT_WINI
128Enables the XT disk driver. Useful for early IBM/AT machines that have XT
129disks. In real mode it is best to use the BIOS driver.
130.TP
131.SB ENABLE_AHA1540_SCSI
132Enables the Adaptec 1540 series SCSI driver.
133.TP
134.SB ENABLE_DOSFILE
135Enable the "DOS file as disk" driver that is used when MINIX 3 is run from
136MS-DOS to access a large file as a disk.
137.TP
138.SB ENABLE_FATFILE
139Enable the "FAT file as disk" driver that interprets a FAT file system
140to find a large file to use as a disk. This driver combined with a fast
141native MINIX 3 disk driver is a better choice then the previous driver. (And
142it works when MINIX 3 is not started from MS-DOS.) This is the last driver
143that needs to be assigned to a controller task.
144.TP
145.SB ENABLE_SB16
146Enable the Soundblaster-16 audio driver.
147.TP
148.SB ENABLE_PRINTER
149Enable the Printer driver.
150.TP
151.SB DMA_SECTORS
152The size of the DMA buffer for drivers that use DMA or other drivers that
153can only do I/O to a single chunk of memory. (BIOS, ESDI, XT, DOSFILE.)
154Choose a number between
155.B 1
156and
157.B 128
158for the sector size of this buffer. The memory cost is twice this amount,
159because of trouble getting it aligned in memory properly. A value of
160.B 16
161is the minimum to work well, choose
162.B 64
163if you have enough memory.
164.TP
165.SB NR_CONSOLES
166Number of virtual consoles. By default
167.BR 2 ,
168so you can have two login sessions that can be switched to by ALT-F1,
169ALT-F2 or ALT-left/rightarrow. If you have an EGA screen then you can
170specify up to
171.B 4
172virtual consoles, for VGA you can have
173.BR 8 .
174It is best to choose one less to leave some video memory to keep text
175scrolling fast. You really should read
176.BR console (4)
177on this. Note also the
178.B console
179boot variable, you can use it to put more characters on the screen, at
180the cost of video memory.
181.TP
182.SB ENABLE_DP8390
183Master switch to enable the network drivers. They are required by the
184network server,
185.BR inet .
186See
187.BR boot (8)
188for information on configuring network support.
189.TP
190.SB ENABLE_WDETH
191Enable code for the WD8003 and WD8013 cards in the network driver.
192.TP
193.SB ENABLE_NE2000
194Enable code for the NE1000 and NE2000 cards.
195.TP
196.SB ENABLE_3C503
197Enable code for the 3Com Etherlink II (3C503).
198.TP
199.SB NR_PTYS
200Number of pseudo terminals supported, by default
201.BR 0 ,
202which disables the driver. Pseudo terminals are used for incoming network
203logins by telnet or rlogin. One pty is needed per session.
204.TP
205.SB NR_RS_LINES
206Number of RS-232 lines supported. By default
207.B 2
208for a normal kernel, but
209.B 0
210for a tiny kernel used for XT installation. You can save a bit of memory by
211setting this parameter to zero if you don't need serial lines.
212.PP
213.ti 2m
214.BR fs/const.h
215.br
216This file contains most of the parameters used by the file system code.
217Most of these cannot be changed, with the exception of these four:
218.TP
219.SB NR_FILPS
220Maximum number of open file descriptors for all processes combined. A "File
221table overflow" error might indicate that this number must be increased.
222.TP
223.SB NR_INODES
224Maximum number of in-use files for all processes combined. Like above a
225"File table overflow" error may also indicate that this number should be
226increased. In cases like these one usually doubles both parameters. (If
227one table runs out then the other one is likely to run out also anyway.)
228.TP
229.SB NR_SUPERS
230Number of file systems that can be mounted. Again a "file table overflow"
231error is given if this table is full, but it will be produced by the
232.B mount
233command, so you know what's wrong in this case.
234.TP
235.SB NR_LOCKS
236Number of active file locks by
237.BR fcntl (2).
238These locks are often used by programs that update a shared file, like mail
239programs do with mail boxes. A "no locks available" error indicates that
240this table has run out.
241.PP
242.ti 2m
243.B kernel/bios_wini.c
244.ti 2m
245.B kernel/dosfile.c
246.ti 2m
247.B kernel/fatfile.c
248.br
249The number of disks each of these drivers can handle is specified by:
250.TP
251.B MAX_DRIVES
252This parameter is set to
253.B 4
254for the BIOS and "DOS file" drivers, and to
255.B 2
256for the "FAT file" driver. It can be set as high as you need to allow for
257more disks, or files as disks. (The "FAT" driver needs quite some memory per
258disk, which is why it by default only allows 2 disks.) You will need to run
259.BR MAKEDEV (8)
260to create the extra disk devices in
261.BR /dev/ .
262.PP
263.ti 2m
264.B inet/inet_config.h
265.br
266The maximum number of TCP/IP networks is:
267.TP
268.B IP_PORT_MAX
269Sets the maximum number of networks that can be defined in
270.BR /etc/inet.conf .
271.BR 8086 ,
272.BR 286 :
273By default 2.
274.BR 386 :
275By default 4.
276.PP
277.ti 2m
278.B inet/buf.c
279.br
280The number of 512 byte buffers allocated for data within the TCP/IP server is:
281.TP
282.B BUF512_NR
283These buffers are a shared resource used by the server for any data it wants
284to play with. For incoming data this number of buffers determines the time
285packets are kept around, with each new packet evicting an old packet. It's
286no big deal if packets get lost before a user process reads them, packets
287get lost all the time. The only real problem is outgoing TCP data. The
288default setting for
289.SB BUF512_NR
290allows up to four backlogged TCP streams, i.e. when data is output faster
291then it is read. If more buffers are needed then one of the TCP connections
292is shut down. When this happens you will see a "not enough buffers left"
293error. This could happen for instance if a MINIX 3 web server is assaulted by
294a browser that likes to open several connections to the server
295simultaneously. The fix is to increase
296.SB BUF512_NR
297to allow more slow outgoing TCP streams.
298.BR 86 :
299The default of
300.B 32
301buffers can be increased up to
302.BR 64 .
303(The "TCP window size" has been limited in 16-bit mode to keep the buffer
304use by TCP down.)
305.BR 386 :
306The default of
307.B 128
308can be increased to any value you like, but
309.B 512
310seems to be more than enough. Minix-vmd uses 512 by default, and it seems
311happy that way.
312.SH "SEE ALSO"
313.BR controller (4),
314.BR usage (8),
315.BR boot (8),
316.BR MAKEDEV (8).
317.SH NOTES
318Associated with drivers there are device files to access the devices
319controlled by the drivers that may have to be created. Let's simplify this
320sentence: Type
321.BR "ls /dev" ,
322note that there are only
323.B c0*
324and
325.B c1*
326devices, and only for two disks each. Some devices, like the audio devices,
327are not even present. So if you enable a driver, or increase some limits, you
328also need to use
329.BR MAKEDEV (8)
330in
331.B /dev
332to allow programs to talk to the drivers.
333.SH AUTHOR
334Kees J. Bot (kjb@cs.vu.nl)
Note: See TracBrowser for help on using the repository browser.