up | Inhaltsverzeichniss | Kommentar

Manual page for TUNEFS(8)

tunefs - tune up an existing (dismounted) file system

SYNOPSIS

/usr/etc/tunefs [ -a maxcontig ] [ -d rotdelay ] [ -e maxbpg ] [ -m minfree ] special | filesystem

DESCRIPTION

tunefs is designed to change the dynamic parameters of a file system which affect the layout policies. The parameters which are to be changed are indicated by the OPTIONS given below:

OPTIONS

-a maxcontig
This specifies the maximum number of blocks, belonging to the same file, that will be allocated contiguously before inserting a rotational delay (see -d below).

Formerly, this value was always 1 because neither the device drivers nor the Unix file system (UFS) could handle multiple block requests. UFS has been modified to cluster together several (up to maxcontig) blocks when doing sequential reads and writes, resulting in higher I/O rates. This is especially beneficial on drives or controllers with track buffers; in some cases it can double or triple the I/O rates.

Newfs sets the value to 7 for many drives, but the best value varies from drive to drive because of the track buffer size as well as the drive geometry. People interested in the getting the utmost performace from their drives can try something like this (note that only the read case is of interest - the write case goes into the cache):

for i in 1 2 3 4 5 6 7
do	umount /mnt
	tunefs -a $i /mnt
	mount /mnt
	dd if=/dev/zero of=/mnt/XXX bs=8k count=1000
	umount /mnt; mount /mnt	# to clear the cache
	time dd of=/dev/null if=/mnt/XXX bs=8k
done


This parameter is limited in the following way:


        blocksize * maxcontig must be <= maxphys

maxphys is a read-only kernel variable that specifies the maximum block transfer size (in bytes) that the I/O subsystem is capable of satisfying. On most machines, maxphys is 56 Kbytes; on the sun4c architecture it is currently 124 Kbytes which allows maxcontig to vary from 1 to 15. This value is subject to change. (The limit is enforced by mount.2 not by newfs or mkfs.)

-d rotdelay
This specifies the expected time (in milliseconds) to service a transfer completion interrupt and initiate a new transfer on the same disk. It is used to decide how much rotational spacing to place between successive blocks in a file. For drives with track buffers a rotdelay of 0 is usually the best choice.
-e maxbpg
This indicates 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 quarter 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 big 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
This value specifies the percentage of space held back from normal users; the minimum free space threshold. The default value used is 10%. This value can be set to zero, however up to a factor of three in throughput will be lost over the performance obtained at a 10% threshold. Note: if the value is raised above the current usage level, users will be unable to allocate files until enough files have been deleted to get under the higher threshold.

SEE ALSO

fs.5 dumpfs.8 mkfs.8 newfs.8

[a manual with the abbreviation ADMIN]

BUGS

This program should work on mounted and active file systems. Because the super-block is not kept in the buffer cache, the program will only take effect if it is run on dismounted file systems; if run on the root file system, the system must be rebooted.

You can tune a file system, but you can't tune a fish.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 21/April/97