Page 1 of 1

Requesting full file preallocation

Posted: Thu Aug 04, 2011 8:47 pm
by lucskos
Hi,

new filesystems (ext4, xfs, etc) support a fast way to allocate a large file in one system call: fallocate(). This would make unfragmented downloads if enabled, which is a nice feature of all torrent client. (btw transmission already supports it, but i like deluge much more :) ). Is there any plan to support it?

The best way would be not only having a switch to preallocate all files with fallocate, but having a size limit below to use. Because some times there are 100GB+ torrents from which I'd like to download only a couple of megabytes. You might even not have so much free space... So pre-allocation would nicely work for a movie or a dvd image, making them not fragmented, but would be an overkill on extra large torrents.

For discussion about fallocate() see http://trac.fonosfera.org/fon-ng/ticket/997

Re: Requesting full file preallocation

Posted: Fri Aug 05, 2011 12:39 am
by Cas
After discussing with johnnyg I realise that you are asking to enable libtorrent's full allocation without sparse files as discussed in this topic: http://forum.deluge-torrent.org/viewtop ... =8&t=27725

This will probably be implemented in 1.4 however in the meantime you can manually edit the python file as suggested in that thread for 1.3.3.

Code: Select all

locate torrentmanager.py
Change:

Code: Select all

storage_mode = lt.storage_mode_t(1)
To:

Code: Select all

storage_mode = lt.storage_mode_t(0)

Re: Requesting full file preallocation

Posted: Sat Aug 06, 2011 8:35 pm
by lucskos
Thank you! It works.