μtorrent Optimization Guide

Let’s assume you have sufficiently high bandwidth. For example, you are in college and your university does not care about torrenting. One frustrating thing when you are torrenting is that your hard disk does not provide zero latency or infinite bandwidth. μtorrent might be complaining “100% Disk IO” all the time and refuses to download or upload for quite a long time. After a few Googling, I have got some useful suggestions. I will first list what to do and then explain why.

Disclaimer: I am not aware of what you are torrenting and I do not care what you are torrenting. I’m just discussing technical problems. 🙂

What to Do

Run μtorrent with Administrator.

In “Advance”

  • Disable bt.graceful_shutdown.
  • Increase diskio.cache_stripe to 8192 or so.
  • Increase diskio.coalesce_write_size to 8000000 or something like that.
  • Enable diskio.no_zero ,diskio.smart_hash and disio.sparse_files.

In “Advaned – Disk Cache”

  • Override automatic cache size and specify the size manually. Something like 500MB or more will work well. The larger, the better. But be sure to leave some margin for other programs.
  • Enable caching of disk writes, do NOT write out untouched blocks every 2 minutes but DO write out finished pieces immediately.
  • Enable caching of disk reads, do NOT turn off read caching if the upload speed is slow, do NOT remove old blocks form the cache but DO increase automatic cache size when cache thrashing.
  • Do NOT reduce memory usage when the cache is not needed.

In “General”

  • Do NOT pre-allocate all files.

Explanation

“100% Disk IO” does not actually mean your disk is busy. It means μtorrent is running out of write caches. So what you did above almost are just trying to ensure write cache does not run out.

Run μtorrent with Administrator to let diskio.no_zero and disio.sparse_files actually work on Windows.

In “Advance”

  • Disable bt.graceful_shutdown so that you might not need to kill a pseudo-dead μtorrent and check everything you are downloading.
  • The option diskio.cache_stripe is the size of blocks of memory used in it’s disk cache in KiB. Default value is somewhat too small to avoid unnecessary disk IO.
  • The option diskio.coalesce_write_size tells µTorrent to try to minimize the number of writes to disk by writing more data at once. The default value is also too small.
  • Enabling diskio.no_zero causes µTorrent to skip the zero-filling process for file allocation. It only tells the filesystem to reserve the space but do not actually issue disk access. This is especially helpful if you are downloading very large torrents.
  • The option diskio.smart_hash makes µTorrent hash data from memory (if in the write queue) instead of flushing to disk, re-reading from disk, and then hashing and reduces disk access.
  • The option disio.sparse_files makes diskio.no_zero meaningful.

In “Advaned – Disk Cache”

  • µTorrent claims to manage cache size automatically but what I have observed is that it only uses a fixed 128MB cache. Increasing this value significantly reduces disk access.
  • Of course caches are helpful. But memory space is limited and if you do not write out immediately, µTorrent will occasionally keep it in memory for good. One write cache runs out, µTorrent will die.

In “General”

  • Do NOT pre-allocate all files so that diskio.no_zero and disio.sparse_files would work.

Reference: http://www.netcheif.com/Articles/uTorrent/html/AppendixA_02_12.html