首页 > 系统服务 > 详细

Linux上用trickle限制进程wget的下载速度

时间:2015-11-07 17:42:51      阅读:470      评论:0      收藏:0      [点我收藏+]
技术分享
sudo apt-get install trickle
php -S 127.0.0.1:8080 -t ./
生成一个1MB的文件test:
dd if=/dev/zero of=test bs=1M count=1
以256KB/s的速度wget下载1MB的test,耗时3.8秒:
time trickle -s -d 256 wget http://127.0.0.1:8080/test -O /dev/null
以256KB/s的速度curl下载1MB的test,耗时5.8秒:
time trickle -s -d 256 curl http://127.0.0.1:8080/test -o /dev/null
time trickle -s -d 256 curl http://127.0.0.1:8080/test -o test2
-s 表示独立运行,因为trickle还有一个trickled管理端可以用
-d 表示下载方向,单位都是KB/s
-u 表示上传方向,单位都是KB/s

Linux上用trickle限制进程wget的下载速度

原文:http://my.oschina.net/eechen/blog/527455

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!