[分享]让上网提速

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
dvdface
帖子: 152
注册时间: 2006-08-16 22:19
来自: 湖北武汉
联系:

[分享]让上网提速

#1

帖子 dvdface » 2006-08-19 13:05

最新,我发现的一个问题:

Ubuntu在安装的时候总是尝试通过DHCP获得Internet链接,去下载language文件,
我不让它下,安装后上网速度就很快了.






_______________________________________________

论坛里面有不少关于 firefox上网慢的话题。

有的说把IPv6的协议禁用,还有的对firefox进行配置,实际使用效果都不好。

我仔细看过所谓对firefox的优化参数之后,发现它们大多只不过添加了 多线程下载网页的功能,所以实际用处不大。

不信,你可以打开终端, 同时用 w3m (文字版的互联网浏览器) 和firefox打开一个你从未访问过的网页,你会发现,其实w3m也很慢。
这就说明了,浏览慢,并不仅仅是浏览器的问题。

所有这些东西,其实只用安装一个 叫做 fasterfox 的firefox浏览器扩展插件就可以自动给你设置了。设置一些优化参数的确对加快firefox的运行,而不是浏览速度 ,有帮助。

上网慢 真正的原因,仔细观察会发现,主要在firefox 花费在解析域名 的时间上。

所以有必要设置DNS缓存。

windows下面是自动设置的,所以不用操心。

在ubuntu下面就要花费一番功夫了。

所以需要装一个 叫做 dnsmasq的软件,它能提供dns解析的功能。
当然,改造一下,也能提供dns缓存的功能。


_____________________________________
具体操作
---------------------


安装dnsmasq
命令: sudo apt-get install dnsmasq

编辑dnsmasq的配置文件
命令: sudo gedit /etc/dnsmasq.conf

找到下面这一项
#resolv-file=

用下面的一条语句替换
resolv-file=/etc/resolv.dnsmasq.conf

确保你没有更改过/etc/resolv.conf文件,如果改过,恢复原状
然后执行命令
sudo cp /etc/resolv.conf /etc/resolv.dnsmasq.conf

然后编辑resolv.conf
命令;sudo gedit /etc/resolv.conf

将其中的域名服务器全部去掉,加入以下这行
nameserver 127.0.0.1

保存,退出


执行以下命令
sudo gedit /etc/ppp/peers/dsl-provider
在 usepeerdns 前面增加 # ,也就是把这条语句覆盖掉。
以防,resolv.conf的设置被pppoe覆盖。

重启电脑。不重启,你会发现无法解析域名。所以一定要重启电脑,来达到重新启动dnsmasq的目的。
重启后, 你会发现firefox的解析速度比以前快了N个数量级。
上次由 dvdface 在 2007-03-17 22:54,总共编辑 3 次。
头像
AIM
帖子: 58
注册时间: 2006-05-22 18:19

#2

帖子 AIM » 2006-08-19 13:22

我直接改的firefox的DNS缓存的存活时间和数量,不过没有测试过,不知道有没有效果。
头像
zhuqin_83
帖子: 10606
注册时间: 2006-05-13 4:02
联系:

#3

帖子 zhuqin_83 » 2006-08-19 13:36

安装ff的fasterfox插件会快不少的。
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
头像
suenr
帖子: 93
注册时间: 2006-07-09 21:22
来自: 香港

#4

帖子 suenr » 2006-08-19 15:54

这里也有几个加速 firefox 的方法。

http://www.hackaday.com/entry/1234000803024910/

试试看 :)
qvbsx
帖子: 117
注册时间: 2006-08-12 14:56
来自: GD SG SX
联系:

#5

帖子 qvbsx » 2006-08-26 11:01

效果不明显哦
Lippman
帖子: 35
注册时间: 2005-11-01 15:25

#6

帖子 Lippman » 2006-08-28 15:20

speed up firefox

forevergeek.com has a useful guide on speeding up firefox for broadband users. basically after getting to the hidden config settings you set the browser to request more data that it usually does.

1.Type “about:config” into the address bar and hit return. Scroll down and look for the following entries:

network.http.pipelining network.http.proxy.pipelining network.http.pipelining.maxrequests

Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.

2. Alter the entries as follows:

Set “network.http.pipelining” to “true”

Set “network.http.proxy.pipelining” to “true”

Set “network.http.pipelining.maxrequests” to some number like 30. This means it will make 30 requests at once.

3. Lastly right-click anywhere and select New-> Integer. Name it “nglayout.initialpaint.delay” and set its value to “0”. This value is the amount of time the browser waits before it acts on information it receives.

If you’re using a broadband connection you’ll load pages MUCH faster now!
头像
xjflyttp
帖子: 281
注册时间: 2006-10-18 0:36
来自: Core
联系:

#7

帖子 xjflyttp » 2007-04-08 14:56

直接用bind缓存不就好了~对什么程序都有效~~
T60p/T7600/2G/WD1600BJKT/BT/AR5008/V5200/15' QXGA
头像
dogfox
论坛版主
帖子: 5311
注册时间: 2006-09-02 14:18
来自: 汉桑城
联系:

#8

帖子 dogfox » 2007-04-08 16:25

河南网通不吃这一套哈
全世界linux爱好者联合起来 !
sivaj
帖子: 541
注册时间: 2007-05-19 16:36

#9

帖子 sivaj » 2007-05-30 1:22

/etc/resolv.conf文件里应该只有dns的地址才对 吧 如果有一个网管地址192.168.18.1正常吗
fy866
帖子: 12
注册时间: 2007-05-31 15:23

#10

帖子 fy866 » 2007-06-03 9:39

学习了,谢谢楼主
zscao
帖子: 48
注册时间: 2005-12-07 10:32

#11

帖子 zscao » 2007-06-06 15:43

学习了,确实有效,感谢楼主。
收藏!
头像
yiencai
帖子: 200
注册时间: 2007-06-11 12:38

#12

帖子 yiencai » 2007-06-12 18:30

是快了一点,以前开百度都会稍微停一下,现在没有了。
头像
roylez
帖子: 1928
注册时间: 2005-10-04 10:59
来自: 上海

#13

帖子 roylez » 2007-06-15 12:38

opendns.com
弄个dropbox空间来备份文件或者做私人代码服务器
配置:[url]git://github.com/roylez/dotfiles.git[/url]
主页:http://roylez.heroku.com
各种稀奇玩意儿:http://dooloo.info
头像
marsteel
帖子: 555
注册时间: 2005-11-28 12:09
联系:

#14

帖子 marsteel » 2007-07-15 22:44

汗,我都是把常去的网址的解析直接写到/etc/hosts里面的,速度好快
头像
marsteel
帖子: 555
注册时间: 2005-11-28 12:09
联系:

#15

帖子 marsteel » 2007-07-15 22:44

汗,我都是把常去的网址的解析直接写到/etc/hosts里面的,速度最快
回复