xref: /original-bsd/sbin/tunefs/tunefs.8 (revision c3e32dec)
1.\" Copyright (c) 1983, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)tunefs.8	8.1 (Berkeley) 06/05/93
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
26is designed to change the dynamic parameters of a file system
27which affect the layout policies.
28The parameters which are to be changed are indicated by the flags
29given below:
30.Bl -tag -width Ds
31.It Fl a Ar maxcontig
32This specifies the maximum number of contiguous blocks that will
33be laid out before forcing a rotational delay (see
34.Fl d
35below).
36The default value is one, since most device drivers require
37an interrupt per disk transfer.
38Device drivers that can chain several buffers together in a single
39transfer should set this to the maximum chain length.
40.It Fl d Ar rotdelay
41This specifies the expected time (in milliseconds)
42to service a transfer completion
43interrupt and initiate a new transfer on the same disk.
44It is used to decide how much rotational spacing to place between
45successive blocks in a file.
46.It Fl e Ar maxbpg
47This indicates the maximum number of blocks any single file can
48allocate out of a cylinder group before it is forced to begin
49allocating blocks from another cylinder group.
50Typically this value is set to about one quarter of the total blocks
51in a cylinder group.
52The intent is to prevent any single file from using up all the
53blocks in a single cylinder group,
54thus degrading access times for all files subsequently allocated
55in that cylinder group.
56The effect of this limit is to cause big files to do long seeks
57more frequently than if they were allowed to allocate all the blocks
58in a cylinder group before seeking elsewhere.
59For file systems with exclusively large files,
60this parameter should be set higher.
61.It Fl m Ar minfree
62This value specifies the percentage of space held back
63from normal users; the minimum free space threshold.
64The default value used is 10%.
65This value can be set to zero, however up to a factor of three
66in throughput will be lost over the performance obtained at a 10%
67threshold.
68Note that if the value is raised above the current usage level,
69users will be unable to allocate files until enough files have
70been deleted to get under the higher threshold.
71.It Fl o Ar optimize_preference
72The file system can either try to minimize the time spent
73allocating blocks, or it can attempt minimize the space
74fragmentation on the disk.
75If the value of minfree (see above) is less than 10%,
76then the file system should optimize for space to avoid
77running out of full sized blocks.
78For values of minfree greater than or equal to 10%,
79fragmentation is unlikely to be problematical, and
80the file system can be optimized for time.
81.El
82.Sh SEE ALSO
83.Xr fs 5 ,
84.Xr dumpfs 8 ,
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
100This program should work on mounted and active file systems.
101Because the super-block is not kept in the buffer cache,
102the changes will only take effect if the program
103is run on dismounted file systems.
104To change the root file system, the system must be rebooted
105after the file system is tuned.
106.Pp
107You can tune a file system, but you can't tune a fish.
108.Sh HISTORY
109The
110.Nm
111command appeared in
112.Bx 4.2 .
113