Managing filesystem types

Time and space optimization

If you are using a ufs filesystem, the system attempts to optimize the time it takes to perform operations on the filesystem. In certain circumstances, the system attempts to optimize the space on the storage media being used by the filesystem.

Space optimization occurs when file fragmentation exceeds: (free - 2) % of free disk space. When file fragmentation exceeds this value, this message is displayed:

   Optimization changed from TIME to <Space>
and the system will begin to optimize the space used by the filesystem.

The value of free is, by default, 10%, but it can be set to any value using the mkfs(1M) command. The main use of free is to specify the minimum percentage of free disk space allowed. It is also used to limit the fragmentation of the filesystem.

When a file grows past an 8K boundary under time optimization, the system allocates a fragment (which is 1K in size) to contain the data. When the boundary of the fragment is exceeded, the system allocates a new 8K block, and the fragment is copied to it. This means that there could be nearly 7K of wasted space at the end of some files.

With space optimization, however, whenever a file grows past a 1K boundary, all the fragments since the last 8K boundary are copied into a new, larger fragment.

If your system has swapped to space optimization, and you want to revert to time optimization, you must increase the value of free. Use tunefs(1M) to do this. You can increase free to any value you want; however, keep in mind the two functions of the free parameter if you want to set realistic values. free is used to do the following:

Set the value of free carefully, taking into account the typical file size and the number of directories on your system.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004