tuning.diff

victor, 08/21/2006 07:30 PM

Download (5.14 KB)

View differences:

share/man/man7/tuning.7 Mon Aug 21 17:43:03 2006 +0200
120 120
.Pa /usr
121 121
partition holds the bulk of the files required to support the system and
122 122
a subdirectory within it called
123
.Pa /usr/local
123
.Pa /usr/pkg
124 124
holds the bulk of the files installed from the
125
.Xr ports 7
126
hierarchy.
127
If you do not use ports all that much and do not intend to keep
125
pkgsrc collection.
126
If you do not use pkgsrc all that much and do not intend to keep
128 127
system source
129 128
.Pq Pa /usr/src
130 129
on the machine, you can get away with
131 130
a 1 gigabyte
132 131
.Pa /usr
133 132
partition.
134
However, if you install a lot of ports
133
However, if you install a lot of packages
135 134
(especially window managers and Linux-emulated binaries), we recommend
136 135
at least a 2 gigabyte
137 136
.Pa /usr
......
260 259
with
261 260
.Dq Li "tunefs -n enable /filesystem" .
262 261
(Note: in
263
.Fx 4.5
264
and later, softupdates can be turned on using the
262
.Dx ,
263
softupdates can be turned on using the
265 264
.Fl U
266 265
option to
267 266
.Xr newfs 8 ,
268 267
and
269
.Xr sysinstall 8
270
will typically enable softupdates automatically for non-root filesystems).
268
.Dx
269
installer will typically enable softupdates automatically for
270
non-root filesystems).
271 271
Softupdates drastically improves meta-data performance, mainly file
272 272
creation and deletion.
273 273
We recommend enabling softupdates on most filesystems; however, there
......
394 394
the shared memory into core, making it unswappable.
395 395
.Pp
396 396
The
397
.Va vfs.vmiodirenable
398
sysctl defaults to 1 (on).
399
This parameter controls how directories are cached
400
by the system.
401
Most directories are small and use but a single fragment
402
(typically 1K) in the filesystem and even less (typically 512 bytes) in
403
the buffer cache.
404
However, when operating in the default mode the buffer
405
cache will only cache a fixed number of directories even if you have a huge
406
amount of memory.
407
Turning on this sysctl allows the buffer cache to use
408
the VM Page Cache to cache the directories.
409
The advantage is that all of
410
memory is now available for caching directories.
411
The disadvantage is that
412
the minimum in-core memory used to cache a directory is the physical page
413
size (typically 4K) rather than 512 bytes.
414
We recommend turning this option off in memory-constrained environments;
415
however, when on, it will substantially improve the performance of services
416
that manipulate a large number of files.
417
Such services can include web caches, large mail systems, and news systems.
418
Turning on this option will generally not reduce performance even with the
419
wasted memory but you should experiment to find out.
420
.Pp
421
The
422 397
.Va vfs.write_behind
423 398
sysctl defaults to 1 (on).  This tells the filesystem to issue media
424 399
writes as full clusters are collected, which typically occurs when writing
......
505 480
to detect dead TCP connections by intermittently delivering
506 481
.Dq keepalives
507 482
on the connection.
508
By default, this is enabled for all applications; by setting this
509
sysctl to 0, only applications that specifically request keepalives
510
will use them.
483
By default, this is disabled for all applications, only applications
484
that specifically request keepalives will use them.
511 485
In most environments, TCP keepalives will improve the management of
512 486
system state by expiring dead TCP connections, particularly for
513 487
systems serving dialup users who may not always terminate individual
......
536 510
slightly delay the teardown of a connection, or slightly delay the ramp-up
537 511
of a slow-start TCP connection.  While we aren't sure we believe that
538 512
the several FAQs related to packages such as SAMBA and SQUID which advise
539
turning off delayed acks may be refering to the slow-start issue.  In
540
.Dx
541
it would be more beneficial to increase the slow-start flightsize via
542
the
543
.Va net.inet.tcp.slowstart_flightsize
544
sysctl rather then disable delayed acks.
513
turning off delayed acks may be refering to the slow-start issue.
545 514
.Pp
546 515
The
547 516
.Va net.inet.tcp.inflight_enable
......
665 634
.Va kern.maxusers
666 635
controls the scaling of a number of static system tables, including defaults
667 636
for the maximum number of open files, sizing of network memory resources, etc.
668
As of
669
.Fx 4.5 ,
637
On
638
.Dx ,
670 639
.Va kern.maxusers
671 640
is automatically sized at boot based on the amount of memory available in
672 641
the system, and may be determined at run-time by inspecting the value of the
......
682 651
.Va kern.maxusers
683 652
may be individually overridden at boot-time or run-time as described
684 653
elsewhere in this document.
685
Systems older than
686
.Fx 4.4
687
must set this value via the kernel
688
.Xr config 8
689
option
690
.Cd maxusers
691
instead.
692 654
.Pp
693 655
.Va kern.ipc.nmbclusters
694 656
may be adjusted to increase the number of network mbufs the system is
......
717 679
option to
718 680
.Xr netstat 1
719 681
may be used to observe network cluster use.
720
Older versions of
721
.Fx
722
do not have this tunable and require that the
723
kernel
724
.Xr config 8
725
option
726
.Dv NMBCLUSTERS
727
be set instead.
728 682
.Pp
729 683
More and more programs are using the
730 684
.Xr sendfile 2