mldonkey-users
[Top][All Lists]
Advanced

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

Re: [Mldonkey-users] sparse file


From: Lionel Bouton
Subject: Re: [Mldonkey-users] sparse file
Date: Wed, 07 May 2003 00:43:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401

joseph wrote:


if i understand correctly, if my mldonkey temp directory were on an UFS partition, instead of an HFS+ partition (wich is the MacOS X dafault, and i can confirm it doesn't support 'sparse files'), my files being downloaded would only take the amount of space i actualy obtained ?


In fact the size of a chunk times the number of chunks from which you already downloaded something (mldonkey forcefully writes a whole zero-padded chunk on first downloaded byte from one given chunk, which triggers the allocation of the corresponding fs blocks). IE for ed2k : first byte downloaded -> 9MB allocated, no change until a byte from another chunk is downloaded then another 9MB block allocated and so on.


if the above is true, what appends if i download the last chunk (useful for preview)? would the temp file take the whole disk space of the actual file ?


No, on sparse-file supporting filesystem like UFS the allocation is done on a first write in filesystem block (the block's size depends on the fs, don't know for UFS, ext3 has support for 1k, 2k and 4k for example). Unless you write something, you don't allocate a single byte.


so would it be better to deactivate the 'download chunks in random order' option in that case ?


No need to do so. In fact this option only tells mldonkey what order it should favor, the actual download order depends of the chunks availabilities...


sorry if this is obvious for you, but i'm a non-english and a non-unix guy...


I'm French too, but I'm definitely an unix guy :-)



Jo.

LB





reply via email to

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