PDA

View Full Version : Slow startup times



sharlila
06-12-2004, 12:27 PM
I installed knoppix recently and I have a problem which I can't identify.
Some of the programs I open takes about 3 minutes to open and some
open right away. For example, konqueror opens in a heartbeat while
kwrite or kview takes forever (3 minutes). Also, opening superkaramba
takes a second, but when trying to open the file dialog to select a theme
you wait a long time. Sometimes even the "Start" :-) menu makes you
wait several minutes.

When starting these programs through konsole showed no errors.


Someone has an idea about this issue?
thank you./

sharlila
06-15-2004, 04:36 PM
:(

wanted to ask in the same time if there's a way to initiate the network
on startup. till now I have to use networkconfig and then select
eth1, then answer yes for the DHCP question, and only then I get
network.

kuser123
06-16-2004, 03:14 PM
strace kwrite
or try:
strace -e file kwrite
And look where the long delays are. Maybe that helps. If you are not familiar with the strace output then post it here. Maybe someone else can help you.

sharlila
06-17-2004, 05:59 PM
thank you,
it pauses for a long time on trying to open "/etc/rpc".

here's the last several lines of the log, till it gets stuck


open("/usr/lib/i686/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/i686", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/mmx/cmov/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/mmx/cmov", 0xbfffe9ec) = -1 ENOENT (No such file or directory)
open("/usr/lib/mmx/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/mmx", 0xbfffe9ec) = -1 ENOENT (No such file or directory)
open("/usr/lib/cmov/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/cmov", 0xbfffe9ec) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnss_db.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=40960, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY) = 11
fstat64(11, {st_mode=S_IFREG|0644, st_size=59821, ...}) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/libnss_files.so.2", O_RDONLY) = 11
fstat64(11, {st_mode=S_IFREG|0644, st_size=35288, ...}) = 0
open("/etc/rpc", O_RDONLY) = 11
fstat64(11, {st_mode=S_IFREG|0644, st_size=853, ...}) = 0

kuser123
08-09-2004, 12:31 AM
Ok, /etc/rpc is for network services. As you asked in your second post you seem to have problems with your network setup. Why is your network eth1 and not eth0? Is there another network card installed? It seems so. When you type ifconfig as root or /sbin/ifconfig as user you will get all networks which are up at this time. I think eth0 is already configured (maybe onboard ethernet card) and eth1 (additional network card) is not configured by default.

PLEASE: Read first the whole text before you change anything in your system!!

1) How to change the numbering:
The numbering of ethX is given by the order the drivers are loaded (for different network card types) and by the PCI-bus numbering (for network cards of the same type).
So when you want to have eth1 as eth0 and vice versa you have to blacklist the network card drivers by inserting the driver names in /etc/hotplug/blacklist. Then you have to have to insert these driver names in /etc/modules in the order you want.

2) Setup eth1 on boot:
Because for you eth1 works well when configured, you shouldn't change things described in 1) because you may run into troubles if you are not familiar with those things!
To setup eth1 automatically on boot you just have to change /etc/network/interfaces in the following way:
OLD: auto lo eth0
NEW: auto lo eth0 eth1
NEW: iface eth1 inet dchp
Now eth1 should be configured automatically on startup. If this doesn't work you may have the problem that your driver isn't automatically loaded on startup (onyl god knows why not...) So then do the following:
configure your network card as you described in your second posting. Then type lsmod as root in a shell. The last loaded driver (TOP LINE in the driver list!) is the one for your network card. Add this name to /etc/modules and then it should work like lubricated ;-)

3) Where do the delays come from?
The answer is that on startup and also on a running system a lot of network services sometimes try to access the network. These accesses have big timeouts of several seconds which can block some programs when the accesses fail.

I hope this helps and make some things clearer.

Greetings, Martin

sharlila
08-10-2004, 11:40 AM
thanks a lot for the reply, but I need to clarify something:
You think the slow application loading is caused by the network?
I think it's something else. I've noticed that it happens only to
KDE applications (kedit, kwrite, konqueror filebrowser, and when
trying to open the 'file open' dialog which have the kde default
dialog, sometimes when I press on the kde's 'start' :-) menu).
To other X apps it does not happen, and also it does not
happen to every kde app.

About the network card, I'll try your (2) suggestion. thanks.

kuser123
08-10-2004, 12:07 PM
KDE Apps extensively use KIO objects which can also do network communication. So when you write a KDE Apps you don't have to worry much about network programming. It may be that these KIO Objects block the KDE Apps for the timeout time for network accesses.
As I said: It may be...
Each start of a network access can have up to two states:
1) Do a DNS-Query to convert it into an IP-Address/Network
2) Connect to the desired device/Do network scanning, etc.

1) and 2) can block apps. So when network is not configured correctly apps can be blocked for a while. You can see this when debugging with strace, gdb, etc.

Cheers, Martin

sharlila
08-11-2004, 08:18 AM
kuser123, I have a little question about the 'interface' file, this is mine:


auto lo eth1
iface lo inet loopback

auto eth0 eth1
iface eth0 inet dhcp


iface eth1 inet dhcp


it's not exactly how you wrote it should be, so I was wondering if any
lines are expendible. BTW, I think that eth0 might be my winmodem,
can it be? cause I don't have any other network cards in my computer.

kuser123
08-11-2004, 03:58 PM
Your interfaces file looks good. But it is enough to have one "auto..." line. So you can simplify the file:
"auto lo eth0 eth1" The second "auto..." can be then deleted. But this is only for cosmetic...
I don't know much about WinModems but it can be that eth0 is a WinModem.
If eth1 is still not working by default on startup you may have the problem that your network card driver is not loaded on startup. So add the name of the needed driver module to /etc/modules

sharlila
08-15-2004, 01:15 PM
sorry to bother you on such a "trivial" question but I can't seem to find
the network module :oops:


root@knopbox:~# lsmod
Module Size Used by
snd_mixer_oss 19072 0
appletalk 37452 2
ax25 68044 2
ipx 32164 2
lp 13768 0
ipt_state 6272 55
ipt_REJECT 9728 4
ipt_limit 6784 6
ipt_LOG 10496 6
ip_conntrack_ftp 75540 0
ip_conntrack 35588 2 ipt_state,ip_conntrack_ftp
iptable_filter 6784 1
ip_tables 20240 5 ipt_state,ipt_REJECT,ipt_limit,ipt_LOG,iptable_fil ter
pci_hotplug 33724 0
8250_pci 20352 0
snd_trident 43524 0
snd_ac97_codec 59268 1 snd_trident
snd_pcm 86144 1 snd_trident
snd_timer 25344 1 snd_pcm
snd_page_alloc 13060 2 snd_trident,snd_pcm
snd_util_mem 7680 1 snd_trident
snd_mpu401_uart 10496 1 snd_trident
snd_rawmidi 23552 1 snd_mpu401_uart
snd_seq_device 10756 2 snd_trident,snd_rawmidi
snd 49540 9 snd_mixer_oss,snd_trident,snd_ac97_codec,snd_pcm,s nd_timer,snd_util_mem,snd_mpu401_uart,snd_rawmidi, snd_seq_device
tsdev 9984 0
evdev 11520 0
dm_mod 40608 0
raw1394 30828 0
ehci_hcd 29824 0
md5 8064 1
ipv6 248736 8
sis 46432 2
via_agp 9856 0
sworks_agp 11424 0
sis_agp 9472 1
nvidia_agp 10012 0
intel_mch_agp 12044 0
intel_agp 18968 0
efficeon_agp 10496 0
ati_agp 10636 0
amd64_agp 12872 0
amd_k7_agp 10124 0
ali_agp 9600 0
autofs 19456 1
af_packet 21124 0
nls_iso8859_1 8320 1
nls_cp437 9984 1
agpgart 31564 12 via_agp,sworks_agp,sis_agp,nvidia_agp,intel_mch_ag p,intel_agp,efficeon_agp,ati_agp,amd64_agp,amd_k7_ agp,ali_agp
trident 39764 4
soundcore 12000 6 snd,trident
gameport 8192 2 snd_trident,trident
ac97_codec 19840 1 trident
sis900 21124 0
crc32 8448 1 sis900
parport_pc 38176 1
parport 38848 2 lp,parport_pc
8250 34448 1 8250_pci
serial_core 22912 1 8250
eth1394 22788 0
ds 17920 4
yenta_socket 20736 0
pcmcia_core 58240 2 ds,yenta_socket
thermal 14992 0
processor 20672 1 thermal
fan 7564 0
button 9496 0
battery 12428 0
ac 8076 0
rtc 15432 0
ohci1394 33792 0
ieee1394 305296 3 raw1394,eth1394,ohci1394
usb_storage 66816 1
ohci_hcd 20864 0
uhci_hcd 31112 0
usbcore 94420 6 ehci_hcd,usb_storage,ohci_hcd,uhci_hcd
ide_cd 40576 0
ide_scsi 17540 1
ext3 108648 1
jbd 67488 1 ext3


which one is it?

kuser123
08-15-2004, 02:37 PM
You will get a list of network driver modules with (as root):
modprobe -l | grep "drivers/net"
In your system the sis900 module is the network driver.

sharlila
08-16-2004, 10:55 AM
thanks, :-) I don't know how I missed that, cause I did remember something
like 'sis900', I probably need to increase the font size.
But anyways, I've checked the '/etc/modules' file and 'sis900'
appears there so that is not the problem :-(

kuser123
08-17-2004, 11:33 AM
Hmmm... sorry, I don't really know what else it could be. Maybe your harddrive or your filesystem is defect?? Try to make a file system check. You have to boot with the CD to be able to check your root file system.

sharlila
08-21-2004, 10:11 AM
well, it just seems unlikely to be true, since it happens only
in these programs (kde apps) and not others.

CrashedAgain
08-21-2004, 02:56 PM
Your interfaces file looks good. But it is enough to have one "auto..." line. So you can simplify the file:
"auto lo eth0 eth1" The second "auto..." can be then deleted. But this is only for cosmetic...
I don't know much about WinModems but it can be that eth0 is a WinModem.
If eth1 is still not working by default on startup you may have the problem that your network card driver is not loaded on startup. So add the name of the needed driver module to /etc/modules

Not going to be much help but /dev/eth0 is not your winmodem. My winmodem is not detected until I install a driver (I use ltmodem...but you can't just use the .deb pkg, post if you want a howto) then it is /dev/modem which is a link to /dev/ttyLT0.

Try going to /usr/bin & starting the executeable file directly, see if it starts any faster. Might give an indication where the problem is.