Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66062 - slow kde -> /etc/hosts explanation needed
Summary: slow kde -> /etc/hosts explanation needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-01 13:40 UTC by Tiago Freire
Modified: 2004-10-20 01:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Freire 2004-10-01 13:40:34 UTC
My Gentoo installation is a shining new, so new that I had no KDE 3.2. It is a clean KDE 3.3. When I try to navigate with Konqueror, it takes several second, like 30 or so, until it starts loading the page. When Kmail opens up emails with html, it shows the same delay to load web images (dilbert strips). I thought it could be related to the kernel, as 2.6.8 has some latency bugs right now, so I installed kernel 2.4.26-gentoo-r9, but the problem persists.
After I installed kernel 2.4, I also set the USE flag -ipv6 and reemerged mostly everything by using 'emerge -e kde'.
And it still persists. Navigating with firefox is snappy, but konqueror always takes a long delay before loading the page. I have a 800Kbps ADSL.


Reproducible: Always
Steps to Reproduce:
1.Load Konqueror
2.try to navigate the web 
3.see it waiting



Expected Results:  
should happily, snappily load pages

kernel: gentoo-sources 2.4.26-r9
Athlon XP 2600 (Barton)
512 MB RAM
1 GB swap
mobo: Asus a7n8x-x
using 'forcedeth' ethernet module


---------make.conf-------------
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -funroll-loops -mmmx -m3dnow
-msse -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="java gcj -ipv6  dba 3dnow acl acpi alsa apache2 arts avi berkdb cdr cjk
crypt cups curl dbase dga directfb doc dvd encode fam firebird flac flash
foomaticdb gd gif gtk2 imap imlib innodb jabber joystick jpeg kde libwww maildir
mcal mmx mozilla mpeg mysql ncurses nls oggvorbis opengl pam pcre pda pdflib
perl php png postgres python qt quicktime readline samba  scanner sdl soap
sqlite spell sse ssl svg svga theora tidy tiff tokenizer truetype usb wmf xml2
xmms xsl yahoo -xfree86 xorg zlib"
PORTAGE_NICENESS="20"
MAKEOPTS="-j2"
GENTOO_MIRRORS="ftp://ftp.linux.ee/pub/gentoo/distfiles/
http://mirror.datapipe.net/gentoo http://ftp.easynet.nl/mirror/gentoo/
http://194.149.10.102/"
ALSA_CARDS="snd-intel8x0"
------------------------
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2004-10-01 14:15:01 UTC
Sounds like the /etc/hosts issue. Search forumsg.o for > slow AND localhost AND KDE <
Comment 2 Simon Vermeersch 2004-10-01 16:33:41 UTC
add KDE_NO_IPV6=1 to /etc/env.d/99kde-env will do the trick
Comment 3 Tiago Freire 2004-10-04 05:00:32 UTC
I have fixed /etc/hosts, which listed 
127.0.0.1 localhost
192.168.1.30 amazonia.office amazonia
192.168.1.100 kuarup
...
to
127.0.0.1 amazonia localhost
192.168.1.30 amazonia.office
...
and it gto better, thanks. I cared to look at the Installation Handbook,
and in section 8.b - Configuring network, it show two different ways for configuring network, the first one being the way I thought it was right. 
My machine is inside a network, but other machines are windows, and we have no DNS (yet).

Maybe the Handbook could be clarified with more detailed explanation of the issue? It was not intuitive for me (and for others) the best option.
Comment 4 Carsten Lohrke (RETIRED) gentoo-dev 2004-10-05 07:17:47 UTC
docs-team: I proposed the requested documentation enhancement a while ago, but nothing happened. Seeing this question again and again, be it in forums.g.o or as a bug report, I would really like to ask you to do something about it. Thanks. :)
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2004-10-09 07:14:52 UTC
I just don't get it. Your hostname is linked to an IP address. If you have a network card configured to use 192.168.0.1 then you can map your hostname to that interface. The loopback device should imho never be used to have your hostname unless you don't have any interfaces.

You cannot have a hostname mapped to multiple IP addresses, how would you list your 192.168.0.1 then?

Most people forget to add their hostname to the /etc/hosts file in general. That indeed provides issues with slow startup times. Others don't use the /etc/hosts format well in the way that it should be "IP FQDN [ ALIAS]*".

Otherwise I think this is a bug in KDE itself.

The hosts(5) manpage has an example that doesn't use an alias for the localhost interface. Most networking HOWTOs state that you should have a line for your hostname bound to your IP address, not the loopback interface. 


@Tiago: if you revert your changes so that your /etc/hosts reads "amazonia" again for 192.168.1.30 and you do a "ping amazonia", does it lag also (before the replies come in - i.e. name resolving)?

Perhaps KDE doesn't listen to /etc/nsswitch.conf and immediately searches for nameservers through /etc/resolv.conf?

I also remember something about Samba bailing out when the hostname is mapped to the loopback interface, see #35770
Comment 6 Tiago Freire 2004-10-11 05:20:14 UTC
Switched back to only localhost set up on loopback and hostname on ethernet interface, and logged off and on just to be sure.
Konqueror instantly crapped itself again. 
pinging from konsole has no lag at all.
Switching back to setting up everything on the loopback.
I think this is not the way it *should* be, but I am no network expert.
Can a network guru comment on this? Which way is right way to do it, and should work?
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2004-10-11 08:48:03 UTC
Um, read only the "and it gto better, thanks" part. You're absolutely right, Sven.

>Most people forget to add their hostname to the /etc/hosts file in general.
And exactly that's why I wanted to have a hint in the desktop documentation, because a lot of users seem to have no idea, what can cause a slowdown. I did not look into the docs for a while, though. From what I noticed, the following can cause problems: a) /etc/hosts misconfiguration b) disabled DMA c) IPv6 lookup w/o IPv6 net

>Otherwise I think this is a bug in KDE itself.
There were bugs, but beside KPPP issues I cannot find anything in bugs.kde.org. 

Tiago: "127.0.0.1 amazonia localhost" is wrong of course. Are you sure, that only KDE applications are affected?
Comment 8 Tiago Freire 2004-10-11 09:50:25 UTC
> "127.0.0.1 amazonia localhost" is wrong of course. Are you sure, that only KDE applications are affected?

Actually, "localhost" comes before "amazonia", just after 127.0.0.1. 
I do not notice any lag on other applications.
Comment 9 Sven Vermeulen (RETIRED) gentoo-dev 2004-10-20 01:51:36 UTC
Fixed in kde-config.xml in CVS.