Index: chapter.sgml =================================================================== RCS file: /home/dcvs/doc/en_US.ISO8859-1/books/handbook/config/chapter.sgml,v retrieving revision 1.85 diff -u -r1.85 chapter.sgml --- chapter.sgml 3 Feb 2003 23:26:17 -0000 1.85 +++ chapter.sgml 3 Mar 2003 23:47:32 -0000 @@ -149,7 +149,7 @@ - Swap Partition + Swap Partition swap sizing swap partition @@ -229,7 +229,7 @@ directly implies this; it is configuration information for the rc* files. - An administrator should make entries in the + An administrator should make entries in the rc.conf file to override the default settings from /etc/defaults/rc.conf. The defaults file @@ -268,7 +268,7 @@ remains unique. Upgrading the system using &man.sysinstall.8; - or make world will not overwrite the + or make world will not overwrite the rc.conf file, so system configuration information will not be lost. @@ -292,12 +292,12 @@ Normally, when a port or package is installed, sample configuration files are also installed. These are usually - identified with a .default suffix. If there + identified with a .default suffix. If there are no existing configuration files for the application, they will be created by copying the .default files. - For example, consider the contents of the directory + For example, consider the contents of the directory /usr/local/etc/apache: -rw-r--r-- 1 root wheel 2184 May 20 1998 access.conf @@ -341,7 +341,7 @@ part of the installation of the package, and will be removed when the package is removed. - A generic startup script in + A generic startup script in /usr/local/etc/rc.d looks like: #!/bin/sh @@ -394,9 +394,9 @@ generally regarded as the location of last resort; if there is a better place to start a service, do it there. - Do not place any commands in + Do not place any commands in /etc/rc.conf. To start daemons, or - run any commands at boot time, place a script in + run any commands at boot time, place a script in /usr/local/etc/rc.d instead. @@ -405,7 +405,7 @@ least being that because &man.cron.8; runs these processes as the owner of the crontab, services may be started and maintained by non-root users. - + This takes advantage of a feature of &man.cron.8;: the time specification may be replaced by @reboot, which will @@ -861,7 +861,7 @@ Any other addresses which fall within this network must have a netmask of all 1s. - For example, consider the case where the + For example, consider the case where the fxp0 interface is connected to two networks, the 10.1.1.0 network with a netmask of 255.255.255.0 @@ -900,7 +900,7 @@ /etc - Generic system configuration information; data here is + Generic system configuration information; data here is system-specific. @@ -909,7 +909,7 @@ /etc/mail - Extra &man.sendmail.8; configuration, other + Extra &man.sendmail.8; configuration, other MTA configuration files. @@ -925,7 +925,7 @@ here. - /usr/local/etc + /usr/local/etc Configuration files for installed applications. May contain per-application subdirectories. @@ -962,12 +962,12 @@ The most common entries to resolv.conf are: - + - nameserver + nameserver The IP address of a name server the resolver should query. The servers are queried in the order listed with a maximum of three. @@ -994,8 +994,8 @@ Only one of the search and domain options should be used. - If you are using DHCP, &man.dhclient.8; usually rewrites - resolv.conf with information received from the + If you are using DHCP, &man.dhclient.8; usually rewrites + resolv.conf with information received from the DHCP server. @@ -1003,7 +1003,7 @@ <filename>/etc/hosts</filename> hosts - + /etc/hosts is a simple text database reminiscent of the old Internet. It works in conjunction with DNS and NIS providing name to IP address @@ -1047,7 +1047,7 @@ /etc/hosts takes on the simple format of: - + [Internet address] [official hostname] [alias1] [alias2] ... For example: @@ -1060,14 +1060,14 @@ Log File Configuration - + log files - + <filename>syslog.conf</filename> - + syslog.conf - + syslog.conf is the configuration file for the &man.syslogd.8; program. It indicates which types of syslog messages are logged to particular @@ -1113,7 +1113,7 @@ <filename>newsyslog.conf</filename> newsyslog.conf - + newsyslog.conf is the configuration file for &man.newsyslog.8;, a program that is normally scheduled to run by &man.cron.8;. &man.newsyslog.8; determines when log @@ -1130,7 +1130,7 @@ they are to be touched. Log files can be rearranged and/or archived when they have either reached a certain size, or at a certain periodic time/date. - + # configuration file for newsyslog # $FreeBSD$ # @@ -1163,8 +1163,8 @@ sysctl.conf sysctl - sysctl.conf looks much like - rc.conf. Values are set in a + sysctl.conf looks much like + rc.conf. Values are set in a variable=value form. The specified values are set after the system goes into multi-user mode. Not all variables are settable in this mode. @@ -1184,38 +1184,38 @@ sysctl Tuning with sysctl - + &man.sysctl.8; is an interface that allows you to make changes to a running FreeBSD system. This includes many advanced options of the TCP/IP stack and virtual memory system that can dramatically improve performance for an experienced system administrator. Over five hundred system variables can be read and set using &man.sysctl.8;. - + At its core, &man.sysctl.8; serves two functions: to read and to modify system settings. To view all readable variables: &prompt.user; sysctl -a - + To read a particular variable, for example, kern.maxproc: - + &prompt.user; sysctl kern.maxproc kern.maxproc: 1044 To set a particular variable, use the intuitive variable=value syntax: - + &prompt.root; sysctl kern.maxfiles=5000 kern.maxfiles: 2088 -> 5000 Settings of sysctl variables are usually either strings, numbers, or booleans (a boolean being 1 for yes or a 0 for no). - + @@ -1228,27 +1228,27 @@ &man.sysctl.8; read only - + In some cases it may be desirable to modify read-only &man.sysctl.8; values. While this is not recommended, it is also sometimes unavoidable. - + For instance on some laptop models the &man.cardbus.4; device will not probe memory ranges, and fail with errors which look similar to: - + cbb0: Could not map register memory device_probe_and_attach: cbb0 attach returned 12 - + Cases like the one above usually require the modification of some default &man.sysctl.8; settings which are set read only. To overcome these situations a user can put &man.sysctl.8; OIDs in their local /boot/loader.conf.local. Default settings are located in the /boot/defaults/loader.conf file. - + Fixing the problem mentioned above would require a user to set in the aforementioned file. Now &man.cardbus.4; will work properly. - + @@ -1257,14 +1257,14 @@ Sysctl Variables - + <varname>vfs.vmiodirenable</varname> - + vfs.vmiodirenable - + The vfs.vmiodirenable sysctl variable may be set to either 0 (off) or 1 (on); it is 1 by default. This variable controls how directories are cached by the system. Most directories are @@ -1285,14 +1285,14 @@ performance even with the wasted memory but you should experiment to find out. - + <varname>vfs.write_behind</varname> - + vfs.write_behind - + The vfs.write_behind sysctl variable defaults to 1 (on). This tells the file system to issue media writes as full clusters are collected, which @@ -1302,38 +1302,38 @@ processes and under certain circumstances you may wish to turn it off. - + <varname>vfs.hirunningspace</varname> - + vfs.hirunningspace - + The vfs.hirunningspace sysctl variable determines how much outstanding write I/O may be queued to disk controllers system-wide at any given instance. The default is usually sufficient but on machines with lots of disks you may - want to bump it up to four or five megabytes. + want to bump it up to four or five megabytes. Note that setting too high a value (exceeding the buffer cache's write threshold) can lead to extremely bad clustering performance. Do not set this value arbitrarily high! Higher write values may add latency to reads occurring at the same time. - + There are various other buffer-cache and VM page cache related sysctls. We do not recommend modifying these values. As of FreeBSD 4.3, the VM system does an extremely good job of automatically tuning itself. - + <varname>vm.swap_idle_enabled</varname> - + vm.swap_idle_enabled - + The vm.swap_idle_enabled sysctl variable is useful in large multi-user systems where you have lots of users entering and leaving the system and lots of idle processes. @@ -1355,7 +1355,7 @@ <varname>hw.ata.wc</varname> - + hw.ata.wc @@ -1378,12 +1378,12 @@ the kernel variable back to 1. This must be done from the boot loader at boot time. Attempting to do it after the kernel boots will have no effect. - + For more information, please see &man.ata.4;. - <option>SCSI_DELAY</option> + <title><option>SCSI_DELAY</option> (<varname>kern.cam.scsi_delay</varname>) @@ -1408,7 +1408,7 @@ Soft Updates tunefs - + The &man.tunefs.8; program can be used to fine-tune a file system. This program has many different options, but for now we are only concerned with toggling Soft Updates on and @@ -1425,7 +1425,7 @@ at filesystem creation time, through use of the -U option to &man.newfs.8;. - Soft Updates drastically improves meta-data performance, mainly + Soft Updates drastically improves meta-data performance, mainly file creation and deletion, through the use of a memory cache. We recommend to use Soft Updates on all of your file systems. There are two downsides to Soft Updates that you should be aware of: First, @@ -1440,13 +1440,13 @@ More details about Soft Updates - + Soft Updates (Details) There are two traditional approaches to writing a file systems meta-data back to disk. (Meta-data updates are updates to non-content data like inodes or directories.) - + Historically, the default behavior was to write out meta-data updates synchronously. If a directory had been changed, the system waited until the change was actually @@ -1520,7 +1520,7 @@ pending meta-data operations can be quickly either rolled-back or completed from the logging area after the system comes up again, resulting in a fast filesystem startup. - + Kirk McKusick, the developer of Berkeley FFS, solved this problem with Soft Updates: all pending meta-data updates are kept in memory and written out to disk @@ -1589,7 +1589,7 @@ Tuning Kernel Limits Tuning kernel limits - + File/Process Limits @@ -1599,7 +1599,7 @@ kern.maxfiles - + kern.maxfiles can be raised or lowered based upon your system requirements. This variable indicates the maximum number of file descriptors on your @@ -1678,12 +1678,25 @@ will require you to use the kernel &man.config.8; option. - Under extreme circumstances, you may need - to modify kern.ipc.nsfbufs sysctl. This sysctl - variable controls the number of filesystem buffers &man.sendfile.2; - is allowed to use for performing it's work. This parameter nominally - scales with kern.maxusers so you should not need - to modify it. + For busy servers that make extensive use of the + &man.sendfile.2; system call, it may be necessary to modify + the number of &man.sendfile.2; buffers via the + kernel configuration option. A + common indicator that this parameter needs to be adjusted is + when processes are seen in the sfbufa + state. The sysctl variable + kern.ipc.nsfbufs is a read-only glimpse at + the kernel configured variable. This parameter nominally + scales with kern.maxusers, however it may + be necessary to tune accordingly. + + + Even though a socket has been marked as non-blocking, + calling &man.sendfile.2; on the non-blocking socket will + result in the &man.sendfile.2; call blocking until enough + struct sf_buf's are made + available. + <varname>net.inet.ip.portrange.*</varname> @@ -1732,7 +1745,7 @@ to calculate the bandwidth delay product for each connection and limit the amount of data queued to the network to just the amount required to maintain optimum throughput. - + This feature is useful if you are serving data over modems, Gigabit Ethernet, or even high speed WAN links (or any other link with a high bandwidth delay product), especially if you are also @@ -1915,7 +1928,7 @@ - + ACPI and FreeBSD It is very important to utilize hardware resources in an @@ -1954,7 +1967,7 @@ Configuring <acronym>ACPI</acronym> - + The acpi.ko driver is loaded by default at start up by the &man.loader.8; and should not be compiled into the kernel. The reasoning behind this is that modules @@ -1980,11 +1993,11 @@ which is the same action as: &prompt.root; halt -p - + The other options are available. Check out the &man.acpiconf.8; manual page for more information. - + Debugging <acronym>ACPI</acronym>