You are not logged in.

#1 2009-02-22 11:47:31

jjjaime
Member
Registered: 2009-02-19
Posts: 24

[SOLVED] Web navigation very slow

I've installed the last version of ArchLinux (archlinux-2009.02-ftp-i686.iso) and the web navigation is very slow. Loading Google's home page in Windows is instantaneous but in Linux it takes about 9 seconds. And the rest of web pages are the same. I've noticed that, when loading a web page, it takes a lot of time in "Looking up www.google.es..." so I guess that it is a networking problem. I've tried several web browser with the same result.
I've tried several changes which I found in Internet:

a) According to http://bbs.archlinux.org/viewtopic.php?id=61408:
  - I included the host name in /etc/hosts
  - I deactivated IPv6  in /etc/modprobe.conf with "alias net-pf-10 off"

b) According to http://wiki.archlinux.org/index.php/Qui … ux_Install:
- In /etc/rc.conf, I updated:
      gateway="default gw 192.168.1.1"
      ROUTES=(gateway)
   because my router is in 192.168.1.1 and the page recommended to remove the ! in ROUTES=(!gateway)
- I added /etc/resolv.conf.head:
      nameserver 192.168.1.1

These changes improved a bit the performance but I am not satisfied yet. It takes a lot of time to retrieve the 1st page from a server (however, afterwards, the navigation in that server is normal). It looks like there is no cache for DNS names.

Any hint?

Thank you in advance

Last edited by jjjaime (2009-02-23 20:18:22)

Offline

#2 2009-02-22 21:57:35

jjjaime
Member
Registered: 2009-02-19
Posts: 24

Re: [SOLVED] Web navigation very slow

I keep working on solving these problems but with no success.

Finally, it's a problem to establish the first link with each site, because afterwards the web connection is good.
I've executed the command "route" and the result is:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

But the second line appears after 6 seconds. I don't think it's normal.

Currently, I've removed the /etc/resolv.conf.head file, because it was wrong. And my rc.conf is:
      gateway="default gw 192.168.1.1"
      ROUTES=(!gateway)
But I cannot understand it. Why do I have to put ! in the ROUTES?

Any suggestion is welcome.

Offline

#3 2009-02-22 22:12:22

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [SOLVED] Web navigation very slow

You can configure pdnsd (for example) to cache DNS info locally, which does speed up browsing quite a bit.  There is a good wiki on how to set it up: http://wiki.archlinux.org/index.php/Pdnsd

Offline

#4 2009-02-23 00:52:22

dschrute
Member
From: NJ, USA
Registered: 2007-04-09
Posts: 183

Re: [SOLVED] Web navigation very slow

But I cannot understand it. Why do I have to put ! in the ROUTES?

The way i understood it, if using dhcp you want to disable the static default gateway, since you should pick it up dynamically when getting your address.  You want to remove the ! if using a static IP.
http://wiki.archlinux.org/index.php/Con … nfigure_IP

Any suggestion is welcome.

It still sounds like a name resolution issue to me.  What happens if you point to upstream dns servers directly ?  If you have dnsutils installed, what kind of response do you get when querying with nslookup or dig ?  does it improve if you try different name servers ?

Offline

#5 2009-02-23 20:17:47

jjjaime
Member
Registered: 2009-02-19
Posts: 24

Re: [SOLVED] Web navigation very slow

Thank you very much for your replies.

I tried the pdnsd approach, and it worked. However, it was not really what I wanted.

Then I test to deactivate the modification of /etc/resolv.conf by dhcpd, by changing the file: /etc/conf.d/dhcpcd
DHCPCD_ARGS="-C resolv.conf -q"
and update the /etc/resolv.conf file with a dns server. It also worked.

Finally I discovered the reason of the problem. The router offered two DNS servers. However, the 1st one didn't work (even the IP address didn't respond to a ping). This provoked all the delay.

Offline

#6 2009-03-18 06:10:15

stream303
Member
Registered: 2009-03-18
Posts: 23

Re: [SOLVED] Web navigation very slow

jjjaime wrote:

Finally I discovered the reason of the problem. The router offered two DNS servers. However, the 1st one didn't work (even the IP address didn't respond to a ping). This provoked all the delay.

Glad you found it!  One of the first things I do when setting up a system behind the typical soho router, is to put either the isp's primary and alternate dns addresses into the router itself.  (I actually prefer OpenDNS addresses - scroll to the bottom right of their web page)

In days of old when soho routers didn't always follow internet rfq's, and seemed to have their internal dns routines tuned for Windows / Mac, doing this helped bypass that nonsense.  Now the *nix boxes had no problems with slow dns lookups, and the windows/mac boxes were just fine as well.  I suppose soho routers are better these days, but I still do this.

Offline

Board footer

Powered by FluxBB