config(8)


NAME
     config - configuring Minix tasks and servers

DESCRIPTION
     Minix has a number of configuration files containing parameters that  can
     be  changed to enable or disable a device driver, to change the number of
     times a resource can be used, or to tune the performance of  the  system.
     We  will  name  the  file  that  contains  the parameter, the name of the
     parameter, and the values it can be set to.  Some comments  are  prefixed
     by  "8086"  for  Minix  running  in  16-bit  real  mode, "286" for 16-bit
     protected mode, and "386" for 32-bit protected mode.  Configuration  file
     names  can be <file.h> for a file in /usr/include/, or a simple file name
     for a file in /usr/src/.

     There may be several definitions for a parameter with only  one  that  is
     active.    Which   one  this  is  is  easy  to  find  if  you  know  that
     (CPU == INTEL) is true, and _WORD_SIZE equals 2 in 16-bit mode, and 4  in
     32-bit mode.

  <minix/config.h>
     This is the main configuration file for the Minix.  It contains  lots  of
     boolean variables to enable or disable drivers and a number of parameters
     that specify the sizes of system data structures:

     NR_PROCS
          The number of slots in the  process  table,  and  thus  the  maximum
          number  of  processes  that  can  be  run  concurrently.   Should be
          increased from the default 32 if networking is enabled  (add  8  for
          deamons),  and  if  more  users are using the system (add 4 for each
          active session).  There are a lot of loops in  the  kernel  scanning
          the  process  table,  so  setting NR_PROCS too high will slow things
          down a little bit, so don't overdo it.

     NR_BUFS
          The number of disk buffers in the file system server.  It is used to
          keep  frequently  used  disk  blocks  in  memory.   8086 & 286:  The
          default is 40, and that's about as high as it can be set.  386:  The
          default  is 80, which is best increased to 1024 if you can spare the
          memory.  More will help, but the effect won't be  as  pronounced  as
          1024  is  more  than enough to contain the working set of one active
          user.

     ENABLE_CACHE2
          If set to 1 allows the RAM disk to be used as a  second  level  file
          system  cache.   Any  block that is evicted from the normal cache is
          both written to disk (if dirty), and  copied  to  the  second  level
          cache.   If  it  is needed again then the block is reloaded from the
          RAM disk if it is still there.  8086:  Forget it, you don't have any
          memory  for  it.   286:   Turn  it  on  and set the boot environment
          variable ramsize to 512 if you have the memory.   That's  enough  to
          contain the working set of one active user, and also the maximum  FS
          can  handle.  386:  The installation scripts sets ramsize to 1024 if
          there is enough memory.  Your first point of call is  to  compile  a
          new kernel with ENABLE_CACHE2 off, NR_BUFS set to a large value, and
          ramsize set back to zero.  A normal block cache  works  much  better
          than a two level arrangement.

     ENABLE_AT_WINI
          Enables the AT or IDE disk driver.  (The IDE interface grew  out  of
          the  old  AT  disk  interface.)   Any  run of the mill PC needs this
          driver.  (Several of these "wini" drivers may be enabled,  but  only
          one may run as chosen by the hd boot variable.)

     ENABLE_BIOS_WINI
          Enables the BIOS disk driver.  The BIOS driver uses the system  BIOS
          to  read or write disk blocks.  8086:  The preferred disk driver for
          XT class machines.  286 & 386:  Use a native driver if  possible  to
          avoid switching back to real mode to make BIOS calls.  Especially on
          the 286 this is a painful affair.

     ENABLE_ESDI_WINI
          Enables the ESDI disk driver.  Some PS/2 models have this disk.

     ENABLE_XT_WINI
          Enables the XT disk driver.  Useful for early IBM/AT  machines  that
          have XT disks.  In real mode it is best to use the BIOS driver.

     ENABLE_AHA1540_SCSI
          Enables the Adaptec 1540 series SCSI driver.

     ENABLE_MITSUMI_CDROM
          Enables the Mitsumi CD-ROM driver.  (Proprietary Mitsumi  interface,
          almost extinct.  There is no support for IDE/ATAPI CD-ROM yet.)

     ENABLE_DOSFILE
          Enable the "DOS file as disk" driver that is used when Minix is  run
          from MS-DOS to access a large file as a disk.

     ENABLE_DOSFAT
          Enable the "DOS file as disk" driver that interprets a DOS FAT  file
          system  to find a large file to use as a disk.  This driver combined
          with a fast native Minix disk driver is a  better  choice  then  the
          previous  driver.   (And it works when Minix is not started from MS-
          DOS.)  See dosd(4) for more comments on these two drivers.

     ENABLE_SB_AUDIO
          Enable the Soundblaster-16 audio driver.



     DMA_SECTORS
          The size of the DMA buffer for drivers that use DMA or other drivers
          that  can only do I/O to a single chunk of memory.  (BIOS, ESDI, XT,
          DOSFILE.)  Choose a number between 1 and 128 for the sector size  of
          this  buffer.   The  memory  cost  is  twice this amount, because of
          trouble getting it aligned in memory properly.  A value of 16 is the
          minimum to work well, choose 64 if you have enough memory.

     NR_CONSOLES
          Number of virtual consoles.  By default 2, so you can have two login
          sessions  that  can  be  switched  to  by  ALT-F1,  ALT-F2  or  ALT-
          left/rightarrow.  If you have an EGA screen then you can specify  up
          to 4 virtual consoles, for VGA you can have 8.  It is best to choose
          one less to leave some video memory to  keep  text  scrolling  fast.
          You really should read console(4) on this.

     ENABLE_NETWORKING
          Master switch to enable networking support.  It causes  the  network
          server,  inet,  to be compiled and added to the kernel image, and it
          enables  the  network  driver  in  the  kernel.   See  boot(8)   for
          information on configuring network support.

     ENABLE_WDETH
          Enable code for the WD8003 and WD8013 cards in the network driver.

     ENABLE_NE2000
          Enable code for the NE1000 and NE2000 cards.

     ENABLE_3C503
          Enable code for the 3Com Etherlink II (3C503).

     NR_PTYS
          Number of pseudo terminals supported, by default 0,  which  disables
          the  driver.   Pseudo terminals are used for incoming network logins
          by telnet or rlogin.  One pty is needed per session.

     NR_RS_LINES
          Number of RS-232 lines supported.  By default 2 for a normal kernel,
          but  0  for  a tiny kernel used for XT installation.  You can save a
          bit of memory by setting this parameter to zero if  you  don't  need
          serial lines.

  fs/const.h
     This file contains most of the parameters used by the file  system  code.
     Most of these cannot be changed, with the exception of these four:

     NR_FILPS
          Maximum number of open file descriptors for all processes  combined.
          A  "File  table overflow" error might indicate that this number must
          be increased.

     NR_INODES
          Maximum number of in-use files for  all  processes  combined.   Like
          above  a  "File  table  overflow"  error may also indicate that this
          number should be increased.  In cases like these one usually doubles
          both  parameters.   (If  one  table  runs  out then the other one is
          likely to run out also anyway.)

     NR_SUPERS
          Number of file systems that can be mounted.   Again  a  "file  table
          overflow"  error  is  given  if  this  table is full, but it will be
          produced by the mount command, so you  know  what's  wrong  in  this
          case.

     NR_LOCKS
          Number of active file locks by fcntl(2).  These locks are often used
          by  programs  that  update a shared file, like mail programs do with
          mail boxes.  A "no locks available" error indicates that this  table
          has run out.

  kernel/bios_wini.c
  kernel/dosfile.c
  kernel/dosfat.c
     The number of disks each of these drivers can handle is specified by:

     MAX_DRIVES
          This parameter is set to 4 for the BIOS and DOS "file" drivers,  and
          to 2 for the DOS "FAT" driver.  It can be set as high as you need to
          allow for more disks, or files as disks.  (The  "FAT"  driver  needs
          quite some memory per disk, which is why it by default only allows 2
          disks.)  You will need to run MAKEDEV(8) to create  the  extra  disk
          devices in /dev/.

  inet/buf.c
     The number of 512 byte buffers allocated for the TCP/IP server is:

     BUF512_NR
          These buffers are a shared resource used by the server for any  data
          it  wants  to  play  with.  For incoming data this number of buffers
          determines the time packets are kept around, with  each  new  packet
          evicting an old packet.  It's no big deal if packets get lost before
          a user process reads them, packets get lost all the time.  The  only
          real  problem  is  outgoing  TCP  data.   The  default  setting  for
          BUF512_NR allows up to four backlogged TCP streams, i.e.  when  data
          is  output  faster then it is read.  If more buffers are needed then
          one of the TCP connections is shut down.  When this happens you will
          see  a  "not  enough  buffers  left"  error.   This could happen for
          instance if a Minix web server is assaulted by a browser that  likes
          to  open  several connections to the server simultaneously.  The fix
          is to increase BUF512_NR to allow more slow  outgoing  TCP  streams.
          86:  The default of 32 buffers can be increased up to 64.  (The "TCP
          window size" has been limited in 16-bit mode to keep the buffer  use
          by  TCP  down.)   386:   The  default of 128 can be increased to any
          value you like, but 512 seems to be  more  than  enough.   Minix-vmd
          uses 512 by default, and it has yet to run out.

SEE ALSO
     hd(4), dosd(4), usage(8), boot(8).

AUTHOR
     Kees J. Bot (kjb@cs.vu.nl)