[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df -h

From: Bob Proulx
Subject: Re: df -h
Date: Sat, 2 Jun 2001 13:01:51 -0600

> please have a look at this:
> xylophon:/etc # df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/sda7             100G  2.1G   92G   3% /
> /dev/sda5              23M  4.8M   16M  23% /boot
> xylophon:/etc #
> Size 100Gigs; used 2.1 Gigs; Avail: 92G ????

The df program reports "Available" as space available to the normal,
non-root user.  It does not report space reserved by the filesystem
tunable "minfree" parameter.  The columns are "blocks" for total
number of blocks on the filesystem, which includes the minfree
reserved space.  That is followed by "Used" which is directly the
number of used disk blocks.  Then "Available" is how much space is
left available to the normal, non-root user.  That number is the
number of blocks minus the reserved minfree minus that used.

Taking your /dev/sda7 as an example:
  100G - 2G = 98G
  98G - 92G = 6G
  6G / 100G = 0.06 or 6%

Since you used -h I could not use exact numbers.  I assume that due to
conversion error the number is not really 6% but really 5%.  I believe
you are using a minfree of 5% reserved space for system use.  A
typical value.

My documentation for the old tunefs command indicates that the BSD
FastFileSystem performance can degrade on an active filesystem to 30%
of peek capability when the free space is allowed to drop below 10%.
It is hard to make generalities across different filesystem types, and
you did not report which OS/filesystem you were using so it could be
one of several, but mostly this is due to disk fragmentation.  With
enough free space the system can tune how it allocate blocks such that
accesses will be fast and no special defragmentation process is
needed.  But when there are only a few blocks left the OS has no
choices and performance can suffer.

Most modern filesystems have heritage to the BSD filesystem and most
have similar issues with lack of free space.  Therefore the minfree
reserves space to guarentee that performance is kept at an acceptable
level.  Also, this creates a reserve for system processes so that a
user can not starve the operating system completely out of space.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]