libtorrent4j icon indicating copy to clipboard operation
libtorrent4j copied to clipboard

[Android] Pieces checking slow with POSIX I/O backend

Open proninyaroslav opened this issue 2 years ago • 5 comments

Version: 2.0.5-26-RC1

Pieces checking hangs at some point, if POSIX I/O backend is enabled. I opened the log and found that there is a check running before 100-200 pieces, after which the check hangs. This happens with large torrents:

  • if the torrent has many files (more than 100)
  • if the size of the parts is large (about 15 MB)
  • or if there is only one file, but its size is large enough, more than 10 GB

This doesn't happen if the mmap I/O backend is enabled.

proninyaroslav avatar Mar 24 '22 09:03 proninyaroslav

UPD: I checked it again and It looks like the the check progress doesn't hangs completely, but it's very slow compared to mmap. I took ~14GB torrent with 258 files for test and noted the time:

POSIX mmap
2 min 33 sec 1 min 13 sec

proninyaroslav avatar Mar 24 '22 16:03 proninyaroslav

is this a 64bits device?

aldenml avatar Mar 24 '22 22:03 aldenml

Yes, but I can try to check it on a 32-bit device.

proninyaroslav avatar Mar 25 '22 07:03 proninyaroslav

Hi @proninyaroslav, is this still a problem?

aldenml avatar May 03 '22 00:05 aldenml

@aldenml Yes

proninyaroslav avatar May 03 '22 08:05 proninyaroslav