xref: /csrg-svn/sbin/tunefs/tunefs.8 (revision 47464)
1*47464Scael.\" Copyright (c) 1983, 1991 Regents of the University of California.
2*47464Scael.\" All rights reserved.
319022Smckusick.\"
4*47464Scael.\" %sccs.include.redist.man%
519022Smckusick.\"
6*47464Scael.\"     @(#)tunefs.8	6.6 (Berkeley) 03/16/91
7*47464Scael.\"
8*47464Scael.Dd
9*47464Scael.Dt TUNEFS 8
10*47464Scael.Os BSD 4.2
11*47464Scael.Sh NAME
12*47464Scael.Nm tunefs
13*47464Scael.Nd tune up an existing file system
14*47464Scael.Sh SYNOPSIS
15*47464Scael.Nm tunefs
16*47464Scael.Op Fl a Ar maxcontig
17*47464Scael.Op Fl d Ar rotdelay
18*47464Scael.Op Fl e Ar maxbpg
19*47464Scael.Op Fl m Ar minfree
20*47464Scael.Bk -words
21*47464Scael.Op Fl o Ar optimize_preference
22*47464Scael.Ek
23*47464Scael.Op Ar special | Ar filesys
24*47464Scael.Sh DESCRIPTION
25*47464Scael.Nm Tunefs
2619022Smckusickis designed to change the dynamic parameters of a file system
2719022Smckusickwhich affect the layout policies.
2819022SmckusickThe parameters which are to be changed are indicated by the flags
2919022Smckusickgiven below:
30*47464Scael.Bl -tag -width Ds
31*47464Scael.It Fl a Ar maxcontig
3219022SmckusickThis specifies the maximum number of contiguous blocks that will
33*47464Scaelbe laid out before forcing a rotational delay (see
34*47464Scael.Fl d
35*47464Scaelbelow).
3619022SmckusickThe default value is one, since most device drivers require
3719022Smckusickan interrupt per disk transfer.
3819022SmckusickDevice drivers that can chain several buffers together in a single
3919022Smckusicktransfer should set this to the maximum chain length.
40*47464Scael.It Fl d Ar rotdelay
4119022SmckusickThis specifies the expected time (in milliseconds)
4219022Smckusickto service a transfer completion
4319022Smckusickinterrupt and initiate a new transfer on the same disk.
4419022SmckusickIt is used to decide how much rotational spacing to place between
4519022Smckusicksuccessive blocks in a file.
46*47464Scael.It Fl e Ar maxbpg
4719022SmckusickThis indicates the maximum number of blocks any single file can
4819022Smckusickallocate out of a cylinder group before it is forced to begin
4919022Smckusickallocating blocks from another cylinder group.
5019022SmckusickTypically this value is set to about one quarter of the total blocks
5119022Smckusickin a cylinder group.
5219022SmckusickThe intent is to prevent any single file from using up all the
5319022Smckusickblocks in a single cylinder group,
54*47464Scaelthus degrading access times for all files subsequently allocated
5519022Smckusickin that cylinder group.
5619022SmckusickThe effect of this limit is to cause big files to do long seeks
5719022Smckusickmore frequently than if they were allowed to allocate all the blocks
5819022Smckusickin a cylinder group before seeking elsewhere.
59*47464ScaelFor file systems with exclusively large files,
6019022Smckusickthis parameter should be set higher.
61*47464Scael.It Fl m Ar minfree
6219022SmckusickThis value specifies the percentage of space held back
6319022Smckusickfrom normal users; the minimum free space threshold.
6419022SmckusickThe default value used is 10%.
6519022SmckusickThis value can be set to zero, however up to a factor of three
6619022Smckusickin throughput will be lost over the performance obtained at a 10%
6719022Smckusickthreshold.
6819022SmckusickNote that if the value is raised above the current usage level,
6919022Smckusickusers will be unable to allocate files until enough files have
7019022Smckusickbeen deleted to get under the higher threshold.
71*47464Scael.It Fl o Ar optimize_preference
7224708SmckusickThe file system can either try to minimize the time spent
7324708Smckusickallocating blocks, or it can attempt minimize the space
7424708Smckusickfragmentation on the disk.
7524708SmckusickIf the value of minfree (see above) is less than 10%,
7624708Smckusickthen the file system should optimize for space to avoid
7724708Smckusickrunning out of full sized blocks.
7824708SmckusickFor values of minfree greater than or equal to 10%,
7924708Smckusickfragmentation is unlikely to be problematical, and
8024708Smckusickthe file system can be optimized for time.
81*47464Scael.El
82*47464Scael.Sh SEE ALSO
83*47464Scael.Xr fs 5 ,
84*47464Scael.Xr newfs 8 ,
85*47464Scael.Xr mkfs 8
86*47464Scael.Rs
87*47464Scael.%A M. McKusick
88*47464Scael.%A W. Joy
89*47464Scael.%A S. Leffler
90*47464Scael.%A R. Fabry
91*47464Scael.%T "A Fast File System for UNIX"
92*47464Scael.%J "ACM Transactions on Computer Systems 2"
93*47464Scael.%N 3
94*47464Scael.%P pp 181-197
95*47464Scael.%D August 1984
96*47464Scael.%O "(reprinted in the BSD System Manager's Manual, SMM:5)"
97*47464Scael.Re
98*47464Scael.Sh BUGS
9919022SmckusickThis program should work on mounted and active file systems.
10019022SmckusickBecause the super-block is not kept in the buffer cache,
10128372Smckusickthe changes will only take effect if the program
10228372Smckusickis run on dismounted file systems.
10328372SmckusickTo change the root file system, the system must be rebooted
10428372Smckusickafter the file system is tuned.
105*47464Scael.Pp
10619022SmckusickYou can tune a file system, but you can't tune a fish.
107*47464Scael.Sh HISTORY
108*47464ScaelThe
109*47464Scael.Nm
110*47464Scaelcommand appeared in
111*47464Scael.Bx 4.2 .
112