rtorrent-ps
rtorrent-ps copied to clipboard
Session save optimization
DownloadStore::save(Download* d, int flags)
could be optimized to not write unchanged resume data (by adding a new flag). Implement by storing the SHAs of the bencode data last written, adding very little memory overhead.
Reasons are less SSD wear and tear (a big session can have 100MiB, written every 20min by defaut), and UI freezes can happen if the file system blocks or is slow. Many loaded mostly idle items make this more prominent.
Note that uncertain_pieces.timestamp
in *.libtorrent_resume
changes every time.
Another route could be to write a command that saves the session in chunks of size arg.0
(using the uncertain_pieces.timestamp
to roll through loaded items), and change the save_session
schedule to run way more often and use that new command.
Since I went through all your configs and I haven't seen this in them (as far as I can recall): this can be a workaround until you fix it. Thanks!