设为首页收藏本站

ZMX - IT技术交流论坛 - 无限Perfect,追求梦想 - itzmx.com

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

搜索
查看: 1212|回复: 2

Linux libtorrent做BT种子离线服务器时,修改settings.json配置文件实现只下载文件,关闭使其不进行上传流量的办法

[复制链接]

签到天数: 4588 天

[LV.Master]伴坛终老

发表于 2021/11/30 22:21 | 显示全部楼层 |阅读模式 |Google Chrome 96.0.4664.45|Windows 10
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
Linux libtorrent做BT种子离线服务器时,修改settings.json配置文件实现只下载文件,关闭使其不进行上传流量的办法

英文原版
peers
First of all, in order to allow many connections, set the global connection limit high, settings_pack::connections_limit. Also set the upload rate limit to infinite, settings_pack::upload_rate_limit, 0 means infinite.

When dealing with a large number of peers, it might be a good idea to have slightly stricter timeouts, to get rid of lingering connections as soon as possible.

There are a couple of relevant settings: settings_pack::request_timeout, settings_pack::peer_timeout and settings_pack::inactivity_timeout.

For seeds that are critical for a delivery system, you most likely want to allow multiple connections from the same IP. That way two people from behind the same NAT can use the service simultaneously. This is controlled by settings_pack::allow_multiple_connections_per_ip.

In order to always unchoke peers, turn off automatic unchoke by setting settings_pack::choking_algorithm to fixed_slot_choker and set the number of upload slots to a large number via settings_pack::unchoke_slots_limit, or use -1 (which means infinite).


文档翻译
同龄人
首先,为了允许多个连接,将全局连接限制设置为高,settings_pack::connections_limit。还将上传速率限制设置为无限,settings_pack::upload_rate_limit,0 表示无限。

在处理大量对等点时,设置稍微严格的超时可能是个好主意,以尽快摆脱挥之不去的连接。

有几个相关的设置:settings_pack::request_timeout、 settings_pack::peer_timeout和settings_pack::inactivity_timeout。

对于对交付系统至关重要的种子,您很可能希望允许来自同一 IP 的多个连接。这样,同一 NAT 后面的两个人就可以同时使用该服务。这由settings_pack::allow_multiple_connections_per_ip控制 。

为了始终取消对等方的阻塞,请通过将settings_pack::choking_algorithm 设置为 fixed_slot_choker来关闭自动并且启用固定值模式,并通过settings_pack::unchoke_slots_limit将上传槽的数量设置为大量,或使用 -1(这意味着无限)。


choking_algorithm,经过检查,有三种算法,默认值已经为fixed_slot_choker,所以则无需改动该选项
fixed_slots_choker,
rate_based_choker,
deprecated_bittyrant_choker

可以得出,我们需要修改unchoke_slots_limit,默认值为8,我们修改成0即可


问:关闭上传这种做法属于吸血吗?
不属于吸血,因为离线下载后,文件会存在服务器资源库中,其他用户通过网盘可以下载到文件,实现利用离线下载的服务器加速BT种子下载分流,此时服务器面对用户甚至要付出数百上千倍的上传流量
并且这种做法有利于离线下载更快的下完资源,和降低服务器成本,因为服务器大部分采用了机械硬盘,持续读取进行上传会导致磁盘io性能爆掉,所以关闭上传

参考
https://www.libtorrent.org/tuning.html

Linux transmission 2.94做BT种子离线服务器时,修改settings.json配置文件实现只下载文件,关闭使其不进行上传流量的办法
https://bbs.itzmx.com/thread-99177-1-1.html

欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

签到天数: 1001 天

[LV.10]以坛为家III

发表于 2021/12/1 06:25 | 显示全部楼层 |Google Chrome 96.0.4664.45|Windows 10
俺认为:使用公(共)网(络)流量下载时候的时候不合理限制上传就是吸血
就是俺认为下载的时候不进行上传就是吸血
而且俺认为把下载任务分享率做到1把流量还回去应该是基本守则。
[发帖际遇]: Github 在论坛发帖时没有注意,被小偷偷去了 1 樱币. 幸运榜 / 衰神榜
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

签到天数: 1001 天

[LV.10]以坛为家III

发表于 2021/12/1 06:42 | 显示全部楼层 |Google Chrome 96.0.4664.45|Windows 10
当然理论上供一份源给离线服务器能满足整个对应客户端的客户的需求。
实际上离线服务器会对他们收费,而能够使用离线服务器的客户端又不是不进入公网。
背后俺认为就是p2p精神效率的对立吧。这两个理念背后又可以扩散很多。
最后开个玩笑,p2p精神是什么?当然是爆雷和跑路啦。
[发帖际遇]: Github 在网吧通宵,花了 2 樱币. 幸运榜 / 衰神榜
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 新浪微博账号登陆用百度帐号登录

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2024/7/27 08:52 , Processed in 0.087798 second(s), 19 queries , MemCache On.

Powered by itzmx! X3.4

© 2011- sakura

快速回复 返回顶部 返回列表