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

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



Bzzzz a écrit :
> Bob Proulx <bob@proulx.com> wrote:
> 
>> What do you mean when you say "these blocks won't be free ..."
>> without defragmenting?  Please explain.  If you have references to
>> share that explained the details that would be great.
> 
> Just think about this:
> * HD original = 1000
> * HD -5%..... =  950
> 
> The -5% can _only_ be used by processes (eg: to write their
> log files); so for users, until a part or the whole -5% is
> released by re-tuning the disk, the HD will always looks 950.

I guess you mean "*privileged* processes". Only processes can write
files. Users cannot write files by themselves.

> Now, if you know an underlying mechanism that silently retrocede
> place from these 5% to users, please tell me what it is.
> 
> Hence "these blocks won't be free", as users only see a HD of 950.

These blocks are actually free. They just cannot all be allocated by non
privileged processes. There are not 5% blocks marked as only usable by
privileged process. There is only a limit saying that if the amount of
free blocks drops below 5%, then only privileged processes can allocate
blocks.

>> Also as I understand it use of e2defrag is not recommended.  Using
> [cut blurb]
> 
> This isn't the question, try not to be silly; I took the example
> of defrag pgm to illustrate the fact that the reserved 5% can
> only be accessed by such a program, enforcing the fact that these
> 5% are _unreachable_ from anyone (except root in particular cases).

e2defrag is a poor and misleading example. It is an offline tool working
on an unmounted filesystem, so limitations enforced by the filesystem
kernel driver do not apply to it.

> As either you wanna argue for looong sterile threads or you didn't
> understood, I put it in short terms:
> * HD (formatted) is 1000 (without any reservation)
> * Regular 5% reservation drops its capacity to 950
> * Everybody only sees and uses 950, not 1000
> * The 5% resa will _never_ be available to users

Correct (except privileged users).

> Conclusion: users see and use a 950 HD, meaning if I/O
> slows down when HD is 95% full, it will slow down at:
> 950 (HD seen capacity) * 95% = 902.5

Obviously wrong. The filesystem driver can use all the free blocks for
its allocation strategy. What matters for performance is the amount of
free blocks, not the amount of free space available to non privileged
processes.

I repeat : the only effect of the reservation is that if free space
drops below the reservation limit, then only privileged processes can
allocate blocks. Until then, it has no effect at all.


Reply to: