lkml.org 
[lkml]   [1996]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: strange df output?
Date
Warner Losh said:
>
> : UFS usually reserves 10%, ext2 5%.
>
> I believe that 4.4-lite based systems reserve 5% now.
>
> : Part of the function of the reserved space is to make
> : sure there is enough free space to let the block placement algorithms
> : work efficiently.
>
> Put another way, these numbers are based on how well a hash table
> performs when the alpha of the table (its load) gets high. Most of
> these systems use a hash table to know what it can allocate.


I believe the BSD 10% is actually a lot simpller to explain, the (original)
algorithm trys to do various optimizationes, one is to find a contiguous
space to put the file in and another is to do so all in one track.
The chances of finding such a place in the file system (for files of more than
a few blocks) drops quite fast as the disk nears 100% full. So the OS wastes
time first to discover that there is no suitable place to write the file, and
secondly having to fragment the file on disk. An easy way to avoid too much
fragmentation is to simple leave 10% of the disk free.

Jon. <jon@gte.esi.us.es, http://www.esi.us.es/~jon>


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.038 / U:14.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site