tuning.7 revision 87461
1.hlm 0
2.\" Copyright (c) 2001, Matthew Dillon.  Terms and conditions are those of
3.\" the BSD Copyright as specified in the file "/usr/src/COPYRIGHT" in
4.\" the source tree.
5.\"
6.\" $FreeBSD: head/share/man/man7/tuning.7 87461 2001-12-06 19:57:34Z rwatson $
7.\"
8.Dd May 25, 2001
9.Dt TUNING 7
10.Os
11.Sh NAME
12.Nm tuning
13.Nd performance tuning under FreeBSD
14.Sh SYSTEM SETUP - DISKLABEL, NEWFS, TUNEFS, SWAP
15When using
16.Xr disklabel 8
17to lay out your filesystems on a hard disk it is important to remember
18that hard drives can transfer data much more quickly from outer tracks
19than they can from inner tracks.
20To take advantage of this you should
21try to pack your smaller filesystems and swap closer to the outer tracks,
22follow with the larger filesystems, and end with the largest filesystems.
23It is also important to size system standard filesystems such that you
24will not be forced to resize them later as you scale the machine up.
25I usually create, in order, a 128M root, 1G swap, 128M
26.Pa /var ,
27128M
28.Pa /var/tmp ,
293G
30.Pa /usr ,
31and use any remaining space for
32.Pa /home .
33.Pp
34You should typically size your swap space to approximately 2x main memory.
35If you do not have a lot of RAM, though, you will generally want a lot
36more swap.
37It is not recommended that you configure any less than
38256M of swap on a system and you should keep in mind future memory
39expansion when sizing the swap partition.
40The kernel's VM paging algorithms are tuned to perform best when there is
41at least 2x swap versus main memory.
42Configuring too little swap can lead
43to inefficiencies in the VM page scanning code as well as create issues
44later on if you add more memory to your machine.
45Finally, on larger systems
46with multiple SCSI disks (or multiple IDE disks operating on different
47controllers), we strongly recommend that you configure swap on each drive
48(up to four drives).
49The swap partitions on the drives should be approximately the same size.
50The kernel can handle arbitrary sizes but
51internal data structures scale to 4 times the largest swap partition.
52Keeping
53the swap partitions near the same size will allow the kernel to optimally
54stripe swap space across the N disks.
55Don't worry about overdoing it a
56little, swap space is the saving grace of
57.Ux
58and even if you don't normally use much swap, it can give you more time to
59recover from a runaway program before being forced to reboot.
60.Pp
61How you size your
62.Pa /var
63partition depends heavily on what you intend to use the machine for.
64This
65partition is primarily used to hold mailboxes, the print spool, and log
66files.
67Some people even make
68.Pa /var/log
69its own partition (but except for extreme cases it isn't worth the waste
70of a partition ID).
71If your machine is intended to act as a mail
72or print server,
73or you are running a heavily visited web server, you should consider
74creating a much larger partition \(en perhaps a gig or more.
75It is very easy
76to underestimate log file storage requirements.
77.Pp
78Sizing
79.Pa /var/tmp
80depends on the kind of temporary file usage you think you will need.
81128M is
82the minimum we recommend.
83Also note that sysinstall will create a
84.Pa /tmp
85directory, but it is usually a good idea to make
86.Pa /tmp
87a softlink to
88.Pa /var/tmp
89after the fact.
90Dedicating a partition for temporary file storage is important for
91two reasons: first, it reduces the possibility of filesystem corruption
92in a crash, and second it reduces the chance of a runaway process that
93fills up
94.Oo Pa /var Oc Ns Pa /tmp
95from blowing up more critical subsystems (mail,
96logging, etc).
97Filling up
98.Oo Pa /var Oc Ns Pa /tmp
99is a very common problem to have.
100.Pp
101In the old days there were differences between
102.Pa /tmp
103and
104.Pa /var/tmp ,
105but the introduction of
106.Pa /var
107(and
108.Pa /var/tmp )
109led to massive confusion
110by program writers so today programs haphazardly use one or the
111other and thus no real distinction can be made between the two.
112So it makes sense to have just one temporary directory.
113However you handle
114.Pa /tmp ,
115the one thing you do not want to do is leave it sitting
116on the root partition where it might cause root to fill up or possibly
117corrupt root in a crash/reboot situation.
118.Pp
119The
120.Pa /usr
121partition holds the bulk of the files required to support the system and
122a subdirectory within it called
123.Pa /usr/local
124holds the bulk of the files installed from the
125.Xr ports 7
126hierarchy.
127If you do not use ports all that much and do not intend to keep
128system source
129.Pq Pa /usr/src
130on the machine, you can get away with
131a 1 gigabyte
132.Pa /usr
133partition.
134However, if you install a lot of ports
135(especially window managers and linux-emulated binaries), we recommend
136at least a 2 gigabyte
137.Pa /usr
138and if you also intend to keep system source
139on the machine, we recommend a 3 gigabyte
140.Pa /usr .
141Do not underestimate the
142amount of space you will need in this partition, it can creep up and
143surprise you!
144.Pp
145The
146.Pa /home
147partition is typically used to hold user-specific data.
148I usually size it to the remainder of the disk.
149.Pp
150Why partition at all?
151Why not create one big
152.Pa /
153partition and be done with it?
154Then I don't have to worry about undersizing things!
155Well, there are several reasons this isn't a good idea.
156First,
157each partition has different operational characteristics and separating them
158allows the filesystem to tune itself to those characteristics.
159For example,
160the root and
161.Pa /usr
162partitions are read-mostly, with very little writing, while
163a lot of reading and writing could occur in
164.Pa /var
165and
166.Pa /var/tmp .
167By properly
168partitioning your system fragmentation introduced in the smaller more
169heavily write-loaded partitions will not bleed over into the mostly-read
170partitions.
171Additionally, keeping the write-loaded partitions closer to
172the edge of the disk (i.e. before the really big partitions instead of after
173in the partition table) will increase I/O performance in the partitions
174where you need it the most.
175Now it is true that you might also need I/O
176performance in the larger partitions, but they are so large that shifting
177them more towards the edge of the disk will not lead to a significant
178performance improvement whereas moving
179.Pa /var
180to the edge can have a huge impact.
181Finally, there are safety concerns.
182Having a small neat root partition that
183is essentially read-only gives it a greater chance of surviving a bad crash
184intact.
185.Pp
186Properly partitioning your system also allows you to tune
187.Xr newfs 8 ,
188and
189.Xr tunefs 8
190parameters.
191Tuning
192.Xr newfs 8
193requires more experience but can lead to significant improvements in
194performance.
195There are three parameters that are relatively safe to tune:
196.Em blocksize , bytes/inode ,
197and
198.Em cylinders/group .
199.Pp
200.Fx
201performs best when using 8K or 16K filesystem block sizes.
202The default filesystem block size is 8K.
203For larger partitions it is usually a good
204idea to use a 16K block size.
205This also requires you to specify a larger
206fragment size.
207We recommend always using a fragment size that is 1/8
208the block size (less testing has been done on other fragment size factors).
209The
210.Xr newfs 8
211options for this would be
212.Dq Li "newfs -f 2048 -b 16384 ..." .
213Using a larger block size can cause fragmentation of the buffer cache and
214lead to lower performance.
215.Pp
216If a large partition is intended to be used to hold fewer, larger files, such
217as a database files, you can increase the
218.Em bytes/inode
219ratio which reduces the number of inodes (maximum number of files and
220directories that can be created) for that partition.
221Decreasing the number
222of inodes in a filesystem can greatly reduce
223.Xr fsck 8
224recovery times after a crash.
225Do not use this option
226unless you are actually storing large files on the partition, because if you
227overcompensate you can wind up with a filesystem that has lots of free
228space remaining but cannot accommodate any more files.
229Using 32768, 65536, or 262144 bytes/inode is recommended.
230You can go higher but
231it will have only incremental effects on
232.Xr fsck 8
233recovery times.
234For example,
235.Dq Li "newfs -i 32768 ..." .
236.Pp
237Finally, increasing the
238.Em cylinders/group
239ratio has the effect of packing the inodes closer together.
240This can increase directory performance and also decrease
241.Xr fsck 8
242times.
243If you use this option at all, we recommend maxing it out.
244Use
245.Dq Li "newfs -c 999"
246and
247.Xr newfs 8
248will error out and tell you what the maximum is, then use that.
249.Pp
250.Xr tunefs 8
251may be used to further tune a filesystem.
252This command can be run in
253single-user mode without having to reformat the filesystem.
254However, this is possibly the most abused program in the system.
255Many people attempt to
256increase available filesystem space by setting the min-free percentage to 0.
257This can lead to severe filesystem fragmentation and we do not recommend
258that you do this.
259Really the only
260.Xr tunefs 8
261option worthwhile here is turning on
262.Em softupdates
263with
264.Dq Li "tunefs -n enable /filesystem" .
265(Note: in
266.Fx
2675.x
268softupdates can be turned on using the
269.Fl U
270option to
271.Xr newfs 8 ) .
272Softupdates drastically improves meta-data performance, mainly file
273creation and deletion.
274We recommend enabling softupdates on all of your
275filesystems.
276There are two downsides to softupdates that you should be
277aware of.
278First, softupdates guarantees filesystem consistency in the
279case of a crash but could very easily be several seconds (even a minute!)
280behind updating the physical disk.
281If you crash you may lose more work
282than otherwise.
283Secondly, softupdates delays the freeing of filesystem
284blocks.
285If you have a filesystem (such as the root filesystem) which is
286close to full, doing a major update of it, e.g.\&
287.Dq Li "make installworld" ,
288can run it out of space and cause the update to fail.
289.Pp
290A number of run-time
291.Xr mount 8
292options exist that can help you tune the system.
293The most obvious and most dangerous one is
294.Cm async .
295Don't ever use it, it is far too dangerous.
296A less dangerous and more
297useful
298.Xr mount 8
299option is called
300.Cm noatime .
301.Ux
302filesystems normally update the last-accessed time of a file or
303directory whenever it is accessed.
304This operation is handled in
305.Fx
306with a delayed write and normally does not create a burden on the system.
307However, if your system is accessing a huge number of files on a continuing
308basis the buffer cache can wind up getting polluted with atime updates,
309creating a burden on the system.
310For example, if you are running a heavily
311loaded web site, or a news server with lots of readers, you might want to
312consider turning off atime updates on your larger partitions with this
313.Xr mount 8
314option.
315However, you should not gratuitously turn off atime
316updates everywhere.
317For example, the
318.Pa /var
319filesystem customarily
320holds mailboxes, and atime (in combination with mtime) is used to
321determine whether a mailbox has new mail.
322You might as well leave
323atime turned on for mostly read-only partitions such as
324.Pa /
325and
326.Pa /usr
327as well.
328This is especially useful for
329.Pa /
330since some system utilities
331use the atime field for reporting.
332.Sh STRIPING DISKS
333In larger systems you can stripe partitions from several drives together
334to create a much larger overall partition.
335Striping can also improve
336the performance of a filesystem by splitting I/O operations across two
337or more disks.
338The
339.Xr vinum 8
340and
341.Xr ccdconfig 8
342utilities may be used to create simple striped filesystems.
343Generally
344speaking, striping smaller partitions such as the root and
345.Pa /var/tmp ,
346or essentially read-only partitions such as
347.Pa /usr
348is a complete waste of time.
349You should only stripe partitions that require serious I/O performance,
350typically
351.Pa /var , /home ,
352or custom partitions used to hold databases and web pages.
353Choosing the proper stripe size is also
354important.
355Filesystems tend to store meta-data on power-of-2 boundaries
356and you usually want to reduce seeking rather than increase seeking.
357This
358means you want to use a large off-center stripe size such as 1152 sectors
359so sequential I/O does not seek both disks and so meta-data is distributed
360across both disks rather than concentrated on a single disk.
361If
362you really need to get sophisticated, we recommend using a real hardware
363RAID controller from the list of
364.Fx
365supported controllers.
366.Sh SYSCTL TUNING
367There are several hundred
368.Xr sysctl 8
369variables in the system, including many that appear to be candidates for
370tuning but actually aren't.
371In this document we will only cover the ones
372that have the greatest effect on the system.
373.Pp
374The
375.Va kern.ipc.shm_use_phys
376sysctl defaults to 0 (off) and may be set to 0 (off) or 1 (on).
377Setting
378this parameter to 1 will cause all System V shared memory segments to be
379mapped to unpageable physical RAM.
380This feature only has an effect if you
381are either (A) mapping small amounts of shared memory across many (hundreds)
382of processes, or (B) mapping large amounts of shared memory across any
383number of processes.
384This feature allows the kernel to remove a great deal
385of internal memory management page-tracking overhead at the cost of wiring
386the shared memory into core, making it unswappable.
387.Pp
388The
389.Va vfs.vmiodirenable
390sysctl defaults to 1 (on).
391This parameter controls how directories are cached
392by the system.
393Most directories are small and use but a single fragment
394(typically 1K) in the filesystem and even less (typically 512 bytes) in
395the buffer cache.
396However, when operating in the default mode the buffer
397cache will only cache a fixed number of directories even if you have a huge
398amount of memory.
399Turning on this sysctl allows the buffer cache to use
400the VM Page Cache to cache the directories.
401The advantage is that all of
402memory is now available for caching directories.
403The disadvantage is that
404the minimum in-core memory used to cache a directory is the physical page
405size (typically 4K) rather than 512 bytes.
406We recommend turning this option off in memory-constrained environments;
407however, when on, it will substantially improve the performance of services
408which manipulate large numbers of files.
409Such services can include web caches, large mail systems, and news systems.
410Turning on this option will generally not reduce performance even with the
411wasted memory but you should experiment to find out.
412.Pp
413There are various buffer-cache and VM page cache related sysctls.
414We do not recommend modifying those values.
415As of
416.Fx 4.3 ,
417the VM system does an extremely good job tuning itself.
418.Pp
419The
420.Va net.inet.tcp.sendspace
421and
422.Va net.inet.tcp.recvspace
423sysctls are of particular interest if you are running network intensive
424applications.
425This controls the amount of send and receive buffer space
426allowed for any given TCP connection.
427The default sending buffer is 32k; the default receiving buffer
428is 64k.
429You can often
430improve bandwidth utilization by increasing the default at the cost of
431eating up more kernel memory for each connection.
432We do not recommend
433increasing the defaults if you are serving hundreds or thousands of
434simultaneous connections because it is possible to quickly run the system
435out of memory due to stalled connections building up.
436But if you need
437high bandwidth over a fewer number of connections, especially if you have
438gigabit ethernet, increasing these defaults can make a huge difference.
439You can adjust the buffer size for incoming and outgoing data separately.
440For example, if your machine is primarily doing web serving you may want
441to decrease the recvspace in order to be able to increase the
442sendspace without eating too much kernel memory.
443Note that the routing table (see
444.Xr route 8 )
445can be used to introduce route-specific send and receive buffer size
446defaults.
447.Pp
448As an additional management tool you can use pipes in your
449firewall rules (see
450.Xr ipfw 8 )
451to limit the bandwidth going to or from particular IP blocks or ports.
452For example, if you have a T1 you might want to limit your web traffic
453to 70% of the T1's bandwidth in order to leave the remainder available
454for mail and interactive use.
455Normally a heavily loaded web server
456will not introduce significant latencies into other services even if
457the network link is maxed out, but enforcing a limit can smooth things
458out and lead to longer term stability.
459Many people also enforce artificial
460bandwidth limitations in order to ensure that they are not charged for
461using too much bandwidth.
462.Pp
463Setting the send or receive TCP buffer to values larger then 65535 will result
464in a marginal performance improvement unless both hosts support the window
465scaling extension of the TCP protocol, which is controlled by the
466.Va net.inet.tcp.rfc1323
467sysctl.
468These extensions should be enabled and the TCP buffer size should be set
469to a value larger than 65536 in order to obtain good performance out of
470certain types of network links; specifically, gigabit WAN links and
471high-latency satellite links.
472.Pp
473The
474.Va net.inet.tcp.always_keepalive
475sysctl determines whether or not the TCP implementation should attempt
476to detect dead TCP connections by intermittently delivering "keepalives"
477on the connection.
478By default, this is only enabled when an application requests it.
479For servers with many network clients and simultaneous connections, we
480recommend that this setting be turned on (set to 1).
481This may be particularly relevent on systems accessed by users
482operating over dialups, as users often disconnect their modems without
483closing active connections.
484However, in some environments, temporary network outages may be
485incorrectly identified as dead sessions, resulting unexpectedly
486terminated TCP connections.
487.Pp
488The
489.Va kern.ipc.somaxconn
490sysctl limits the size of the listen queue for accepting new TCP connections.
491The default value of 128 is typically too low for robust handling of new
492connections in a heavily loaded web server environment.
493For such environments,
494we recommend increasing this value to 1024 or higher.
495The service daemon
496may itself limit the listen queue size (e.g.\&
497.Xr sendmail 8 ,
498apache) but will
499often have a directive in its configuration file to adjust the queue size up.
500Larger listen queues also do a better job of fending off denial of service
501attacks.
502.Pp
503The
504.Va kern.maxfiles
505sysctl determines how many open files the system supports.
506The default is
507typically a few thousand but you may need to bump this up to ten or twenty
508thousand if you are running databases or large descriptor-heavy daemons.
509.Pp
510The
511.Va vm.swap_idle_enabled
512sysctl is useful in large multi-user systems where you have lots of users
513entering and leaving the system and lots of idle processes.
514Such systems
515tend to generate a great deal of continuous pressure on free memory reserves.
516Turning this feature on and adjusting the swapout hysteresis (in idle
517seconds) via
518.Va vm.swap_idle_threshold1
519and
520.Va vm.swap_idle_threshold2
521allows you to depress the priority of pages associated with idle processes
522more quickly then the normal pageout algorithm.
523This gives a helping hand
524to the pageout daemon.
525Do not turn this option on unless you need it,
526because the tradeoff you are making is to essentially pre-page memory sooner
527rather then later, eating more swap and disk bandwidth.
528In a small system
529this option will have a detrimental effect but in a large system that is
530already doing moderate paging this option allows the VM system to stage
531whole processes into and out of memory more easily.
532.Sh LOADER TUNABLES
533Some aspects of the system behavior may not be tunable at runtime because
534memory allocates they perform must occur early in the boot process.
535To change loader tunables, you must set their value in
536.Xr loader.conf 5
537and reboot the system.
538.Pp
539The
540.Va kern.maxusers
541tunable defaults to an incredibly low value.
542For most modern machines,
543you probably want to increase this value to 64, 128, or 256.
544We do not
545recommend going above 256 unless you need a huge number of file descriptors.
546Network buffers are also affected but can be controlled with a separate
547kernel option.
548Do not increase maxusers just to get more network mbufs.
549Systems older than
550.Fx 4.4
551do not have this loader tunable and require that
552the kernel
553.Xr config 8
554option
555.Cd maxusers
556be set instead.
557.Pp
558.Va kern.ipc.nmbclusters
559may be adjusted to increase the number of network mbufs the system is
560willing to allocate.
561Each cluster represents approximately 2K of memory,
562so a value of 1024 represents 2M of kernel memory reserved for network
563buffers.
564You can do a simple calculation to figure out how many you need.
565If you have a web server which maxes out at 1000 simultaneous connections,
566and each connection eats a 16K receive and 16K send buffer, you need
567approximate 32MB worth of network buffers to deal with it.
568A good rule of
569thumb is to multiply by 2, so 32MBx2 = 64MB/2K = 32768.
570So for this case
571you would want to set
572.Va kern.ipc.nmbclusters
573to 32768.
574We recommend values between
5751024 and 4096 for machines with moderates amount of memory, and between 4096
576and 32768 for machines with greater amounts of memory.
577Under no circumstances
578should you specify an arbitrarily high value for this parameter, it could
579lead to a boot-time crash.
580The
581.Fl m
582option to
583.Xr netstat 1
584may be used to observe network cluster use.
585Older versions of
586.Fx
587do not have this tunable and require that the
588kernel
589.Xr config 8
590option
591.Dv NMBCLUSTERS
592be set instead.
593.Pp
594More and more programs are using the
595.Xr sendfile 2
596system call to transmit files over the network.
597The
598.Va kern.ipc.nsfbufs
599sysctl controls the number of filesystem buffers
600.Xr sendfile 2
601is allowed to use to perform its work.
602This parameter nominally scales
603with
604.Va kern.maxusers
605so you should not need to modify this parameter except under extreme
606circumstances.
607.Sh KERNEL CONFIG TUNING
608There are a number of kernel options that you may have to fiddle with in
609a large scale system.
610In order to change these options you need to be
611able to compile a new kernel from source.
612The
613.Xr config 8
614manual page and the handbook are good starting points for learning how to
615do this.
616Generally the first thing you do when creating your own custom
617kernel is to strip out all the drivers and services you don't use.
618Removing things like
619.Dv INET6
620and drivers you don't have will reduce the size of your kernel, sometimes
621by a megabyte or more, leaving more memory available for applications.
622.Pp
623.Dv SCSI_DELAY
624and
625.Dv IDE_DELAY
626may be used to reduce system boot times.
627The defaults are fairly high and
628can be responsible for 15+ seconds of delay in the boot process.
629Reducing
630.Dv SCSI_DELAY
631to 5 seconds usually works (especially with modern drives).
632Reducing
633.Dv IDE_DELAY
634also works but you have to be a little more careful.
635.Pp
636There are a number of
637.Dv *_CPU
638options that can be commented out.
639If you only want the kernel to run
640on a Pentium class CPU, you can easily remove
641.Dv I386_CPU
642and
643.Dv I486_CPU ,
644but only remove
645.Dv I586_CPU
646if you are sure your CPU is being recognized as a Pentium II or better.
647Some clones may be recognized as a Pentium or even a 486 and not be able
648to boot without those options.
649If it works, great!
650The operating system
651will be able to better-use higher-end CPU features for MMU, task switching,
652timebase, and even device operations.
653Additionally, higher-end CPUs support
6544MB MMU pages which the kernel uses to map the kernel itself into memory,
655which increases its efficiency under heavy syscall loads.
656.Sh IDE WRITE CACHING
657.Fx 4.3
658flirted with turning off IDE write caching.
659This reduced write bandwidth
660to IDE disks but was considered necessary due to serious data consistency
661issues introduced by hard drive vendors.
662Basically the problem is that
663IDE drives lie about when a write completes.
664With IDE write caching turned
665on, IDE hard drives will not only write data to disk out of order, they
666will sometimes delay some of the blocks indefinitely when under heavy disk
667loads.
668A crash or power failure can result in serious filesystem
669corruption.
670So our default was changed to be safe.
671Unfortunately, the
672result was such a huge loss in performance that we caved in and changed the
673default back to on after the release.
674You should check the default on
675your system by observing the
676.Va hw.ata.wc
677sysctl variable.
678If IDE write caching is turned off, you can turn it back
679on by setting the
680.Va hw.ata.wc
681kernel variable back to 1.
682This must be done from the boot
683.Xr loader 8
684at boot time.
685Attempting to do it after the kernel boots will have no effect.
686Please see
687.Xr ata 4
688and
689.Xr loader 8 .
690.Pp
691There is a new experimental feature for IDE hard drives called
692.Va hw.ata.tags
693(you also set this in the boot loader) which allows write caching to be safely
694turned on.
695This brings SCSI tagging features to IDE drives.
696As of this
697writing only IBM DPTA and DTLA drives support the feature.
698Warning!
699These
700drives apparently have quality control problems and I do not recommend
701purchasing them at this time.
702If you need performance, go with SCSI.
703.Sh CPU, MEMORY, DISK, NETWORK
704The type of tuning you do depends heavily on where your system begins to
705bottleneck as load increases.
706If your system runs out of CPU (idle times
707are perpetually 0%) then you need to consider upgrading the CPU or moving to
708an SMP motherboard (multiple CPU's), or perhaps you need to revisit the
709programs that are causing the load and try to optimize them.
710If your system
711is paging to swap a lot you need to consider adding more memory.
712If your
713system is saturating the disk you typically see high CPU idle times and
714total disk saturation.
715.Xr systat 1
716can be used to monitor this.
717There are many solutions to saturated disks:
718increasing memory for caching, mirroring disks, distributing operations across
719several machines, and so forth.
720If disk performance is an issue and you
721are using IDE drives, switching to SCSI can help a great deal.
722While modern
723IDE drives compare with SCSI in raw sequential bandwidth, the moment you
724start seeking around the disk SCSI drives usually win.
725.Pp
726Finally, you might run out of network suds.
727The first line of defense for
728improving network performance is to make sure you are using switches instead
729of hubs, especially these days where switches are almost as cheap.
730Hubs
731have severe problems under heavy loads due to collision backoff and one bad
732host can severely degrade the entire LAN.
733Second, optimize the network path
734as much as possible.
735For example, in
736.Xr firewall 7
737we describe a firewall protecting internal hosts with a topology where
738the externally visible hosts are not routed through it.
739Use 100BaseT rather
740than 10BaseT, or use 1000BaseT rather then 100BaseT, depending on your needs.
741Most bottlenecks occur at the WAN link (e.g.\&
742modem, T1, DSL, whatever).
743If expanding the link is not an option it may be possible to use
744.Xr dummynet 4
745feature to implement peak shaving or other forms of traffic shaping to
746prevent the overloaded service (such as web services) from affecting other
747services (such as email), or vice versa.
748In home installations this could
749be used to give interactive traffic (your browser,
750.Xr ssh 1
751logins) priority
752over services you export from your box (web services, email).
753.Sh SEE ALSO
754.Xr netstat 1 ,
755.Xr systat 1 ,
756.Xr ata 4 ,
757.Xr dummynet 4 ,
758.Xr login.conf 5 ,
759.Xr firewall 7 ,
760.Xr hier 7 ,
761.Xr ports 7 ,
762.Xr boot 8 ,
763.Xr ccdconfig 8 ,
764.Xr config 8 ,
765.Xr disklabel 8 ,
766.Xr fsck 8 ,
767.Xr ifconfig 8 ,
768.Xr ipfw 8 ,
769.Xr loader 8 ,
770.Xr mount 8 ,
771.Xr newfs 8 ,
772.Xr route 8 ,
773.Xr sysctl 8 ,
774.Xr tunefs 8 ,
775.Xr vinum 8
776.Sh HISTORY
777The
778.Nm
779manual page was originally written by
780.An Matthew Dillon
781and first appeared
782in
783.Fx 4.3 ,
784May 2001.
785