Page 1 of 1

3.2.0a All jobs stall while moving payload.

Posted: Tue Aug 19, 2014 9:01 pm
by ciaobaby
qBT 3.2.0a master built against Boost 1.53.0, libtorrent 0.16.16.0, QT env 4.8.4:
Linux Mint 16 64bit

Tested with four different jobs, payload size range from DVD iso (4.7GiB) to 147.9GiB consisting of several files and folders.

Moving a big payload (using set location) between file systems, all jobs stall from the start of the move operation through until the path label on the general tab displays the new location. at which point all jobs start up transferring data.

A 31.9GiB (1 MiB piece size) payload took a little under two hours to move from from a local SATA II drive to a USB 2 external connected over a NFS 'share' (done that way deliberately to try and monitor what was occurring.)

Moving between folders on the same drive is too quick to notice even with 147GiB, obviously as there is nothing to move physically.
Moving to a symlinked or direct external USB drive (local USB 2.0 port) stalls all jobs but is not as pronounced as the networked drive.

Re: 3.2.0a All jobs stall while moving payload.

Posted: Tue Aug 19, 2014 10:17 pm
by sledgehammer_999
AFAIK this is a limitation of libtorrent. The I/O thread of libtorrent does one thing at a time. So when it is writing things in the disk (in your case copying it to another disk) it doesn't fullfill other read/write requests. This has an effect on the transfers since no data is given to peers and not data is taken from peers.

You could try reporting it to libtorrent's bug tracker or opening a thread on its mailing list.

Re: 3.2.0a All jobs stall while moving payload.

Posted: Tue Aug 19, 2014 10:41 pm
by Muzak
FWIW, this behavior exists on Windows with version 3.1.9.2 as well

Re: 3.2.0a All jobs stall while moving payload.

Posted: Tue Sep 02, 2014 11:39 am
by Peter
[quote="Muzak"]
FWIW, this behavior exists on Windows with version 3.1.9.2 as well
[/quote]

[quote="sledgehammer_999"]The I/O thread of libtorrent does one thing at a time.
[/quote]

Re: 3.2.0a All jobs stall while moving payload.

Posted: Tue Sep 02, 2014 12:16 pm
by ciaobaby
Okay, okay. All things being equal, I should have re-read the libtorrent API BEFORE starting this thread. So I shall severely admonish myself with a privet twig for starting a pointless thread for a non-issue.
http://libtorrent.org/manual.html
move_storage()

    void move_storage(std::string const& save_path) const;
    void move_storage(std::wstring const& save_path) const;

Moves the file(s) that this torrent are currently seeding from or downloading to. If the given save_path is not located on the same drive as the original save path, The files will be copied to the new drive and removed from their original location. This will block all other disk IO, and other torrents download and upload rates may drop while copying the file.

Since disk IO is performed in a separate thread, this operation is also asynchronous. Once the operation completes, the storage_moved_alert is generated, with the new path as the message. If the move fails for some reason, storage_moved_failed_alert is generated instead, containing the error message.
So; OK people nothing to see here, just keep moving along and have a nice day now.

Re: 3.2.0a All jobs stall while moving payload.

Posted: Tue Sep 02, 2014 12:22 pm
by sledgehammer_999
And to avoid some future smartass commenting here, I am locking this.