Summary: | slow loading webpage -- dhcp, dns, wireless related | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Pace Sie <ne> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | aspotashev, cooling.crystals, jtamate, kde, kromagg, mactalla.obair, marc, marcus, pmontepagano, rik |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Packet capture from surfing to a page using Firefox
Packet capture from surfing to a page using Konqueror |
Description
Pace Sie
2006-10-07 00:40:47 UTC
Much time of my slow loading is "waiting for reply" in status bar, so probably is the dns problem mentioned above. Please try the KDE_NO_IPV6 suggestion. Tried it, seems no difference. I recently ran into a similar problem on my router. Opening ~10 tabs in konqueror would make many pages load slow or not at all, dns problems would be reported. So I installed a dns proxy (dnsmasq) on my local machine and suddenly performance was tons better. Sniffing the network traffic of konqueror to the caching dns server vs the dns server to its peers I got the following numbers for opening 9 tabs: - konqueror made 461 dns requests (many duplicates) - the dns server translated this into 31 dns requests to its peers In short, I think what this user is seeing is konqueror flooding his (crappy) nat router so badly with packets that it starts dropping connections and DNS requests end up failing. The reason the above linked workaround works is probably the in-built dns server (which is generally even more crappy) failing, while routing can take a beating. Obviously on my local router (linksys thingy) it can't. Installing dnsmasq or similar locally is a workaround, I don't know if there's a similar facility built-in to KDE to do some rudimentary caching, but in the future it would perhaps be interesting to make konqueror remember past queries, at least if they all occur on loading the same page. This is with the debian sid package btw(3.5.5) *** This bug has been confirmed by popular vote. *** "Keep in mind that /etc/resolv.conf gets overwritten every time you run a dhcp client" At least under RedHat/Fedora you can set PEERDNS=no in the /etc/sysconfig/network-scripts/ifcfg-* to prevent DHCP from overwriting your local DNS settings. No idea if and/or how this works on other distros. To install a local DNS cache in Ubuntu/Kubuntu here are some tips: http://ubuntu.wordpress.com/2006/08/02/local-dns-cache-for-faster-browsing/ http://piao-tech.blogspot.com/2006/10/local-dns-cache-in-kubuntu-using-pdnsd.html hope is usefull. I to am having this problem. I see that Konqueror makes loads and loads of of DNS requests that Firefox just doesn't make. I am attaching two wireshark/ethereal packet captures of the surfing to the same page on the same night. I believe that there may be some issue here with IPV6 on my firewall/router, or it may just be a problem with the router (since it seems to start generating errors when too many requests are thrown at it) but it seems to me secondary to the obvious point that KDE is making lots of DNS requests it doesn't need to make (and that FF is not making). If you look at the konqueror version, you will see that around packet 42 it begins to re-query www.dailykos.com (the site I tested against), even though it had already queried it at the beginning. After about 8 seconds (!) it got a DNS failure response from the router. As I said, this *might* have had something to do with IP V6 issues, but not necessarily - the router does seem to be making proper IP V6 responses in general. At any rate, none of these queries need to be there as the DNS has already been determined for this address. Created attachment 19434 [details]
Packet capture from surfing to a page using Firefox
See my previous comment re packet capture from Firefox
Created attachment 19435 [details]
Packet capture from surfing to a page using Konqueror
Packet capture to the same page from Konqueror. Note the mess everything gets
into around packet 42. There is no reason for this DNS query at all (and
Firefox doesn't make it), since it's already been queried at the beginning.
P.S. I would be interested in adding DNS caching to kde if someone would point me at the parts of the code I should be looking at. If anybody stumbles upon this problem - it still exists in KDE 4.2.3 and can still be solved by using a proper nameserver in /etc/resolv.conf instead of the local router. Setting KDE_NO_IPV6=true in /etc/environment also seems to do it. This has been the major reason for not using Konqueror for me, glad I looked for an existing bug report! Surely this bug can be confirmed? It's still set to NEW after all this time... I see this issue as well (currently with KDE 4.2.4), but it existed in KDE 3.x I have to use the ISP's DNS address in /etc/resolv.conf (rather than the router's DNS forwarder) because sendmail doesn't work with the router's DNS (don't know why...). By observation I've found my router's NAT table is limited to 512 entries. After a period of intensive browsing (or restore old konqueror sessions after logout/reboot) the router's NAT table is filled with DNS queries and no more TCP connections can be made. This means web pages can't be displayed, and other network apps (and other computers) suffer loss of internet service. It seems Konqueror makes excessive DNS queries and is even worse if IPv6 is enabled. Blacklisting the IPv6 kernel module (via /etc/modprobe.d/blacklist.conf) helps a lot. Running "nscd" (name service cache daemon) also helps, but is not a complete solution either. (It doesn't help the konqueror restore sessions case.) I'd like to see konqueror make fewer gratuitous DNS queries. Could you do some tests with and without dnsmasq? I would, but I don't know how to do the testing. I haven't used konqueror much lately, but I believe it's not as slow as it was in KDE3.5. It's still seems slower than others at fetching. There is a configuration parameter for the dns queries for khtml. By default, for every <a href="...."> in a page a dns query is made in parallel with the page load. To avoid this behaviour, modify the .kde(x)/share/config/khtmlrc file and add in the group [HTML Settings] the entry DNSPrefetch=disabled [HTML Settings] DNSPrefetch=disabled After that, even without disabling IPv6 it should work as expected. Could you do some tests and share your results? Thanks for that config option. I don't have test numbers, but I've been running with that option for a number of days now and it does feel snappier. Is there a reason that this is not set by default? Dear user, KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6. Please migrate to use a QWebEngine based HTML component. We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes. For security issues, please see: https://kde.org/info/security/ Sorry that we did not fix this issue during the life-time of KHTML. Greetings Christoph Cullmann |