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