You are not logged in.

#1 2015-05-03 11:47:34

kpc21
Member
Registered: 2013-11-17
Posts: 16

Slow first loading of webpages

I have a problem which I am trying to combat with, but I no longer manage to.

Archlinux. Firefox (in Opera the same, in Chromium better, but according to what I've read, it has additional cache, or something like this - anyway, it gets this problem somehow round).

I am opening a webpage, let's say bbs.archlinux.org, for the first time after a longer break. That means, I was surfing through different websites, portals, etc. and I want to enter this forum. It refers, of course, to all the domains. Wikipedia, Google, whatever - doesn't matter.

What happens? The webpage is loading terribly slow. It can take a half of a minute to open it. Then, after I enter a server, the next subpages open quite normally. The problem is with getting into for the first time.

I have a few other computers at home - with Windows - connected to the same gateway (Linksys WAG54G2, ones connected via wifi go additionaly through Linksys WRT54GC, which works only as an AP, the DHCP server is turned off in it and NAT is got round by connecting the other Linksys via not WAN but LAN port - anyway, it doesn't matter here). And everything works right there. The webpages load at once, there are some issues with YouTube, but it's understandable with my ISP (Polish Telecom), which is saving money on international links and is pushing all the international traffic through a crowded router in Frankfurt.

Following sugestions from the web, i turned off IPv6 at all - by means of kernel parameters in the bootloader - but it doesn't help.

Proxy is, of course, turned off.

This doesn't seem to be an issue with DNS, because for example I have Wikipedia put into /etc/hosts and it's also loading that slow.

/etc/resolv.conf:

cat /etc/resolv.conf
# Generated by resolvconf
nameserver 194.201.159.1
nameserver 194.204.152.34

(these are DNS servers of my ISP)

/etc/hosts:

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1    localhost.localdomain    localhost kacper-archlinux
91.198.174.192    pl.wikipedia.org
91.198.174.192    en.wikipedia.org
# End of file

ip link:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 00:19:66:b7:51:ef brd ff:ff:ff:ff:ff:ff

ip addr:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:19:66:b7:51:ef brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.100/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever

In terms of ping, for me it looks OK - but the answers appear slowly.

Ping to a Polish portal (to avoid some issues on international links):

PING www.dobreprogramy.pl (194.0.171.152) 56(84) bytes of data.
64 bytes from nlb-dobreprogramy.xenium.pl (194.0.171.152): icmp_seq=1 ttl=122 time=42.9 ms
64 bytes from nlb-dobreprogramy.xenium.pl (194.0.171.152): icmp_seq=2 ttl=122 time=43.3 ms
64 bytes from nlb-dobreprogramy.xenium.pl (194.0.171.152): icmp_seq=3 ttl=122 time=43.4 ms
64 bytes from nlb-dobreprogramy.xenium.pl (194.0.171.152): icmp_seq=4 ttl=122 time=44.3 ms
64 bytes from nlb-dobreprogramy.xenium.pl (194.0.171.152): icmp_seq=5 ttl=122 time=52.7 ms
64 bytes from nlb-dobreprogramy.xenium.pl (194.0.171.152): icmp_seq=6 ttl=122 time=43.1 ms
^C64 bytes from 194.0.171.152: icmp_seq=7 ttl=122 time=42.1 ms

--- www.dobreprogramy.pl ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 30493ms
rtt min/avg/max/mdev = 42.191/44.590/52.731/3.378 ms

tracert:

traceroute to www.dobreprogramy.pl (194.0.171.152), 30 hops max, 60 byte packets
 1  gateway (192.168.1.1)  0.599 ms  1.229 ms  11.185 ms
 2  lodz-bng1.tpnet.pl (80.50.118.230)  34.494 ms  35.410 ms  36.101 ms
 3  lodz-r1.tpnet.pl (80.50.118.229)  37.147 ms  38.292 ms  39.002 ms
 4  war-ar3.tpnet.pl (195.117.0.210)  48.200 ms  48.799 ms  49.510 ms
 5  80.50.129.46 (80.50.129.46)  50.786 ms  51.448 ms  52.653 ms
 6  do-atman-tpnet.xenium.pl (193.111.36.118)  53.949 ms  42.522 ms  41.890 ms
 7  * * *
 8  * * *
 9  * * *
(and asterisks only on)

Flood ping to servers in the Internet looks OK - the number of dots doesn't grow.

ping to the DNS servers:

PING 194.204.159.1 (194.204.159.1) 56(84) bytes of data.
64 bytes from 194.204.159.1: icmp_seq=1 ttl=251 time=33.6 ms
64 bytes from 194.204.159.1: icmp_seq=2 ttl=251 time=33.8 ms
64 bytes from 194.204.159.1: icmp_seq=3 ttl=251 time=33.2 ms
64 bytes from 194.204.159.1: icmp_seq=4 ttl=251 time=33.2 ms
64 bytes from 194.204.159.1: icmp_seq=5 ttl=251 time=33.4 ms
^C
--- 194.204.159.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 33.213/33.481/33.867/0.317 ms
PING 194.204.152.34 (194.204.152.34) 56(84) bytes of data.
64 bytes from 194.204.152.34: icmp_seq=1 ttl=60 time=33.8 ms
64 bytes from 194.204.152.34: icmp_seq=2 ttl=60 time=33.2 ms
64 bytes from 194.204.152.34: icmp_seq=3 ttl=60 time=33.9 ms
64 bytes from 194.204.152.34: icmp_seq=4 ttl=60 time=32.9 ms
64 bytes from 194.204.152.34: icmp_seq=5 ttl=60 time=33.4 ms
64 bytes from 194.204.152.34: icmp_seq=6 ttl=60 time=32.7 ms
^C
--- 194.204.152.34 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5006ms
rtt min/avg/max/mdev = 32.737/33.360/33.955/0.471 ms

Basically, it looks as if the query to DNS servers about IP took too much time, but, as for me, nothing confirms this. Moreover, the other PCs use the same DNS addresses and it's OK there.

Any ideas, suggestions, what can be wrong?

Last edited by kpc21 (2015-05-03 11:48:53)

Offline

#2 2015-05-03 14:54:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,793
Website

Re: Slow first loading of webpages

Have you tried using Google's DNS?

# /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

You will have to make the file immutable if you use dhcp:

# chattr +i /etc/resolv.conf

Jin, Jîyan, Azadî

Offline

#3 2015-05-03 20:22:37

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

On other PCs (with Windows) I have the same DNS'es set and the problem doesn't occur, so this is not the case.

Offline

#4 2015-05-03 20:55:47

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Slow first loading of webpages

Maybe it's an MTU issue - try:

ip link set eth0 up mtu 1492

Do you have a firewall that's blocking incoming ICMP? It *shouldn't* (although many wrongly do), because it screws up e.g. automatic MTU negotiation, thus causing problems such as your slowness.

If those don't work - use tcpdump, to check communication.

Offline

#5 2015-05-03 21:52:47

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

I've eliminated MTU and ICMP. MTU changing doesn't help, and my PC answers to pings from other ones, so ICMP cannot be blocked.

But in tcpdump I've found such entries:

23:38:06.410627 IP6 (hlim 1, next-header UDP (17) payload length: 154) fe80::e5ad:e153:34b:2129.63720 > ff02::c.ssdp: [udp sum ok] UDP, length 146

Looks like something with IPv6. Anyway, I can see here IPv6 addresses.

From time to time there is even more such messages:

23:39:50.991273 IP6 (hlim 1, next-header UDP (17) payload length: 499) fe80::886b:96ec:7a7:5a45.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 491
23:39:51.522375 IP (tos 0x0, ttl 1, id 29887, offset 0, flags [none], proto UDP (17), length 540)
    192.168.1.106.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 512
23:39:51.522568 IP6 (hlim 1, next-header UDP (17) payload length: 527) fe80::886b:96ec:7a7:5a45.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 519
23:39:51.819251 IP (tos 0x0, ttl 1, id 29888, offset 0, flags [none], proto UDP (17), length 526)
    192.168.1.106.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 498
23:39:51.819447 IP6 (hlim 1, next-header UDP (17) payload length: 513) fe80::886b:96ec:7a7:5a45.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 505
23:39:51.944203 IP (tos 0x0, ttl 1, id 29889, offset 0, flags [none], proto UDP (17), length 524)
    192.168.1.106.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 496
23:39:51.944418 IP6 (hlim 1, next-header UDP (17) payload length: 511) fe80::886b:96ec:7a7:5a45.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 503
23:39:52.225515 IP (tos 0x0, ttl 1, id 29890, offset 0, flags [none], proto UDP (17), length 460)
    192.168.1.106.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 432
23:39:52.225732 IP6 (hlim 1, next-header UDP (17) payload length: 447) fe80::886b:96ec:7a7:5a45.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 439
23:39:52.673909 IP (tos 0x0, ttl 1, id 29891, offset 0, flags [none], proto UDP (17), length 469)
    192.168.1.106.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 441
23:39:52.674124 IP6 (hlim 1, next-header UDP (17) payload length: 456) fe80::886b:96ec:7a7:5a45.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 448
23:39:54.001903 IP (tos 0x0, ttl 1, id 29892, offset 0, flags [none], proto UDP (17), length 512)
    192.168.1.106.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 484
23:39:54.002117 IP6 (hlim 1, next-header UDP (17) payload length: 499) fe80::886b:96ec:7a7:5a45.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 491
23:39:54.954902 IP6 (hlim 1, next-header UDP (17) payload length: 93) fe80::886b:96ec:7a7:5a45.dhcpv6-client > ff02::1:2.dhcpv6-server: [udp sum ok] dhcp6 solicit (xid=5efb10 (elapsed-time 6304) (client-ID hwaddr/time type 1 time 457821076 001a4d553f74) (IA_NA IAID:50338381 T1:0 T2:0) (Client-FQDN) (vendor-class) (option-request DNS-search-list DNS-server vendor-specific-info Client-FQDN))

Does it mean that IPv6 is still, somehow, on? Could somebody help in deciphering this stuff?

But despite of this, all the traffic goes via IPv4.

Maybe a short report, when I am trying to open a webpage.

Example for the same Polish portal as before (at the end also an NTP query got caught):

tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:50:37.874180 IP (tos 0x0, ttl 1, id 18758, offset 0, flags [none], proto UDP (17), length 526)
    192.168.1.104.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 498
23:50:37.874198 IP6 (hlim 1, next-header UDP (17) payload length: 513) fe80::e5ad:e153:34b:2129.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 505
23:50:37.874764 IP (tos 0x0, ttl 64, id 64492, offset 0, flags [DF], proto UDP (17), length 74)
    kacper-archlinux.53912 > 194.201.159.1.domain: [udp sum ok] 54783+ PTR? 250.255.255.239.in-addr.arpa. (46)
23:50:37.993274 IP (tos 0x0, ttl 1, id 18759, offset 0, flags [none], proto UDP (17), length 524)
    192.168.1.104.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 496
23:50:37.993286 IP6 (hlim 1, next-header UDP (17) payload length: 511) fe80::e5ad:e153:34b:2129.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 503
23:50:38.174465 IP (tos 0x0, ttl 1, id 18760, offset 0, flags [none], proto UDP (17), length 460)
    192.168.1.104.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 432
23:50:38.174476 IP6 (hlim 1, next-header UDP (17) payload length: 447) fe80::e5ad:e153:34b:2129.ssdp > ff02::c.ssdp: [udp sum ok] UDP, length 439
23:50:47.950999 IP (tos 0x0, ttl 64, id 783, offset 0, flags [DF], proto UDP (17), length 118)
    kacper-archlinux.52878 > 194.201.159.1.domain: [udp sum ok] 48718+ PTR? c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.ip6.arpa. (90)
23:50:58.030666 IP (tos 0x0, ttl 64, id 2386, offset 0, flags [DF], proto UDP (17), length 72)
    kacper-archlinux.41764 > 194.201.159.1.domain: [udp sum ok] 19554+ PTR? 1.159.201.194.in-addr.arpa. (44)
23:51:08.636069 IP (tos 0x0, ttl 64, id 62023, offset 0, flags [DF], proto TCP (6), length 869)
    kacper-archlinux.52534 > nlb-dobreprogramy.xenium.pl.http: Flags [P.], cksum 0xc458 (correct), seq 1088855880:1088856697, ack 2804029327, win 772, options [nop,nop,TS val 229644 ecr 162273440], length 817: HTTP, length: 817
	GET /Providers/NotifyHelper.ashx?ping=ping&_=1430689850528 HTTP/1.1
	Host: www.dobreprogramy.pl
	User-Agent: Mozilla/5.0 (X11; Linux i686; rv:37.0) Gecko/20100101 Firefox/37.0
	Accept: application/json, text/javascript, */*; q=0.01
	Accept-Language: pl,en-US;q=0.7,en;q=0.3
	Accept-Encoding: gzip, deflate
	DNT: 1
	X-Requested-With: XMLHttpRequest
	Referer: http://www.dobreprogramy.pl/
	Cookie: __utma=152983468.355680060.1384208226.1401900234.1401918910.458; __gfp_64b=u6RsUQZW4RJQZfpRxmqa_CGtSepdnb95LwCbanG0ovf.x7; NGDP_Auth=16997DPVDpngW4rV74W4gV; forum_member_id=17454; forum_rteStatus=rte; cornify=16; forum_pass_hash=523526efa136589c4264505541d12179; cookie_msg=1; _ga=GA1.2.355680060.1384208226; forum_sfc=1430684812; forum_sfct=lazikar; ASP.NET_SessionId=g0zk42jutzz3alqft4higd3d
	Connection: keep-alive
	
23:51:08.636272 IP (tos 0x0, ttl 64, id 3325, offset 0, flags [DF], proto UDP (17), length 72)
    kacper-archlinux.55860 > 194.201.159.1.domain: [udp sum ok] 43824+ PTR? 152.171.0.194.in-addr.arpa. (44)
23:51:08.699487 IP (tos 0x0, ttl 122, id 11662, offset 0, flags [DF], proto TCP (6), length 1500)
    nlb-dobreprogramy.xenium.pl.http > kacper-archlinux.52534: Flags [.], cksum 0x9208 (correct), seq 1:1449, ack 817, win 514, options [nop,nop,TS val 162274236 ecr 229644], length 1448: HTTP, length: 1448
	HTTP/1.1 200 OK
	Cache-Control: private
	Transfer-Encoding: chunked
	Content-Type: text/html; charset=utf-8
	Content-Encoding: gzip
	Vary: Accept-Encoding
	Server: Microsoft-IIS/8.0
	X-AspNet-Version: 4.0.30319
	X-Powered-By: ASP.NET
	Date: Sun, 03 May 2015 21:51:07 GMT
	
	5f4
23:51:08.699528 IP (tos 0x0, ttl 64, id 62024, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.52534 > nlb-dobreprogramy.xenium.pl.http: Flags [.], cksum 0x2833 (correct), seq 817, ack 1449, win 794, options [nop,nop,TS val 229663 ecr 162274236], length 0
23:51:08.699836 IP (tos 0x0, ttl 122, id 11663, offset 0, flags [DF], proto TCP (6), length 409)
    nlb-dobreprogramy.xenium.pl.http > kacper-archlinux.52534: Flags [P.], cksum 0x2381 (correct), seq 1449:1806, ack 817, win 514, options [nop,nop,TS val 162274236 ecr 229644], length 357: HTTP
23:51:08.699846 IP (tos 0x0, ttl 64, id 62025, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.52534 > nlb-dobreprogramy.xenium.pl.http: Flags [.], cksum 0x26b7 (correct), seq 817, ack 1806, win 817, options [nop,nop,TS val 229663 ecr 162274236], length 0
23:51:08.701697 IP (tos 0x0, ttl 122, id 11664, offset 0, flags [DF], proto TCP (6), length 72)
    nlb-dobreprogramy.xenium.pl.http > kacper-archlinux.52534: Flags [P.], cksum 0xad3b (correct), seq 1806:1826, ack 817, win 514, options [nop,nop,TS val 162274237 ecr 229644], length 20: HTTP
23:51:15.660358 IP (tos 0x0, ttl 64, id 17743, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.43826 > 194.0.171.165.http: Flags [.], cksum 0x54aa (correct), seq 2249995869, ack 3094507674, win 319, options [nop,nop,TS val 231752 ecr 159567178], length 0
23:51:15.660547 IP (tos 0x0, ttl 64, id 3690, offset 0, flags [DF], proto UDP (17), length 72)
    kacper-archlinux.32858 > 194.201.159.1.domain: [udp sum ok] 29660+ PTR? 165.171.0.194.in-addr.arpa. (44)
23:51:15.673680 IP (tos 0x0, ttl 64, id 43229, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.43827 > 194.0.171.165.http: Flags [.], cksum 0xb969 (correct), seq 1427430125, ack 3426976936, win 274, options [nop,nop,TS val 231756 ecr 159567179], length 0
23:51:15.687020 IP (tos 0x0, ttl 64, id 39713, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.43828 > 194.0.171.165.http: Flags [.], cksum 0x348c (correct), seq 3108826167, ack 1584071082, win 319, options [nop,nop,TS val 231760 ecr 159567179], length 0
23:51:15.701205 IP (tos 0x0, ttl 122, id 11153, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.165.http > kacper-archlinux.43826: Flags [.], cksum 0x6778 (correct), seq 1, ack 1, win 514, options [nop,nop,TS val 159568182 ecr 225738], length 0
23:51:15.716514 IP (tos 0x0, ttl 122, id 11154, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.165.http > kacper-archlinux.43827: Flags [.], cksum 0xcc0a (correct), seq 1, ack 1, win 514, options [nop,nop,TS val 159568184 ecr 225741], length 0
23:51:15.729041 IP (tos 0x0, ttl 122, id 11155, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.165.http > kacper-archlinux.43828: Flags [.], cksum 0x475b (correct), seq 1, ack 1, win 514, options [nop,nop,TS val 159568185 ecr 225743], length 0
23:51:20.734115 IP (tos 0x0, ttl 4, id 25267, offset 0, flags [none], proto UDP (17), length 352)
    192.168.1.254.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 324
23:51:20.734275 IP (tos 0x0, ttl 64, id 3936, offset 0, flags [DF], proto UDP (17), length 72)
    kacper-archlinux.58226 > 194.201.159.1.domain: [udp sum ok] 18324+ PTR? 254.1.168.192.in-addr.arpa. (44)
23:51:20.913693 IP (tos 0x0, ttl 64, id 53034, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.40826 > server-54-192-92-146.fra2.r.cloudfront.net.https: Flags [.], cksum 0xbe1b (correct), seq 4111314204, ack 2209810947, win 387, options [nop,nop,TS val 233328 ecr 290779101], length 0
23:51:20.959245 IP (tos 0x0, ttl 64, id 41450, offset 0, flags [DF], proto UDP (17), length 66)
    kacper-archlinux.44974 > dns2.tpsa.pl.domain: [udp sum ok] 63527+ A? ssl.dobreprogramy.pl. (38)
23:51:20.961782 IP (tos 0x0, ttl 64, id 41451, offset 0, flags [DF], proto UDP (17), length 66)
    kacper-archlinux.49815 > dns2.tpsa.pl.domain: [udp sum ok] 36002+ A? feeds.feedburner.com. (38)
23:51:20.976661 IP (tos 0x0, ttl 57, id 1803, offset 0, flags [DF], proto TCP (6), length 52)
    server-54-192-92-146.fra2.r.cloudfront.net.https > kacper-archlinux.40826: Flags [.], cksum 0xd27f (correct), seq 1, ack 1, win 171, options [nop,nop,TS val 290780109 ecr 227315], length 0
23:51:20.992657 IP (tos 0x0, ttl 60, id 0, offset 0, flags [DF], proto UDP (17), length 82)
    dns2.tpsa.pl.domain > kacper-archlinux.44974: [udp sum ok] 63527 q: A? ssl.dobreprogramy.pl. 1/0/0 ssl.dobreprogramy.pl. A 194.0.171.156 (54)
23:51:25.773275 IP (tos 0x0, ttl 64, id 5207, offset 0, flags [DF], proto UDP (17), length 72)
    kacper-archlinux.41398 > 194.201.159.1.domain: [udp sum ok] 25925+ PTR? 146.92.192.54.in-addr.arpa. (44)
23:51:25.782796 IP (tos 0x0, ttl 122, id 11162, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.165.http > kacper-archlinux.43828: Flags [.], cksum 0x436e (correct), seq 1, ack 1, win 514, options [nop,nop,TS val 159569190 ecr 225743], length 0
23:51:30.812436 IP (tos 0x0, ttl 64, id 5865, offset 0, flags [DF], proto UDP (17), length 73)
    kacper-archlinux.37024 > 194.201.159.1.domain: [udp sum ok] 50316+ PTR? 34.152.204.194.in-addr.arpa. (45)
23:51:35.900347 IP (tos 0x0, ttl 64, id 7475, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.43825 > 194.0.171.165.http: Flags [.], cksum 0xde7d (correct), seq 1555787258, ack 2324535608, win 364, options [nop,nop,TS val 237824 ecr 162275956], length 0
23:51:35.942183 IP (tos 0x0, ttl 122, id 12004, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.165.http > kacper-archlinux.43825: Flags [.], cksum 0x0908 (correct), seq 1, ack 1, win 514, options [nop,nop,TS val 162276961 ecr 225778], length 0
23:51:36.007027 IP (tos 0x0, ttl 64, id 52252, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.48614 > 194.0.171.159.http: Flags [.], cksum 0x210e (correct), seq 1704247117, ack 1865808127, win 64980, options [nop,nop,TS val 237856 ecr 162148882], length 0
23:51:36.007060 IP (tos 0x0, ttl 64, id 17766, offset 0, flags [DF], proto TCP (6), length 52)
    kacper-archlinux.48615 > 194.0.171.159.http: Flags [.], cksum 0x550c (correct), seq 1898329732, ack 4081499686, win 64980, options [nop,nop,TS val 237856 ecr 162148882], length 0
23:51:36.007770 IP (tos 0x0, ttl 64, id 6397, offset 0, flags [DF], proto UDP (17), length 72)
    kacper-archlinux.45567 > 194.201.159.1.domain: [udp sum ok] 4+ PTR? 159.171.0.194.in-addr.arpa. (44)
23:51:36.048920 IP (tos 0x0, ttl 122, id 32024, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.159.http > kacper-archlinux.48614: Flags [.], cksum 0x4c33 (correct), seq 1, ack 1, win 64980, options [nop,nop,TS val 162149887 ecr 225805], length 0
23:51:36.049595 IP (tos 0x0, ttl 122, id 32025, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.159.http > kacper-archlinux.48615: Flags [.], cksum 0x802e (correct), seq 1, ack 1, win 64980, options [nop,nop,TS val 162149887 ecr 225808], length 0
23:51:36.500058 IP (tos 0xb8, ttl 64, id 25392, offset 0, flags [DF], proto UDP (17), length 76)
    kacper-archlinux.ntp > afrodyta.complex.net.pl.ntp: [udp sum ok] NTPv4, length 48
	Client, Leap indicator:  (0), Stratum 2 (secondary reference), poll 6 (64s), precision -21
	Root Delay: 0.040191, Root dispersion: 0.006835, Reference-ID: tempus2.gum.gov.pl
	  Reference Timestamp:  3639678487.540287017 (2015/05/03 23:48:07)
	  Originator Timestamp: 3639678632.524745464 (2015/05/03 23:50:32)
	  Receive Timestamp:    3639678632.545041561 (2015/05/03 23:50:32)
	  Transmit Timestamp:   3639678696.500033020 (2015/05/03 23:51:36)
	    Originator - Receive Timestamp:  +0.020296111
	    Originator - Transmit Timestamp: +63.975287556
23:51:36.500081 IP (tos 0xb8, ttl 64, id 39757, offset 0, flags [DF], proto UDP (17), length 76)
c^C    kacper-archlinux.ntp > ntp.nsm.pl.ntp: [udp sum ok] NTPv4, length 48
	Client, Leap indicator:  (0), Stratum 2 (secondary reference), poll 6 (64s), precision -21
	Root Delay: 0.040191, Root dispersion: 0.006835, Reference-ID: tempus2.gum.gov.pl
	  Reference Timestamp:  3639678487.540287017 (2015/05/03 23:48:07)
	  Originator Timestamp: 3639678629.540248751 (2015/05/03 23:50:29)
	  Receive Timestamp:    3639678629.563654422 (2015/05/03 23:50:29)
	  Transmit Timestamp:   3639678696.500069677 (2015/05/03 23:51:36)
	    Originator - Receive Timestamp:  +0.023405624
	    Originator - Transmit Timestamp: +66.959820866

42 packets captured
1793 packets received by filter
1745 packets dropped by kernel

Is anything wrong here?

Last edited by kpc21 (2015-05-03 21:53:29)

Offline

#6 2015-05-04 06:41:30

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,426

Re: Slow first loading of webpages

Maybe is just the HDD going to standby and (incredibly) slow to spin-up?


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#7 2015-05-04 20:51:43

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

I don't think so. Copying a file of a few tens of MB to another partition on the same HDD is immediate. It's no way for the HDD to be slower than the Internet connection. Especially taking into account that it happens while browsing the web. I open the web browser and start browsing Wikipedia. After it opens slowly for the first time, it gets fast. Then I want to search for something in Google. Again, first opening of Google (immediately after using Wikipedia, which was fast) is slow, but then changing the pages is fast. When I return to Wikipedia then, it is still fast, unless I open many webpages from different servers in the meantime.

Last edited by kpc21 (2015-05-04 20:52:47)

Offline

#8 2015-05-04 21:05:29

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Slow first loading of webpages

You seem to have a delay of 5 seconds:

1st example:

23:51:15.729041 IP (tos 0x0, ttl 122, id 11155, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.165.http > kacper-archlinux.43828: Flags [.], cksum 0x475b (correct), seq 1, ack 1, win 514, options [nop,nop,TS val 159568185 ecr 225743], length 0
23:51:20.734115 IP (tos 0x0, ttl 4, id 25267, offset 0, flags [none], proto UDP (17), length 352)
    192.168.1.254.ssdp > 239.255.255.250.ssdp: [udp sum ok] UDP, length 324

2nd example:

23:51:20.992657 IP (tos 0x0, ttl 60, id 0, offset 0, flags [DF], proto UDP (17), length 82)
    dns2.tpsa.pl.domain > kacper-archlinux.44974: [udp sum ok] 63527 q: A? ssl.dobreprogramy.pl. 1/0/0 ssl.dobreprogramy.pl. A 194.0.171.156 (54)
23:51:25.773275 IP (tos 0x0, ttl 64, id 5207, offset 0, flags [DF], proto UDP (17), length 72)
    kacper-archlinux.41398 > 194.201.159.1.domain: [udp sum ok] 25925+ PTR? 146.92.192.54.in-addr.arpa. (44)

3rd example:

23:51:25.782796 IP (tos 0x0, ttl 122, id 11162, offset 0, flags [DF], proto TCP (6), length 52)
    194.0.171.165.http > kacper-archlinux.43828: Flags [.], cksum 0x436e (correct), seq 1, ack 1, win 514, options [nop,nop,TS val 159569190 ecr 225743], length 0
23:51:30.812436 IP (tos 0x0, ttl 64, id 5865, offset 0, flags [DF], proto UDP (17), length 73)
    kacper-archlinux.37024 > 194.201.159.1.domain: [udp sum ok] 50316+ PTR? 34.152.204.194.in-addr.arpa. (45)

Now, for DNS:

23:50:47.950999 IP (tos 0x0, ttl 64, id 783, offset 0, flags [DF], proto UDP (17), length 118)
    kacper-archlinux.52878 > 194.201.159.1.domain: [udp sum ok] 48718+ PTR? c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.ip6.arpa. (90)

I think your glibc is sending out an IPv6 DNS request - this is worth a try... put in /etc/gai.conf (a new file):

# Prefer ipv4 - http://www.funtoo.org/IPv6_Networking
precedence ::ffff:0:0/96 100

I've used that for many years.

Offline

#9 2015-05-04 21:24:12

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

Unfortunately it didn't help.

Offline

#10 2015-05-04 21:41:02

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Slow first loading of webpages

As a wild guess, try options single-request

Edit: Also check /etc/nsswitch.conf

Last edited by brebs (2015-05-04 21:42:30)

Offline

#11 2015-05-05 17:28:35

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

I've checked both and it doesn't help.

The current content of the config files:

# Generated by resolvconf
nameserver 194.201.159.1
nameserver 194.204.152.34

options single-request

(Doesn't the comment line "Generated by resolvconf" suggest that it may get overwritten in the future? Should I uninstall openresolv?)

# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

publickey: files

hosts: files dns # myhostname
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

# End /etc/nsswitch.conf

(I've just commented out what they were suggesting to delete in that thread)

I've noticed that, first of all, the DNS query takes this 5-minute time (which can lengthen the webpage loading time considerably when it contains external items, like fonts from Google API or Facebook applets - there is more domains to ask DNS servers about), but, what is more, besides DNS lookup, it takes much more time to just load the webpage for the first time after a longer break (and it doesn't have anything in common with the browser's cache, to push the webpage out of the browser's cache I would have to open really plenty of new ones - the cache size in Firefox is set to be managed automatically, but it seems that Firefox sets it to 240 MB, since this is the current cache size) than while changing subpages after it's opened once.

Like for example I've clicked your link to http://serverfault.com/questions/263824 … -establish. Then I wait some time and open a few different websites. I return to the tab where this link is still opened and click, let's say, Tags in the top menu. It takes much time to load it, although there is no DNS query, the OS has the IP already cached somewhere. Then when I click another link in the menu, or, generally, any local link on this webpage, the webpage loads immediately. Unless I do something different on the web again for some time.

Last edited by kpc21 (2015-05-05 17:30:48)

Offline

#12 2015-05-05 20:44:42

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Slow first loading of webpages

If one of the possible suspects is ipv6 why not try with 'ipv6.disable=1' on the kernel command line?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#13 2015-05-05 23:13:09

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

I have done it first smile

Offline

#14 2015-05-06 00:01:34

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Slow first loading of webpages

kpc21 wrote:

I have done it first smile

My bad, missed that bit of info and since later on you said that ipv6 might still be on/causing trouble this would be the first thing I would try.

Have you tried using a livecd of any linux distro on those windows boxes you say that work as expected? The reverse would be trying with windows on your problematic box. Is there anything on dmesg or journal output that might point to a problem?

No more ideas here, everything I can think of either doesn't apply or you have already tried.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#15 2015-05-16 14:46:22

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

I tried Ubuntu 10.10 live CD on 2 PCs - mine and another one (where normally Windows 8.1 is used and there is no such problems on it), connected to the same local network via Ethernet cables. Of a different length and connected to different ports of the switch built-in into my home "router" (as I've already mentioned - Linksys WAG54G2) - but I don't think it's possible that it really matters smile As for me - the only possible problem might be some issues with this Linksys.

The situation on both PCs with this Ubuntu is exactly the same as with my Arch. It is strange taking into account that I am testing it on a very old Ubuntu version (from the times before I even started using Linux as the main OS smile ) and I haven't noticed these problems before.

Here is the tcpdump on the same webpage as before, taken on the computer that with Windows works correctly :

ubuntu@ubuntu:~$ sudo tcpdump -lvv
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:39:22.075219 IP (tos 0x0, ttl 1, id 6305, offset 0, flags [none], proto UDP (17), length 512)
    192.168.1.104.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 484
14:39:22.075381 IP6 (hlim 1, next-header UDP (17) payload length: 499) fe80::e5ad:e153:34b:2129.1900 > ff02::c.1900: [udp sum ok] UDP, length 491
14:39:22.076396 IP (tos 0x0, ttl 64, id 45026, offset 0, flags [DF], proto UDP (17), length 74)
    ubuntu.33821 > 194.201.159.1.domain: [udp sum ok] 37903+ PTR? 250.255.255.239.in-addr.arpa. (46)
14:39:22.771655 IP (tos 0x0, ttl 1, id 6306, offset 0, flags [none], proto UDP (17), length 460)
    192.168.1.104.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 432
14:39:22.771669 IP6 (hlim 1, next-header UDP (17) payload length: 447) fe80::e5ad:e153:34b:2129.1900 > ff02::c.1900: [udp sum ok] UDP, length 439
14:39:23.981110 IP (tos 0x0, ttl 1, id 6307, offset 0, flags [none], proto UDP (17), length 524)
    192.168.1.104.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 496
14:39:23.981245 IP6 (hlim 1, next-header UDP (17) payload length: 511) fe80::e5ad:e153:34b:2129.1900 > ff02::c.1900: [udp sum ok] UDP, length 503
14:39:24.080393 IP (tos 0x0, ttl 1, id 6308, offset 0, flags [none], proto UDP (17), length 540)
    192.168.1.104.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 512
14:39:24.080528 IP6 (hlim 1, next-header UDP (17) payload length: 527) fe80::e5ad:e153:34b:2129.1900 > ff02::c.1900: [udp sum ok] UDP, length 519
14:39:24.292516 IP (tos 0x0, ttl 1, id 6309, offset 0, flags [none], proto UDP (17), length 469)
    192.168.1.104.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 441
14:39:24.292630 IP6 (hlim 1, next-header UDP (17) payload length: 456) fe80::e5ad:e153:34b:2129.1900 > ff02::c.1900: [udp sum ok] UDP, length 448
14:39:24.567042 IP (tos 0x0, ttl 1, id 6310, offset 0, flags [none], proto UDP (17), length 526)
    192.168.1.104.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 498
14:39:24.567054 IP6 (hlim 1, next-header UDP (17) payload length: 513) fe80::e5ad:e153:34b:2129.1900 > ff02::c.1900: [udp sum ok] UDP, length 505
14:39:24.736360 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has ubuntu tell 192.168.1.1, length 46
14:39:24.736374 ARP, Ethernet (len 6), IPv4 (len 4), Reply ubuntu is-at 00:1a:4d:55:3f:74 (oui Unknown), length 28
14:39:26.051227 IP (tos 0x0, ttl 1, id 1018, offset 0, flags [none], proto IGMP (2), length 32)
    192.168.1.254 > all-systems.mcast.net: igmp query v3
14:39:26.569204 IP (tos 0xd8, ttl 1, id 28928, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    BRN008092B5990A.local > 224.0.0.251: igmp v2 report 224.0.0.251
14:39:26.969204 IP (tos 0xd8, ttl 1, id 28929, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    BRN008092B5990A.local > 224.0.0.252: igmp v2 report 224.0.0.252
14:39:27.079462 IP (tos 0x0, ttl 64, id 46277, offset 0, flags [DF], proto UDP (17), length 74)
    ubuntu.46731 > dns2.tpsa.pl.domain: [udp sum ok] 37903+ PTR? 250.255.255.239.in-addr.arpa. (46)
14:39:27.123575 IP (tos 0x0, ttl 251, id 63860, offset 0, flags [DF], proto UDP (17), length 131)
    dns2.tpsa.pl.domain > ubuntu.46731: [udp sum ok] 37903 NXDomain q: PTR? 250.255.255.239.in-addr.arpa. 0/1/0 ns: 239.in-addr.arpa. SOA sns.dns.icann.org. noc.dns.icann.org. 2015051127 7200 3600 604800 3600 (103)
14:39:27.224347 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::21a:4dff:fe55:3f74.mdns > ff02::fb.mdns: [udp sum ok] 0 PTR (QM)? 250.255.255.239.in-addr.arpa. (46)
14:39:27.224417 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74)
    ubuntu.mdns > 224.0.0.251.mdns: [udp sum ok] 0 PTR (QM)? 250.255.255.239.in-addr.arpa. (46)
14:39:28.225833 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::21a:4dff:fe55:3f74.mdns > ff02::fb.mdns: [udp sum ok] 0 PTR (QM)? 250.255.255.239.in-addr.arpa. (46)
14:39:28.225900 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74)
    ubuntu.mdns > 224.0.0.251.mdns: [udp sum ok] 0 PTR (QM)? 250.255.255.239.in-addr.arpa. (46)
14:39:28.586889 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA))
    ubuntu > igmp.mcast.net: igmp v3 report, 1 group record(s) [gaddr 224.0.0.251 is_ex { }]
14:39:29.646180 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 40, options (RA))
    192.168.1.1 > igmp.mcast.net: igmp v3 report, 1 group record(s) [gaddr 239.255.255.250 is_ex { }]
14:39:30.228267 IP6 (hlim 255, next-header UDP (17) payload length: 54) fe80::21a:4dff:fe55:3f74.mdns > ff02::fb.mdns: [udp sum ok] 0 PTR (QM)? 250.255.255.239.in-addr.arpa. (46)
14:39:30.228336 IP (tos 0x0, ttl 255, id 0, offset 0, flags [DF], proto UDP (17), length 74)
    ubuntu.mdns > 224.0.0.251.mdns: [udp sum ok] 0 PTR (QM)? 250.255.255.239.in-addr.arpa. (46)
14:39:31.179272 IP (tos 0x0, ttl 1, id 28933, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    BRN008092B5990A.local > 239.255.255.250: igmp v2 report 239.255.255.250
14:39:32.126733 IP (tos 0x0, ttl 64, id 47538, offset 0, flags [DF], proto UDP (17), length 72)
    ubuntu.34487 > 194.201.159.1.domain: [udp sum ok] 49761+ PTR? 104.1.168.192.in-addr.arpa. (44)
14:39:35.689564 IP (tos 0x0, ttl 4, id 1020, offset 0, flags [none], proto UDP (17), length 308)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 280
14:39:42.165090 IP (tos 0x0, ttl 64, id 50048, offset 0, flags [DF], proto UDP (17), length 118)
    ubuntu.47088 > 194.201.159.1.domain: [udp sum ok] 8745+ PTR? c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.ip6.arpa. (90)
14:39:52.244316 IP (tos 0x0, ttl 64, id 52568, offset 0, flags [DF], proto UDP (17), length 72)
    ubuntu.36308 > 194.201.159.1.domain: [udp sum ok] 23562+ PTR? 1.159.201.194.in-addr.arpa. (44)
14:40:02.286355 IP (tos 0x0, ttl 64, id 55078, offset 0, flags [DF], proto UDP (17), length 70)
    ubuntu.36783 > 194.201.159.1.domain: [udp sum ok] 17414+ PTR? 1.1.168.192.in-addr.arpa. (42)
14:40:06.728060 IP (tos 0x0, ttl 64, id 56189, offset 0, flags [DF], proto UDP (17), length 66)
    ubuntu.35083 > dns2.tpsa.pl.domain: [udp sum ok] 24319+ A? www.dobreprogramy.pl. (38)
14:40:06.762242 IP (tos 0x0, ttl 251, id 63874, offset 0, flags [DF], proto UDP (17), length 82)
    dns2.tpsa.pl.domain > ubuntu.35083: [udp sum ok] 24319 q: A? www.dobreprogramy.pl. 1/0/0 www.dobreprogramy.pl. A 194.0.171.152 (54)
14:40:06.762437 IP (tos 0x0, ttl 64, id 2853, offset 0, flags [DF], proto TCP (6), length 60)
    ubuntu.54491 > nlb-dobreprogramy.xenium.pl.www: Flags [S], cksum 0xf77f (correct), seq 2293289120, win 5840, options [mss 1460,sackOK,TS val 252805 ecr 0,nop,wscale 6], length 0
14:40:06.804859 IP (tos 0x0, ttl 122, id 15685, offset 0, flags [DF], proto TCP (6), length 60)
    nlb-dobreprogramy.xenium.pl.www > ubuntu.54491: Flags [S.], cksum 0x5e12 (correct), seq 74505457, ack 2293289121, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 21409154 ecr 252805], length 0
14:40:06.804891 IP (tos 0x0, ttl 64, id 2854, offset 0, flags [DF], proto TCP (6), length 52)
    ubuntu.54491 > nlb-dobreprogramy.xenium.pl.www: Flags [.], cksum 0xac78 (correct), seq 1, ack 1, win 92, options [nop,nop,TS val 252816 ecr 21409154], length 0
14:40:06.804979 IP (tos 0x0, ttl 64, id 2855, offset 0, flags [DF], proto TCP (6), length 550)
    ubuntu.54491 > nlb-dobreprogramy.xenium.pl.www: Flags [P.], cksum 0xbc61 (correct), seq 1:499, ack 1, win 92, options [nop,nop,TS val 252816 ecr 21409154], length 498
14:40:06.887145 IP (tos 0x0, ttl 122, id 15686, offset 0, flags [DF], proto TCP (6), length 52)
    nlb-dobreprogramy.xenium.pl.www > ubuntu.54491: Flags [.], cksum 0xa8d8 (correct), seq 1, ack 499, win 514, options [nop,nop,TS val 21409162 ecr 252816], length 0
14:40:06.936917 IP (tos 0x0, ttl 122, id 15687, offset 0, flags [DF], proto TCP (6), length 1500)
    nlb-dobreprogramy.xenium.pl.www > ubuntu.54491: Flags [.], cksum 0xc61b (correct), seq 1:1449, ack 499, win 514, options [nop,nop,TS val 21409167 ecr 252816], length 1448
14:40:06.936941 IP (tos 0x0, ttl 64, id 2856, offset 0, flags [DF], proto TCP (6), length 52)
    ubuntu.54491 > nlb-dobreprogramy.xenium.pl.www: Flags [.], cksum 0xa483 (correct), seq 499, ack 1449, win 137, options [nop,nop,TS val 252849 ecr 21409167], length 0
14:40:06.938906 IP (tos 0x0, ttl 122, id 15688, offset 0, flags [DF], proto TCP (6), length 1500)
    nlb-dobreprogramy.xenium.pl.www > ubuntu.54491: Flags [.], cksum 0xdc15 (correct), seq 1449:2897, ack 499, win 514, options [nop,nop,TS val 21409167 ecr 252816], length 1448
14:40:12.323526 IP (tos 0x0, ttl 64, id 57588, offset 0, flags [DF], proto UDP (17), length 68)
    ubuntu.55366 > 194.201.159.1.domain: [udp sum ok] 9359+ PTR? 1.0.0.224.in-addr.arpa. (40)
14:40:12.833909 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.100 tell 192.168.1.1, length 46
14:40:27.403771 IP (tos 0x0, ttl 64, id 61358, offset 0, flags [DF], proto UDP (17), length 70)
    ubuntu.37794 > 194.201.159.1.domain: [udp sum ok] 5258+ PTR? 251.0.0.224.in-addr.arpa. (42)
14:40:42.481114 IP (tos 0x0, ttl 64, id 65127, offset 0, flags [DF], proto UDP (17), length 70)
    ubuntu.39400 > 194.201.159.1.domain: [udp sum ok] 55991+ PTR? 252.0.0.224.in-addr.arpa. (42)
14:40:52.522722 IP (tos 0x0, ttl 64, id 2101, offset 0, flags [DF], proto UDP (17), length 73)
    ubuntu.36851 > 194.201.159.1.domain: [udp sum ok] 47118+ PTR? 34.152.204.194.in-addr.arpa. (45)
14:40:57.561459 IP (tos 0x0, ttl 64, id 3361, offset 0, flags [DF], proto UDP (17), length 118)
    ubuntu.34172 > 194.201.159.1.domain: [udp sum ok] 4109+ PTR? b.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.f.f.ip6.arpa. (90)
14:40:58.264486 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.254 tell 192.168.1.112, length 46
14:41:07.638054 IP (tos 0x0, ttl 64, id 5880, offset 0, flags [DF], proto UDP (17), length 69)
    ubuntu.55860 > 194.201.159.1.domain: [udp sum ok] 38516+ PTR? 22.0.0.224.in-addr.arpa. (41)
14:41:08.151527 IP (tos 0x0, ttl 1, id 19736, offset 0, flags [DF], proto UDP (17), length 288)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 260
14:41:08.151906 IP (tos 0x0, ttl 1, id 19737, offset 0, flags [DF], proto UDP (17), length 358)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 330
14:41:08.152212 IP (tos 0x0, ttl 1, id 19738, offset 0, flags [DF], proto UDP (17), length 297)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 269
14:41:12.676851 IP (tos 0x0, ttl 64, id 7140, offset 0, flags [DF], proto UDP (17), length 72)
    ubuntu.48789 > 194.201.159.1.domain: [udp sum ok] 33823+ PTR? 152.171.0.194.in-addr.arpa. (44)
14:41:12.724912 IP (tos 0x0, ttl 1, id 28966, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    BRN008092B5990A.local > 224.0.0.251: igmp v2 report 224.0.0.251
14:41:13.824829 IP (tos 0x0, ttl 1, id 28967, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    BRN008092B5990A.local > 239.255.255.250: igmp v2 report 239.255.255.250
14:41:14.944806 IP (tos 0x0, ttl 64, id 7707, offset 0, flags [DF], proto UDP (17), length 62)
    ubuntu.58329 > dns2.tpsa.pl.domain: [udp sum ok] 10891+ A? www.facebook.com. (34)
14:41:14.954648 IP (tos 0x0, ttl 64, id 7709, offset 0, flags [DF], proto UDP (17), length 61)
    ubuntu.40574 > dns2.tpsa.pl.domain: [udp sum ok] 56455+ AAAA? plus.google.com. (33)
14:41:14.974726 IP (tos 0x0, ttl 1, id 28968, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
    BRN008092B5990A.local > 224.0.0.252: igmp v2 report 224.0.0.252
14:41:14.978513 IP (tos 0x0, ttl 251, id 63952, offset 0, flags [DF], proto UDP (17), length 102)
    dns2.tpsa.pl.domain > ubuntu.58329: [udp sum ok] 10891 q: A? www.facebook.com. 2/0/0 www.facebook.com. CNAME star.c10r.facebook.com., star.c10r.facebook.com. A 31.13.93.3 (74)
14:41:14.978841 IP (tos 0x0, ttl 64, id 7715, offset 0, flags [DF], proto UDP (17), length 54)
    ubuntu.39399 > 194.201.159.1.domain: [udp sum ok] 3714+ AAAA? vyos.net. (26)
14:41:15.015442 IP (tos 0x0, ttl 64, id 7725, offset 0, flags [DF], proto UDP (17), length 61)
    ubuntu.36936 > dns2.tpsa.pl.domain: [udp sum ok] 30801+ A? www.twitter.com. (33)
14:41:15.026076 IP (tos 0x0, ttl 251, id 63953, offset 0, flags [DF], proto UDP (17), length 89)
    dns2.tpsa.pl.domain > ubuntu.40574: [udp sum ok] 56455 q: AAAA? plus.google.com. 1/0/0 plus.google.com. AAAA 2a00:1450:4001:80e::1007 (61)
14:41:15.026209 IP (tos 0x0, ttl 64, id 7727, offset 0, flags [DF], proto UDP (17), length 61)
    ubuntu.58621 > 194.201.159.1.domain: [udp sum ok] 28378+ A? plus.google.com. (33)
14:41:15.049496 IP (tos 0x0, ttl 251, id 63954, offset 0, flags [DF], proto UDP (17), length 139)
    dns2.tpsa.pl.domain > ubuntu.36936: [udp sum ok] 30801 q: A? www.twitter.com. 5/0/0 www.twitter.com. CNAME twitter.com., twitter.com. A 199.16.156.102, twitter.com. A 199.16.156.70, twitter.com. A 199.16.156.230, twitter.com. A 199.16.156.6 (111)
14:41:17.834458 IP (tos 0x0, ttl 64, id 8429, offset 0, flags [DF], proto UDP (17), length 72)
    ubuntu.58976 > 194.201.159.1.domain: [udp sum ok] 53962+ PTR? 100.1.168.192.in-addr.arpa. (44)
14:41:19.643417 IP (tos 0x0, ttl 4, id 1071, offset 0, flags [none], proto UDP (17), length 308)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 280
14:41:19.644881 IP (tos 0x0, ttl 4, id 1072, offset 0, flags [none], proto UDP (17), length 364)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 336
14:41:19.646190 IP (tos 0x0, ttl 4, id 1073, offset 0, flags [none], proto UDP (17), length 292)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 264
14:41:19.709045 IP (tos 0x0, ttl 4, id 1074, offset 0, flags [none], proto UDP (17), length 284)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 256
14:41:19.710430 IP (tos 0x0, ttl 4, id 1075, offset 0, flags [none], proto UDP (17), length 328)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 300
14:41:19.834054 IP (tos 0x0, ttl 4, id 1076, offset 0, flags [none], proto UDP (17), length 304)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 276
14:41:19.835476 IP (tos 0x0, ttl 4, id 1077, offset 0, flags [none], proto UDP (17), length 358)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 330
14:41:19.898349 IP (tos 0x0, ttl 4, id 1078, offset 0, flags [none], proto UDP (17), length 356)
    192.168.1.254.1900 > 239.255.255.250.1900: [udp sum ok] UDP, length 328
14:41:27.875973 IP (tos 0x0, ttl 64, id 10940, offset 0, flags [DF], proto UDP (17), length 72)
    ubuntu.54569 > 194.201.159.1.domain: [udp sum ok] 15980+ PTR? 112.1.168.192.in-addr.arpa. (44)
14:41:30.105841 IP (tos 0x0, ttl 64, id 11497, offset 0, flags [DF], proto UDP (17), length 66)
    ubuntu.52224 > dns2.tpsa.pl.domain: [udp sum ok] 17605+ AAAA? feeds.feedburner.com. (38)
14:41:30.105887 IP (tos 0x0, ttl 64, id 11497, offset 0, flags [DF], proto UDP (17), length 61)
    ubuntu.57293 > dns2.tpsa.pl.domain: [udp sum ok] 564+ AAAA? www.synology.pl. (33)
14:41:30.139512 IP (tos 0x0, ttl 251, id 4823, offset 0, flags [DF], proto UDP (17), length 122)
    dns2.tpsa.pl.domain > ubuntu.52224: [udp sum ok] 17605 q: AAAA? feeds.feedburner.com. 2/0/0 feeds.feedburner.com. CNAME www4.l.google.com., www4.l.google.com. AAAA 2a00:1450:4001:80e::1008 (94)
14:41:30.139611 IP (tos 0x0, ttl 64, id 11506, offset 0, flags [DF], proto UDP (17), length 66)
    ubuntu.44427 > 194.201.159.1.domain: [udp sum ok] 28309+ A? feeds.feedburner.com. (38)
14:41:38.161397 IP (tos 0x0, ttl 1, id 19748, offset 0, flags [DF], proto UDP (17), length 288)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 260
14:41:38.161777 IP (tos 0x0, ttl 1, id 19749, offset 0, flags [DF], proto UDP (17), length 358)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 330
14:41:38.162718 IP (tos 0x0, ttl 1, id 19750, offset 0, flags [DF], proto UDP (17), length 297)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 269
14:41:38.163087 IP (tos 0x0, ttl 1, id 19751, offset 0, flags [DF], proto UDP (17), length 354)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 326
14:41:38.164541 IP (tos 0x0, ttl 1, id 19752, offset 0, flags [DF], proto UDP (17), length 297)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 269
14:41:38.164868 IP (tos 0x0, ttl 1, id 19753, offset 0, flags [DF], proto UDP (17), length 334)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 306
14:41:38.165175 IP (tos 0x0, ttl 1, id 19754, offset 0, flags [DF], proto UDP (17), length 297)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 269
14:41:38.165503 IP (tos 0x0, ttl 1, id 19755, offset 0, flags [DF], proto UDP (17), length 334)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 306
14:41:38.166506 IP (tos 0x0, ttl 1, id 19756, offset 0, flags [DF], proto UDP (17), length 297)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 269
14:41:38.166814 IP (tos 0x0, ttl 1, id 19757, offset 0, flags [DF], proto UDP (17), length 366)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 338
14:41:38.168268 IP (tos 0x0, ttl 1, id 19758, offset 0, flags [DF], proto UDP (17), length 350)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 322
14:41:38.168637 IP (tos 0x0, ttl 1, id 19759, offset 0, flags [DF], proto UDP (17), length 350)
    192.168.1.1.3074 > 239.255.255.250.1900: [udp sum ok] UDP, length 322
14:41:40.009478 IP (tos 0x0, ttl 250, id 54349, offset 0, flags [none], proto TCP (6), length 40)
^C    dot.wp.pl.www > ubuntu.52703: Flags [R], cksum 0xd6c3 (correct), seq 521332457, win 4380, length 0

94 packets captured
572 packets received by filter
473 packets dropped by kernel

The moment when the webpage appeared in the browser window is 14:40:25.


I've measured the time of opening the same webpage in the Windows I've mentioned and it's about 5 secs there. In Linuxes - a few tens of seconds (at my Arch - 25 secs until the images load totally). And it's more or less like this with all the possible webpages.

Last edited by kpc21 (2015-05-16 14:58:31)

Offline

#16 2015-05-16 16:44:00

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Slow first loading of webpages

Have you updated the router firmware recently or made any configuration changes? Did you try to reboot the router if you haven't done so in a while?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#17 2015-05-17 09:22:31

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

I haven't done any firmware updates, neither have I changed anything in its configuration. I haven't done a reboot for a long time, but I tried now and it doesn't help.

Offline

#18 2015-05-17 09:39:53

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Slow first loading of webpages

Play with dig. It shows how long DNS queries take.

"dig www.wp.pl" would ask the servers in /etc/resolv.conf and "dig www.wp.pl @8.8.8.8" would ask Google's DNS server.

By default there is no OS-level DNS caching in Linux (you'd have to use dnsmasq or nscd for that), so all DNS queries should take roughly the same time.

Last edited by lucke (2015-05-17 09:40:07)

Offline

#19 2015-05-17 12:42:39

kpc21
Member
Registered: 2013-11-17
Posts: 16

Re: Slow first loading of webpages

; <<>> DiG 9.9.2-P2 <<>> www.dobreprogramy.pl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51102
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;www.dobreprogramy.pl.		IN	A

;; ANSWER SECTION:
www.dobreprogramy.pl.	3416	IN	A	194.0.171.152

;; Query time: 33 msec
;; SERVER: 194.204.152.34#53(194.204.152.34)
;; WHEN: Sun May 17 14:40:15 2015
;; MSG SIZE  rcvd: 65
; <<>> DiG 9.9.2-P2 <<>> www.wp.pl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31023
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;www.wp.pl.			IN	A

;; ANSWER SECTION:
www.wp.pl.		90	IN	A	212.77.98.9
www.wp.pl.		90	IN	A	212.77.100.101

;; Query time: 111 msec
;; SERVER: 194.204.152.34#53(194.204.152.34)
;; WHEN: Sun May 17 14:39:57 2015
;; MSG SIZE  rcvd: 70
; <<>> DiG 9.9.2-P2 <<>> bbs.archlinux.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34056
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;bbs.archlinux.org.		IN	A

;; ANSWER SECTION:
bbs.archlinux.org.	3325	IN	CNAME	luna.archlinux.org.
luna.archlinux.org.	84181	IN	A	5.9.250.164

;; Query time: 34 msec
;; SERVER: 194.204.152.34#53(194.204.152.34)
;; WHEN: Sun May 17 14:41:07 2015
;; MSG SIZE  rcvd: 81
; <<>> DiG 9.9.2-P2 <<>> yandex.ru
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54278
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;yandex.ru.			IN	A

;; ANSWER SECTION:
yandex.ru.		244	IN	A	93.158.134.8
yandex.ru.		244	IN	A	87.250.251.11
yandex.ru.		244	IN	A	87.250.250.8
yandex.ru.		244	IN	A	77.88.21.11

;; Query time: 34 msec
;; SERVER: 194.204.152.34#53(194.204.152.34)
;; WHEN: Sun May 17 14:41:45 2015
;; MSG SIZE  rcvd: 102

The problem seems to have nothing in common with DNS.

Offline

Board footer

Powered by FluxBB