1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
32 .\" @(#)tunefs.8 8.2 (Berkeley) 12/11/93
33 .\" $FreeBSD: src/sbin/tunefs/tunefs.8,v 1.11.2.6 2003/01/23 11:14:02 maxim Exp $
34 .\" $DragonFly: src/sbin/tunefs/tunefs.8,v 1.3 2006/02/17 19:33:33 swildner Exp $
41 .Nd tune up an existing filesystem
48 .Op Fl f Ar avgfilesize
51 .Op Fl n Ar enable | disable
52 .Op Fl o Ar space | time
56 .Op Ar special | Ar filesystem
59 is designed to change the dynamic parameters of a filesystem
60 which affect the layout policies.
61 The parameters which are to be changed are indicated by the flags
63 .Bl -tag -width indent
65 The filesystem has several backups of the super-block. Specifying
66 this option will cause all backups to be modified as well as the
67 primary super-block. This is potentially dangerous - use with caution.
69 Specify the maximum number of contiguous blocks that will
70 be laid out before forcing a rotational delay (see
73 The default value is one, since most device drivers require
74 an interrupt per disk transfer.
75 Device drivers that can chain several buffers together in a single
76 transfer should set this to the maximum chain length.
78 Specify the expected time (in milliseconds)
79 to service a transfer completion
80 interrupt and initiate a new transfer on the same disk.
81 It is used to decide how much rotational spacing to place between
82 successive blocks in a file.
84 Indicate the maximum number of blocks any single file can
85 allocate out of a cylinder group before it is forced to begin
86 allocating blocks from another cylinder group.
87 Typically this value is set to about one quarter of the total blocks
89 The intent is to prevent any single file from using up all the
90 blocks in a single cylinder group,
91 thus degrading access times for all files subsequently allocated
92 in that cylinder group.
93 The effect of this limit is to cause big files to do long seeks
94 more frequently than if they were allowed to allocate all the blocks
95 in a cylinder group before seeking elsewhere.
96 For filesystems with exclusively large files,
97 this parameter should be set higher.
98 .It Fl f Ar avgfilezsize
99 Specify the expected average file size.
101 Specify the percentage of space held back
102 from normal users; the minimum free space threshold.
103 The default value used is 8%.
104 This value can be set to zero, however up to a factor of three
105 in throughput will be lost over the performance obtained at a 10%
107 Settings of 5% and less force space optimization to
108 always be used which will greatly increase the overhead for file
110 Note that if the value is raised above the current usage level,
111 users will be unable to allocate files until enough files have
112 been deleted to get under the higher threshold.
113 .It Fl n Ar enable | disable
114 Turn on/off soft updates.
115 .It Fl o Ar space | time
116 The filesystem can either try to minimize the time spent
117 allocating blocks, or it can attempt to minimize the space
118 fragmentation on the disk.
119 Optimization for space has much
120 higher overhead for file writes.
121 The kernel normally changes the preference automatically as
122 the percent fragmentation changes on the filesystem.
124 Show a summary of what the current tunable settings
125 are on the selected filesystem. More detailed information can be
130 Specify the expected number of files per directory.
133 .Bl -tag -width /etc/fstab -compact
135 read this to determine the device file for a
136 specified mount point.
147 .%T "A Fast File System for UNIX"
148 .%J "ACM Transactions on Computer Systems 2"
152 .%O "(reprinted in the BSD System Manager's Manual, SMM:5)"
160 This program should work on mounted and active filesystems.
161 Because the super-block is not kept in the buffer cache,
162 the changes will only take effect if the program
163 is run on dismounted filesystems.
164 To change the root filesystem, the system must be rebooted
165 after the filesystem is tuned.
166 .\" Take this out and a Unix Demon will dog your steps from now until
167 .\" the time_t's wrap around.
169 You can tune a filesystem, but you can't tune a fish.