Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Copyright (c) 1983, 1991 Regents of the University of California. |
2 | .\" 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 6.6 (Berkeley) 3/16/91 | |
33 | .\" | |
34 | .Dd March 16, 1991 | |
35 | .Dt TUNEFS 8 | |
36 | .Os BSD 4.2 | |
37 | .Sh NAME | |
38 | .Nm tunefs | |
39 | .Nd tune up an existing file system | |
40 | .Sh SYNOPSIS | |
41 | .Nm tunefs | |
42 | .Op Fl a Ar maxcontig | |
43 | .Op Fl d Ar rotdelay | |
44 | .Op Fl e Ar maxbpg | |
45 | .Op Fl m Ar minfree | |
46 | .Bk -words | |
47 | .Op Fl o Ar optimize_preference | |
48 | .Ek | |
49 | .Op Ar special | Ar filesys | |
50 | .Sh DESCRIPTION | |
51 | .Nm Tunefs | |
52 | is designed to change the dynamic parameters of a file system | |
53 | which affect the layout policies. | |
54 | The parameters which are to be changed are indicated by the flags | |
55 | given below: | |
56 | .Bl -tag -width Ds | |
57 | .It Fl a Ar maxcontig | |
58 | This specifies the maximum number of contiguous blocks that will | |
59 | be laid out before forcing a rotational delay (see | |
60 | .Fl d | |
61 | below). | |
62 | The default value is one, since most device drivers require | |
63 | an interrupt per disk transfer. | |
64 | Device drivers that can chain several buffers together in a single | |
65 | transfer should set this to the maximum chain length. | |
66 | .It Fl d Ar rotdelay | |
67 | This specifies the expected time (in milliseconds) | |
68 | to service a transfer completion | |
69 | interrupt and initiate a new transfer on the same disk. | |
70 | It is used to decide how much rotational spacing to place between | |
71 | successive blocks in a file. | |
72 | .It Fl e Ar maxbpg | |
73 | This indicates the maximum number of blocks any single file can | |
74 | allocate out of a cylinder group before it is forced to begin | |
75 | allocating blocks from another cylinder group. | |
76 | Typically this value is set to about one quarter of the total blocks | |
77 | in a cylinder group. | |
78 | The intent is to prevent any single file from using up all the | |
79 | blocks in a single cylinder group, | |
80 | thus degrading access times for all files subsequently allocated | |
81 | in that cylinder group. | |
82 | The effect of this limit is to cause big files to do long seeks | |
83 | more frequently than if they were allowed to allocate all the blocks | |
84 | in a cylinder group before seeking elsewhere. | |
85 | For file systems with exclusively large files, | |
86 | this parameter should be set higher. | |
87 | .It Fl m Ar minfree | |
88 | This value specifies the percentage of space held back | |
89 | from normal users; the minimum free space threshold. | |
90 | The default value used is 10%. | |
91 | This value can be set to zero, however up to a factor of three | |
92 | in throughput will be lost over the performance obtained at a 10% | |
93 | threshold. | |
94 | Note that if the value is raised above the current usage level, | |
95 | users will be unable to allocate files until enough files have | |
96 | been deleted to get under the higher threshold. | |
97 | .It Fl o Ar optimize_preference | |
98 | The file system can either try to minimize the time spent | |
99 | allocating blocks, or it can attempt minimize the space | |
100 | fragmentation on the disk. | |
101 | If the value of minfree (see above) is less than 10%, | |
102 | then the file system should optimize for space to avoid | |
103 | running out of full sized blocks. | |
104 | For values of minfree greater than or equal to 10%, | |
105 | fragmentation is unlikely to be problematical, and | |
106 | the file system can be optimized for time. | |
107 | .El | |
108 | .Sh SEE ALSO | |
109 | .Xr fs 5 , | |
110 | .Xr newfs 8 , | |
111 | .Xr mkfs 8 | |
112 | .Rs | |
113 | .%A M. McKusick | |
114 | .%A W. Joy | |
115 | .%A S. Leffler | |
116 | .%A R. Fabry | |
117 | .%T "A Fast File System for UNIX" | |
118 | .%J "ACM Transactions on Computer Systems 2" | |
119 | .%N 3 | |
120 | .%P pp 181-197 | |
121 | .%D August 1984 | |
122 | .%O "(reprinted in the BSD System Manager's Manual, SMM:14)" | |
123 | .Re | |
124 | .Sh BUGS | |
125 | This program should work on mounted and active file systems. | |
126 | Because the super-block is not kept in the buffer cache, | |
127 | the changes will only take effect if the program | |
128 | is run on dismounted file systems. | |
129 | To change the root file system, the system must be rebooted | |
130 | after the file system is tuned. | |
131 | .Pp | |
132 | You can tune a file system, but you can't tune a fish. | |
133 | .Sh HISTORY | |
134 | The | |
135 | .Nm | |
136 | command appeared in | |
137 | .Bx 4.2 . |