Skip to content

feature: nonblocking disk IO #2462

@ckerr

Description

@ckerr

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions