Requesting full file preallocation

Suggestions and discussion of future versions
Post Reply
lucskos
New User
New User
Posts: 8
Joined: Fri Jul 03, 2009 7:07 am

Requesting full file preallocation

Post 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
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Requesting full file preallocation

Post 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)
lucskos
New User
New User
Posts: 8
Joined: Fri Jul 03, 2009 7:07 am

Re: Requesting full file preallocation

Post by lucskos »

Thank you! It works.
Post Reply