How does filling a disk to capacity affect performance?
Michael I. Bushnell
mike at turing.UNM.EDU
Tue Apr 12 11:48:02 AEST 1988
In article <92 at iravcl.ira.uka.de> fsinf at iravcl.ira.uka.de writes:
>In article <460 at osupyr.mast.ohio-state.edu>, czei at osupyr.mast.ohio-state.edu (Michael S Czeiszperger) writes:
>> [...] the 'df' command adjusts the reading so that when it says 100% full,
>> the disk really is only 90% full. It goes on to say that having the
>> disk over 90% would affect its performance. Does anyone know [...]
>> if there are any reasons not to keep a disk at 96-99%??????
>Maybe the reasons are ...
>I've heard (but not verified) you can crash *every* unix-system using the
>CP-command when there is not enough space on disk. CP will not check
>whether the disk is full and overwrite blocks which are not free. The original
>data will be lost; also the machine is likely to go down.
Total nonsense. CP doesn't care beans which disk blocks are free.
The kernel does, however. When the kernel can't find a free block, it
doesn't just pick an in-use one. That would be REALLY stupid.
Instead, it just returns the ENOSPC (No space left on device) error
code. And usually prints something like "/usr: file system full" on
the console. (4.3 BSD uses the system error logger instead of the
console).
The reason for the behavior of df is more subtle. In the 4.2 Fast
File System, an attempt is made to keep every file "close together" on
the disk. The disk is divided into "Cylinder groups" which represent
a group of cylinders on the disk. Each file is stored in exactly one
cylinder group if possible. (Simplification: large files are split
between cylinder groups.) This significantly improved disk access
times in Unix. However, as the disk fills up, it becomes harder and
harder to allocate files in single cylinder groups. Experimentation
revealed that the deprication happened are roughly 90% full. As a
result, the kernel supports the feature of reserving most of the disk
for use only by superuser...maintaining the 10% margin for
performance. If you want the actual statistics, look at the document
"A Fast File System for Unix". If you want to change the free space
percentage, you can use the tunefs command.
>If this isn't right, please correct.
Consider it done.
N u m q u a m G l o r i a D e o
Michael I. Bushnell
HASA - "A" division
14308 Skyline Rd NE Computer Science Dept.
Albuquerque, NM 87123 OR Farris Engineering Ctr.
OR University of New Mexico
mike at turing.unm.edu Albuquerque, NM 87131
{ucbvax,gatech}!unmvax!turing.unm.edu!mike
More information about the Comp.unix.wizards
mailing list