need init of fromlen once per loop
[unix-history] / usr / src / sbin / tunefs / tunefs.8
CommitLineData
be81fe9d
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
f8a246f4 5.\" @(#)tunefs.8 6.4 (Berkeley) %G%
be81fe9d 6.\"
e0509f13 7.TH TUNEFS 8 ""
be81fe9d
KM
8.UC 5
9.SH NAME
10tunefs \- tune up an existing file system
11.SH SYNOPSIS
12.B /etc/tunefs
13.I tuneup-options
14.IR special | filesys
15.SH DESCRIPTION
16.I Tunefs
17is designed to change the dynamic parameters of a file system
18which affect the layout policies.
19The parameters which are to be changed are indicated by the flags
20given below:
21.IP "\fB\-a\fP maxcontig"
22.br
23This specifies the maximum number of contiguous blocks that will
24be laid out before forcing a rotational delay (see \-d below).
25The default value is one, since most device drivers require
26an interrupt per disk transfer.
27Device drivers that can chain several buffers together in a single
28transfer should set this to the maximum chain length.
29.IP "\fB\-d\fP rotdelay"
30.br
31This specifies the expected time (in milliseconds)
32to service a transfer completion
33interrupt and initiate a new transfer on the same disk.
34It is used to decide how much rotational spacing to place between
35successive blocks in a file.
36.IP "\fB\-e\fP maxbpg"
37.br
38This indicates the maximum number of blocks any single file can
39allocate out of a cylinder group before it is forced to begin
40allocating blocks from another cylinder group.
41Typically this value is set to about one quarter of the total blocks
42in a cylinder group.
43The intent is to prevent any single file from using up all the
44blocks in a single cylinder group,
45thus degrading access times for all files subsequently allocated
46in that cylinder group.
47The effect of this limit is to cause big files to do long seeks
48more frequently than if they were allowed to allocate all the blocks
49in a cylinder group before seeking elsewhere.
50For file systems with exclusively large files,
51this parameter should be set higher.
52.IP "\fB\-m\fP minfree"
53.br
54This value specifies the percentage of space held back
55from normal users; the minimum free space threshold.
56The default value used is 10%.
57This value can be set to zero, however up to a factor of three
58in throughput will be lost over the performance obtained at a 10%
59threshold.
60Note that if the value is raised above the current usage level,
61users will be unable to allocate files until enough files have
62been deleted to get under the higher threshold.
96099622
KM
63.IP "\fB\-o\fP optimization preference"
64.br
65The file system can either try to minimize the time spent
66allocating blocks, or it can attempt minimize the space
67fragmentation on the disk.
68If the value of minfree (see above) is less than 10%,
69then the file system should optimize for space to avoid
70running out of full sized blocks.
71For values of minfree greater than or equal to 10%,
72fragmentation is unlikely to be problematical, and
73the file system can be optimized for time.
be81fe9d
KM
74.SH "SEE ALSO"
75fs(5),
76newfs(8),
77mkfs(8)
78.PP
96099622
KM
79M. McKusick, W. Joy, S. Leffler, R. Fabry,
80``A Fast File System for UNIX'',
81\fIACM Transactions on Computer Systems 2\fP, 3.
82pp 181-197, August 1984.
2c6735dc 83(reprinted in the System Manager's Manual, SMM:14)
be81fe9d
KM
84.SH BUGS
85This program should work on mounted and active file systems.
86Because the super-block is not kept in the buffer cache,
f8a246f4
KM
87the changes will only take effect if the program
88is run on dismounted file systems.
89To change the root file system, the system must be rebooted
90after the file system is tuned.
be81fe9d
KM
91.PP
92You can tune a file system, but you can't tune a fish.