IssueRaiser

feature: nonblocking disk IO

There are so many overlapping issues reported that boil down to this central design problem that at this point it makes more sense to make a big-picture issue for async nonblocking disk IO, since that addresses all the other issues and they all overlap >50% with each other. The problem is this: the libtransmission thread is effectively single-threaded. There is a special case for verifying entire torrents; there is a short-lived dedicated thread for verifying whole torrents without blocking. But the rest of disk IO is done synchronously, so slow disk IO can cause peer communication or RPC communication to block until the disk IO is done. Disk IO for torrent data should be done asynchronously: - when writing blocks / piece data - while preallocating files. (this will happen naturally when the previous line is implemented) - when reading blocks or pieces for quick verification - when moving files Of these four, the first one should be addressed first as it likely causes the most pain: writing is slower than reading, and writing piece data is more common than moving files.

Posted by ckerr on Jan 19, 2022, 11:01 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

reliability (Other)

feature: nonblocking disk IO

ckerrJan 19, 2022, 11:01 PM

There are so many overlapping issues reported that boil down to this central design problem that at this point it makes more sense to make a big-picture issue for async nonblocking disk IO, since that addresses all the other issues and they all overlap >50% with each other. The problem is this: the libtransmission thread is effectively single-threaded. There is a special case for verifying entire torrents; there is a short-lived dedicated thread for verifying whole torrents without blocking. But the rest of disk IO is done synchronously, so slow disk IO can cause peer communication or RPC communication to block until the disk IO is done. Disk IO for torrent data should be done asynchronously: - when writing blocks / piece data - while preallocating files. (this will happen naturally when the previous line is implemented) - when reading blocks or pieces for quick verification - when moving files Of these four, the first one should be addressed first as it likely causes the most pain: writing is slower than reading, and writing piece data is more common than moving files.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue