Project

General

Profile

Bug #295 » tuning.diff

victor, 08/21/2006 07:30 PM

View differences:

share/man/man7/tuning.7 Sat Aug 19 14:59:58 2006 +0200 → share/man/man7/tuning.7 Mon Aug 21 17:43:03 2006 +0200
.Pa /usr
partition holds the bulk of the files required to support the system and
a subdirectory within it called
.Pa /usr/local
.Pa /usr/pkg
holds the bulk of the files installed from the
.Xr ports 7
hierarchy.
If you do not use ports all that much and do not intend to keep
pkgsrc collection.
If you do not use pkgsrc all that much and do not intend to keep
system source
.Pq Pa /usr/src
on the machine, you can get away with
a 1 gigabyte
.Pa /usr
partition.
However, if you install a lot of ports
However, if you install a lot of packages
(especially window managers and Linux-emulated binaries), we recommend
at least a 2 gigabyte
.Pa /usr
......
with
.Dq Li "tunefs -n enable /filesystem" .
(Note: in
.Fx 4.5
and later, softupdates can be turned on using the
.Dx ,
softupdates can be turned on using the
.Fl U
option to
.Xr newfs 8 ,
and
.Xr sysinstall 8
will typically enable softupdates automatically for non-root filesystems).
.Dx
installer will typically enable softupdates automatically for
non-root filesystems).
Softupdates drastically improves meta-data performance, mainly file
creation and deletion.
We recommend enabling softupdates on most filesystems; however, there
......
the shared memory into core, making it unswappable.
.Pp
The
.Va vfs.vmiodirenable
sysctl defaults to 1 (on).
This parameter controls how directories are cached
by the system.
Most directories are small and use but a single fragment
(typically 1K) in the filesystem and even less (typically 512 bytes) in
the buffer cache.
However, when operating in the default mode the buffer
cache will only cache a fixed number of directories even if you have a huge
amount of memory.
Turning on this sysctl allows the buffer cache to use
the VM Page Cache to cache the directories.
The advantage is that all of
memory is now available for caching directories.
The disadvantage is that
the minimum in-core memory used to cache a directory is the physical page
size (typically 4K) rather than 512 bytes.
We recommend turning this option off in memory-constrained environments;
however, when on, it will substantially improve the performance of services
that manipulate a large number of files.
Such services can include web caches, large mail systems, and news systems.
Turning on this option will generally not reduce performance even with the
wasted memory but you should experiment to find out.
.Pp
The
.Va vfs.write_behind
sysctl defaults to 1 (on). This tells the filesystem to issue media
writes as full clusters are collected, which typically occurs when writing
......
to detect dead TCP connections by intermittently delivering
.Dq keepalives
on the connection.
By default, this is enabled for all applications; by setting this
sysctl to 0, only applications that specifically request keepalives
will use them.
By default, this is disabled for all applications, only applications
that specifically request keepalives will use them.
In most environments, TCP keepalives will improve the management of
system state by expiring dead TCP connections, particularly for
systems serving dialup users who may not always terminate individual
......
slightly delay the teardown of a connection, or slightly delay the ramp-up
of a slow-start TCP connection. While we aren't sure we believe that
the several FAQs related to packages such as SAMBA and SQUID which advise
turning off delayed acks may be refering to the slow-start issue. In
.Dx
it would be more beneficial to increase the slow-start flightsize via
the
.Va net.inet.tcp.slowstart_flightsize
sysctl rather then disable delayed acks.
turning off delayed acks may be refering to the slow-start issue.
.Pp
The
.Va net.inet.tcp.inflight_enable
......
.Va kern.maxusers
controls the scaling of a number of static system tables, including defaults
for the maximum number of open files, sizing of network memory resources, etc.
As of
.Fx 4.5 ,
On
.Dx ,
.Va kern.maxusers
is automatically sized at boot based on the amount of memory available in
the system, and may be determined at run-time by inspecting the value of the
......
.Va kern.maxusers
may be individually overridden at boot-time or run-time as described
elsewhere in this document.
Systems older than
.Fx 4.4
must set this value via the kernel
.Xr config 8
option
.Cd maxusers
instead.
.Pp
.Va kern.ipc.nmbclusters
may be adjusted to increase the number of network mbufs the system is
......
option to
.Xr netstat 1
may be used to observe network cluster use.
Older versions of
.Fx
do not have this tunable and require that the
kernel
.Xr config 8
option
.Dv NMBCLUSTERS
be set instead.
.Pp
More and more programs are using the
.Xr sendfile 2
    (1-1/1)