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