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

Re: apt-get update: unnecessary use of disk space



On Fri, 20 Jun 2014 18:54:45 -0600
Bob Proulx <bob@proulx.com> wrote:

> 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.

It isn't very important as tune2fs accepts decimals for -m,
so you can easily reduce the original %age (eg: on a 39GB
partition, -m 0.1 gives 9488 reserved blocks).
You can also use the -r switch, specifying the exact number
of reserved blocks you want.
 
> 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.

However, these blocks won't be free for use except if you use
a defrag pgm, such as e2defrag.
100% - 5% = 95% == 100% usable, so if you reach 100% (of the 95%)
you're pwned except if you free the remaining sectors.

> 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.

There is no difference, as the embedded logic first gather
the whole sectors list before any operation takes place (not
exactly, but as the difference is counted in ns…)

> 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.

EXT4 has more protections about that:
https://www.redhat.com/archives/ext3-users/2009-January/msg00026.html

-- 
TooTo: For example, if you put the dog in the microwave,
       you'll void warranty
Manny: For the dog or for the microwave?

Attachment: signature.asc
Description: PGP signature


Reply to: