]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/tunefs/tunefs.8
This commit was generated by cvs2svn to compensate for changes in r100784,
[FreeBSD/FreeBSD.git] / sbin / tunefs / tunefs.8
1 .\" Copyright (c) 1983, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)tunefs.8    8.2 (Berkeley) 12/11/93
33 .\" $FreeBSD$
34 .\"
35 .Dd May 18, 2002
36 .Dt TUNEFS 8
37 .Os
38 .Sh NAME
39 .Nm tunefs
40 .Nd tune up an existing filesystem
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl A
44 .Op Fl a Ar maxcontig
45 .Op Fl e Ar maxbpg
46 .Op Fl f Ar avgfilesize
47 .Op Fl m Ar minfree
48 .Bk -words
49 .Op Fl n Ar enable | disable
50 .Op Fl o Ar space | time
51 .Op Fl p
52 .Op Fl s Ar avgfpdir
53 .Ek
54 .Ar special | Ar filesystem
55 .Sh DESCRIPTION
56 The
57 .Nm
58 utility is designed to change the dynamic parameters of a filesystem
59 which affect the layout policies.
60 The
61 .Nm
62 program cannot be run on an active filesystem.
63 To change an active filesystem,
64 you must either downgrade the filesystem to read-only
65 or unmount it.
66 .Pp
67 The parameters which are to be changed are indicated by the flags
68 given below:
69 .Bl -tag -width indent
70 .It Fl A
71 The filesystem has several backups of the super-block.  Specifying
72 this option will cause all backups to be modified as well as the
73 primary super-block.  This is potentially dangerous - use with caution.
74 .It Fl a Ar maxcontig
75 Specify the maximum number of contiguous blocks that will
76 be laid out before allowing a rotational delay.
77 The default value is 16.
78 .It Fl e Ar maxbpg
79 Indicate the maximum number of blocks any single file can
80 allocate out of a cylinder group before it is forced to begin
81 allocating blocks from another cylinder group.
82 Typically this value is set to about one quarter of the total blocks
83 in a cylinder group.
84 The intent is to prevent any single file from using up all the
85 blocks in a single cylinder group,
86 thus degrading access times for all files subsequently allocated
87 in that cylinder group.
88 The effect of this limit is to cause big files to do long seeks
89 more frequently than if they were allowed to allocate all the blocks
90 in a cylinder group before seeking elsewhere.
91 For filesystems with exclusively large files,
92 this parameter should be set higher.
93 .It Fl f Ar avgfilezsize
94 Specify the expected average file size.
95 .It Fl m Ar minfree
96 Specify the percentage of space held back
97 from normal users; the minimum free space threshold.
98 The default value used is 8%.
99 Note that lowering the threshold can adversely affect performance:
100 .Pp
101 .Bl -bullet
102 .It
103 Settings of 5% and less force space optimization to
104 always be used which will greatly increase the overhead for file
105 writes.
106 .It
107 The filesystem's ability to avoid fragmentation will be reduced
108 when the total free space, including the reserve, drops below 15%.
109 As free space approaches zero, throughput can degrade by up to a
110 factor of three over the performance obtained at a 10% threshold.
111 .El
112 .Pp
113 If the value is raised above the current usage level,
114 users will be unable to allocate files until enough files have
115 been deleted to get under the higher threshold.
116 .It Fl n Ar enable | disable
117 Turn on/off soft updates.
118 .It Fl o Ar space | time
119 The filesystem can either try to minimize the time spent
120 allocating blocks, or it can attempt to minimize the space
121 fragmentation on the disk.
122 Optimization for space has much
123 higher overhead for file writes.
124 The kernel normally changes the preference automatically as
125 the percent fragmentation changes on the filesystem.
126 .It Fl p
127 Show a summary of what the current tunable settings
128 are on the selected filesystem.  More detailed information can be
129 obtained from the
130 .Xr dumpfs 8
131 or
132 .Xr ffsinfo 8
133 programs.
134 .It Fl s Ar avgfpdir
135 Specify the expected number of files per directory.
136 .El
137 .Pp
138 At least one of the above flags is required.
139 .Sh FILES
140 .Bl -tag -width ".Pa /etc/fstab"
141 .It Pa /etc/fstab
142 read this to determine the device file for a
143 specified mount point.
144 .El
145 .Sh SEE ALSO
146 .Xr fs 5 ,
147 .Xr dumpfs 8 ,
148 .Xr ffsinfo 8 ,
149 .Xr newfs 8
150 .Rs
151 .%A M. McKusick
152 .%A W. Joy
153 .%A S. Leffler
154 .%A R. Fabry
155 .%T "A Fast File System for UNIX"
156 .%J "ACM Transactions on Computer Systems 2"
157 .%N 3
158 .%P pp 181-197
159 .%D August 1984
160 .%O "(reprinted in the BSD System Manager's Manual, SMM:5)"
161 .Re
162 .Sh BUGS
163 This program should work on active filesystems.
164 .\" Take this out and a Unix Daemon will dog your steps from now until
165 .\" the time_t's wrap around.
166 .Pp
167 You can tune a filesystem, but you can't tune a fish.
168 .Sh HISTORY
169 The
170 .Nm
171 utility appeared in
172 .Bx 4.2 .