mldonkey-users
[Top][All Lists]
Advanced

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

[Mldonkey-users] Re: [Mldonkey-bugs] Disk space preallocation


From: Christian Lange
Subject: [Mldonkey-users] Re: [Mldonkey-bugs] Disk space preallocation
Date: Tue, 6 May 2003 09:09:22 +0200

Hello Markus,

I believe this should go to mldonkey-users, I hope you read that list as
well.

> Heck, I'm still wrestling with corrupt files and I still think my own
> client is the culprit. This time, I started a download and before the 
> first bytes arrived, I stopped the donkey and had a closer look at my 
> temp/ directory:

> Nobile:~/MLdonkey2.4rc8/temp$ df -k .
> Filesystem   1K-blocks     Used    Avail Capacity  Mounted on
> /dev/disk0s3   4942787  4544568   151080    96%    /Volumes/Party
> Nobile:~/MLdonkey2.4rc8/temp$ ll E2AFE281B2035AFFD7390C5C722974B1
> -rw-r--r--  1 mah  staff  132759552 May  5 20:58 
> E2AFE281B2035AFFD7390C5C722974B1

> Nobile:~/MLdonkey2.4rc8/temp$ bzip2 E2AFE281B2035AFFD7390C5C722974B1
> Nobile:~/MLdonkey2.4rc8/temp$ df -k .
> Filesystem   1K-blocks     Used    Avail Capacity  Mounted on
> /dev/disk0s3   4942787  4544557   151091    96%    /Volumes/Party
> Nobile:~/MLdonkey2.4rc8/temp$ ll E2AFE281B2035AFFD7390C5C722974B1.bz2
> -rw-r--r--  1 mah  staff  114 May  5 20:58 
> E2AFE281B2035AFFD7390C5C722974B1.bz2

> Nobile:~/MLdonkey2.4rc8/temp$ bzip2 -d
> E2AFE281B2035AFFD7390C5C722974B1.bz2
> Nobile:~/MLdonkey2.4rc8/temp$ df -k .
> Filesystem   1K-blocks     Used    Avail Capacity  Mounted on
> /dev/disk0s3   4942787  4674336    21312    99%    /Volumes/Party
> Nobile:~/MLdonkey2.4rc8/temp$ ll E2AFE281B2035AFFD7390C5C722974B1
> -rw-r--r--  1 mah  staff  132759552 May  5 20:58 
> E2AFE281B2035AFFD7390C5C722974B1

> Huh. Compressing and then decompressing the very same file filled my 
> disk. Can somebody verify this? OS X 10.2.5 on a iBook 640 MB RAM here.

I don't know which filesystem OS X uses, but it obviously supports
sparse files by default. If you move a file pointer to a position beyond
the end of the file, it extended without allocating the space on the
disk. Reading from these areas returns zero, writing allocates the block
on disk. Bzip got all zeroes on compression and wrote all zeroes
decompressing, allocating disk space at the time. You will notice that
after decompression you have about 130MB less space on your disk than
before, which is, coincidally, the file size.

Since this behaviour can lead to heavy fragmentation mldonkey allocates
disk space by 9.5MB chunks.

BTW: the official donkey client for Windows tries to simulate something
like sparse files by splitting the temp file in 9.5MB chunks.

 - Christian Lange, Berlin

-- 





reply via email to

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