Requesting full file preallocation

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

Requesting full file preallocation

Postby lucskos » Thu Aug 04, 2011 8:47 pm

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: 3643
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Requesting full file preallocation

Postby Cas » Fri Aug 05, 2011 12:39 am

After discussing with johnnyg I realise that you are asking to enable libtorrent's full allocation without sparse files as discussed in this topic: viewtopic.php?f=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

Postby lucskos » Sat Aug 06, 2011 8:35 pm

Thank you! It works.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 4 guests