bug-fileutils
[Top][All Lists]
Advanced

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

Re: [Bug-fileutils] Unsure about results of "df" program, version 4.0


From: Bob Proulx
Subject: Re: [Bug-fileutils] Unsure about results of "df" program, version 4.0
Date: Thu, 14 Sep 2000 13:42:36 -0600 (MDT)

> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/hdb7              3881800   2933840    750764  80% /
[...]
> My question: Why do the numbers in the columns "Available" and "Used" not
> sum up to the total listed under "1k-blocks"?

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/hdb7 as an example:
  3881800 - 2933840 = 947960
  947960 - 750764 = 197196
  197196 / 3881800 = .05 or 5%

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.

Bob Proulx



reply via email to

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