Waiting lots of time for the page to be loaded when entering an URL.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Waiting lots of time for the page to be loaded when entering an URL.
Hi.
GNU/linux kernel 2.6 - Slackware distribution.
Its been a time now since, when I enter an url in my web browser, any of
the three I have, I must wait a great deal of time before I can see the
page. I must say I do this in the GUI, that is, under the X server. Although
the difference in speed between using a graphical web browser and a console
text browser such as 'links' should essensially be the great quantity of
elements to transmit in the graphical case.
However, when I try to download a file from the slackware official site (www.slack
ware.org) I notice the download speed goes almost to the top of the band-
width granted to me by my ISP.
Is reinstallation of the o.s. the only solution? Any suggestion
will be welcome. Thanks for your time.
May be. I know this: when I boot the same machine in another o.s., everything's fine. Hence, the problem should be in the linux partition,
and not in the outsidde world. Thanks for reading.
This sounds like a DNS resolution problem. If your /etc/resolv.conf looks okay, do you use a customized /etc/hosts file? If any IP addresses in that file get stale then any lookup to that address would stall.
I'm very sorry about the delay. The system on my machine
is to blame.
$ cat /etc/resolv.conf
# Generated by dhcpcd for interface eth0
nameserver 200.42.0.111
nameserver 200.42.97.111
nameserver 200.42.97.110
nameserver 200.42.0.110
nameserver 172.20.2.201
$
Thanks for your interest.
I may also be a Javascript problem in case you have disabled it in some way (manually or with an extension/plugin) and if you only experience this with some, but not all sites. Google Maps for example didn't work right for me because of this.
What are the DNS server settings on the other OSes on the same machine?
Does your Internet browser show what it is doing? If it sits for a while showing something like "Looking up ..." then the problem area is name resolution, probably DNS unless you have configured Slackware to use other name resolution mechanisms.
Try this script to see how your Slackware's DNS servers are responding. It's a bit of a hack but should do the trick.
Code:
#! /bin/bash
set -o posix
set -o nounset
shopt -s extglob # allow extended pattern matching operators
# Executables
# ~~~~~~~~~~~
# So can change to suit OS variant
nslookup='/usr/bin/nslookup'
sort='/usr/bin/sort'
#--------------------------
# Name: test_servers
# Purpose: tests response times of list of servers
# $1 - list of servers
# $2 - results heading
#--------------------------
function test_servers {
local oIFS out secs server
out=''
for server in $1
do
echo -n '.'
# DEVELOPMENT NOTE: -timeout=5 in command below does not seem to be effective; default 15 timeout operates
secs="$(/usr/bin/time -f '%e' $nslookup '-timeout=5' 'www.google.com' $server 2>&1 1>/dev/null)"
out="$out
$secs $server"
done
out="$(echo "$out" | $sort --general-numeric-sort)"
echo
echo "$2"
oIFS="$IFS"
IFS='
'
for buf in $out
do
IFS="$oIFS"
IP_address="${buf#* }"
response_time="${buf% *}"
if [[ ${response_time%.*} -lt 5 ]]; then
response_time="$response_time seconds"
else
response_time='Timed out'
fi
printf '%16s %s\n' "$IP_address" "$response_time"
done
return 0
} # end of function test_servers
my_servers='
200.42.0.111
200.42.97.111
200.42.97.110
200.42.0.110
172.20.2.201
'
test_servers "$my_servers" 'My DNS servers with query response times'
Check your resolv.conf man page. Ubuntu 8.04's says only the first three DNS servers are used.
If your ISP has unreliable DNS servers then you will get better average performance by overriding the default 5 seconds timeout by adding this line to resolv.conf
Hi.
The DNS server setting on the other OS on the same machine is DHCP.
Yes. My internet browser shows what it is doing (on a bar at the bottom
of the screen). And itsits for a while showing "Looking up ...". I have
not configured slackware to use other name resolution mechanism.
Follows the output of your script:
.....
My DNS servers with query response times
200.42.97.111 0.05 seconds
200.42.97.110 0.07 seconds
172.20.2.201 Timed out
200.42.0.110 Timed out
200.42.0.111 Timed out
The test script showed that the first DNS server listed in your resolv.conf did not respond. By default, the name resolution mechanism will wait 5 seconds for it to reply before trying the next listed DNS server. If the "great deal of time" you mentioned in your first post is ~5 seconds then this is enough to explain the symptoms you are seeing and you can fix the problem by changing the dhcpd configuration that generates resolv.conf, putting the two fastest servers at the top of the list. I am not familiar with dhcpd configuration.
That leaves the issue of the other DNS servers' non-response. Presumably their IP addresses were supplied by your ISP so this is an ISP-specific issue.
If your ISP's DNS service is unreliable then the optimal solution is to install dnsmasq with a resolv-file=/etc/resolv.dnsmasq.conf line in /etc/dnsmasq.conf then populate /etc/resolv.dnsmasq.conf with all the half-decent DNS servers you know about. dnsmasq silently tries all the DNS servers it is given and uses the fastest, switching from DNS server to DNS server as the situation changes. Nice!
My ISP has a very unreliable DNS service; dnsmasq has improved performance dramatically. I used to test and change DNS servers whenever name resolution became slow. Now dnsmasq does it automatically an a lot faster.
Last edited by catkin; 08-13-2009 at 06:07 AM.
Reason: Clearer language
I will do what you say, but this can take me some time, because I am
foreign to networking so, regrettable I won't be able to feedback about
the result, as I would like to do, for a while. By the way, in my case,
it is the whole ISP who is unreliable. Thanks and good bye,
Enrique.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.