tunefs(1M)
NAME
tunefs − tune up an existing file system
SYNOPSIS
/etc/tunefs [-A] [-v] [-a maxcontig] [-d rotdelay] [-e maxbpg] [-m minfree] special-device
DESCRIPTION
tunefs is used to alter dynamic parameters that affect file system layout policies. Parameters to be altered are specified by the options and arguments provided on the command line as described below.
tunefs affects how the file system blocks are laid out on the disk. Default parameters used by the newfs command (see newfs(1m)) cause one block to be written and a minimum of 4 milliseconds (default rotdelay value) to be inserted before the next one is written. For many disks, this provides optimal throughput.
More sophisticated disk controllers sometimes have read-ahead or write-caching features that allow more aggressive tuning to be used. Changing to 0 ms rotdelay allows file system blocks to be written and read consecutively. On drives that have read-ahead but no write-caching capabilities, write performance will decrease due to latencies incurred after each write.
Options
tunefs recognizes the following options and command-line arguments:
-a maxcontig Set the maximum number of contiguous blocks that will be laid out before forcing a rotational delay to maxcontig (see -d below). The default value is 1, because most device drivers require one interrupt per disk transfer. For device drivers that can chain several buffers together in a single transfer, set maxcontig to the maximum chain length.
-d rotdelay rotdelay is the expected time (in milliseconds) to service a transfer completion interrupt and initiate a new transfer on the same disk. It is used to determine how much rotational spacing to place between successive blocks in a file.
-e maxbpg maxbpg specifies the maximum number of blocks any single file can allocate out of a cylinder group before it is forced to begin allocating blocks from another cylinder group. Typically this value is set to about one fourth of the total blocks in a cylinder group. The intent is to prevent any single file from using up all the blocks in a single cylinder group, thus degrading access times for all files subsequently allocated in that cylinder group. The effect of this limit is to cause large files to do long seeks more frequently than if they were allowed to allocate all the blocks in a cylinder group before seeking elsewhere. For file systems with exclusively large files, this parameter should be set higher.
-m minfree minfree specifies the percentage of space that is not available to normal users; i.e., the minimum free space threshold. The default value used is 10%. This value can be set to zero. If set to zero, throughput performance drops to as little as one-third of the efficiency expected when the threshold is set at 10%. Note that if minfree is raised above the current usage level, users cannot allocate files until enough files have been deleted to meet the new threshold requirement.
-v (visual) Display current values contained in the primary super-block to standard output.
-A (all) Modify redundant super-blocks as well as the primary super-block as stipulated by the configuration options and arguments.
special-device special-device is the name of the file system to be tuned. It is either a block or character special file for an unmounted volume or volume section.
WARNINGS
tunefs should be used only on unmounted file systems (when a file system is mounted, the super-block is copied into a buffer cache, then written back to the disk when the file system is unmounted, thus destroying any changes made to the disk super-block by tunefs while the filesystem was mounted).
Root file system tuning is normally done during initial system software installation. Tuning the root file system after installation has little useful effect because so many files have already been written. Tuning should be done in the install process; On Series 300/400 systems, when given the option to change file system parameters, enter 0 ms rotdelay instead of the default 4 ms. Series 700 systems select optimal tuning automatically during install.
You can tune a file system, but you can’t tune a fish.
DEPENDENCIES
Series 700
In general, Series 700 systems determine optimal tuning automatically and use it during the install process and during file-system generation, making use of tunefs unnecessary.
AUTHOR
tunefs was developed by the University of California, Berkeley.
SEE ALSO
dumpfs(1M), mkfs(1M), newfs(1M), fs(4).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992