Jörg-Volker Peetz wrote:
> If you are interested in retrieving some disk space on this
> partition, I would suggest to reduce the percentage of diskspace
> which may only be allocated by privileged processes. It is normally
> 5% of the diskspace of a partition. In your case this makes ca. 1.8
> GB. To me this seems more than ever needed. If you reduce this
> reserve to, e.g., 2% or ca. 700 MB, which seems to me still enough
> reserve. And you gain ca. 1.1 GB free space.  For the "ext" family
> of file systems this can be done on the running system.
> 
> The 5% value was introduced when storage devices were much much
> smaller than today.
> 
> What do others think about this?

There are a couple of different issues that minfree addresses.  One is
the simple one.  Some amount should be reserved to root processes so
that a non-root process can't drive the system completely out of disk
space.  For that the reasonable amount of disk space reserved is an
absolute value that a system might need on that partitions.  That part
really shouldn't be a percentage of the disk but should be a finite
reserved amount.

The other is more subtle to understand.  In the "old" days of spinning
disks the allocation algorithm will try to defrag files on the fly by
allocating them appropriately.  That algorithm needs a certain
percentage of disk space free to use scattered throughout the drive.
For that algorithm it really should be a percentage.  For that
algorithm people would benchmark the system performance and determine
a good "knee" in the performance curve at various amounts of disk
fullness.  The knee in the curve would usually occur somewhere around
the 5% free amount.  Therefore setting it to 10% would guarentee good
performance.  Setting it to 5% would allow more use of space on bigger
disks but keep performance from getting too bad.

Of course now with SSDs that standard thinking needs to be thought out
again.  I haven't seen any benchmark data for full SSDs.  I imagine
that it will have much flatter performance curves up to very full on
an SSD.  It would super awesome if someone has already done this
performance benchmarking and would post a link to it so that we could
all learn from it.

So my thinking is that if it is a 3T spinning hard drive then I would
still keep minfree at 5% (or 10%) for reasons of performance until and
unless I see benchmark data showing otherwise.  For any size of SSD I
think it would be okay to reduce that to any smaller percentage that
still reserved at least 500M (my best guess, may need a better guess)
of disk space for the system to operate for log files and temporary
files and other normal continuous activity.

But remember that when the system gets very full then anything that
needs just a little more disk space for a bit will fail.  Not all
applications deal with a full disk very well.  We have been enjoying
having large disks for a while and so applications rarely are tested
very well for full disks.  I have seen a lot of code that doesn't
handle disk full properly.  If it is your laptop then that isn't a big
deal and you will probably know what the problem is about.  But if you
read your email there then it is also possible that you might lose a
message or two if disk space goes to zero.  Beware.  If I am that
close to full I will either clean or start planning the next storage
upgrade to something larger.

Bob

The steady state of disks is full. -- Ken Thompson

Attachment: signature.asc
Description: Digital signature

Reply via email to