分页: 1 / 2

[分享]让上网提速

发表于 : 2006-08-19 13:05
dvdface
最新,我发现的一个问题:

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个数量级。

发表于 : 2006-08-19 13:22
AIM
我直接改的firefox的DNS缓存的存活时间和数量,不过没有测试过,不知道有没有效果。

发表于 : 2006-08-19 13:36
zhuqin_83
安装ff的fasterfox插件会快不少的。

发表于 : 2006-08-19 15:54
suenr
这里也有几个加速 firefox 的方法。

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

试试看 :)

发表于 : 2006-08-26 11:01
qvbsx
效果不明显哦

发表于 : 2006-08-28 15:20
Lippman
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!

发表于 : 2007-04-08 14:56
xjflyttp
直接用bind缓存不就好了~对什么程序都有效~~

发表于 : 2007-04-08 16:25
dogfox
河南网通不吃这一套哈

发表于 : 2007-05-30 1:22
sivaj
/etc/resolv.conf文件里应该只有dns的地址才对 吧 如果有一个网管地址192.168.18.1正常吗

发表于 : 2007-06-03 9:39
fy866
学习了,谢谢楼主

发表于 : 2007-06-06 15:43
zscao
学习了,确实有效,感谢楼主。
收藏!

发表于 : 2007-06-12 18:30
yiencai
是快了一点,以前开百度都会稍微停一下,现在没有了。

发表于 : 2007-06-15 12:38
roylez
opendns.com

发表于 : 2007-07-15 22:44
marsteel
汗,我都是把常去的网址的解析直接写到/etc/hosts里面的,速度好快

发表于 : 2007-07-15 22:44
marsteel
汗,我都是把常去的网址的解析直接写到/etc/hosts里面的,速度最快