// 1600mb cache
pack.set_int(libt::settings_pack::cache_size, 102400);
pack.set_bool(libt::settings_pack::use_read_cache, true);
pack.set_int(libt::settings_pack::suggest_mode, libt::settings_pack::suggest_read_cache);
// of 500 ms, and a send rate of 24 MB/s, the upper
// limit should be 12 MB
pack.set_int(libt::settings_pack::send_buffer_watermark, 12 * 1024 * 1024);
// put 1.5 seconds worth of data in the send buffer
// this gives the disk I/O more heads-up on disk
// reads, and can maximize throughput
pack.set_int(libt::settings_pack::send_buffer_watermark_factor, 150);
// always stuff at least 1 MiB down each peer
// pipe, to quickly ramp up send rates
pack.set_int(libt::settings_pack::send_buffer_low_watermark, 1 * 1024 * 1024);
其它可开启suggest_mode,关闭uTP。
来源:https://github.com/arvidn/libtorrent/issues/1709
参考:https://www.libtorrent.org/tuning.html
标签:none