Slow program launch. Is this normal and how to fix it?
Hello.
I have following problem: Many programs take a lot of time to launch. For example, Firefox (3.0.6) takes 15 seconds to start (first launch after boot), Opera (9.63) takes 15 seconds on first launch after boot (sequental launchs can be 3 seconds), kmail takes 3, kaffeine takes 3 seconds, k3b takes two seconds (that is until splashscreen appears) and so on. Basically it looks like everything that has something to do with gui is a bit slow to appear on screen. Another interesting things that firefox frequently takes about 4 seconds or more to close and KDE frequently complains about that ("app not responding, terminate or keep running?") and after I press close firefox freezes until it disappears and doesn't repaint itself at that time. Programs take a lot of time when they launched first time after system boot. Second/third/etc launch will be faster, but it is still a bit slow (2..3 seconds). I think this is too long, for my system, and I'd like to know if such long time is normal, and if not, how it can be improved (personally, I'd like to have instant launch or less-than second start time). I think that something is not right because although firefox is always a bit slow, other "lighter" applications (kedit, kmail, etc.) should start much faster than they do it right now. (and I remember that everything was much faster in the past - I just don't know after which change things started to slow down). My configuration: Slackware 12.2 KDE 3.5.9 2.6.27.7 kernel (custom built, based on stock slackware configuration + some tweaks (high resolution timer + optimization for cpu)) AMD 64 X2 5000+ CPU (ondemand frequency governor enabled) 2GB Ram. GeForce 8400 GS GPU with Nvidia 177.82 drivers. HDD on which system is installed (ST380215A) is formatted into ext3, and has dma enabled (works in udma5 mode, multcount 16, unmaskirq is on) Any ideas are welcome. Thanks for your time. |
Run firefox in a terminal emulator. DO you see SCIM starting?
If yes, see the end of the file "/etc/profile.d/scim.sh". |
The closing time for Firefox is becoming a pain in my rear as well. I believe this is a new feature with the 3.x series. Seamonkey and Firefox 2.x do not have this issue. Launching on my systems is no where near as slow as yours, though Firefox is a pig and does take some time to launch.
Check your hard drive speeds. As root hdparm -tT /dev/sda Where /dev/sda is your actual disk. Perhaps you have the wrong module loaded. Using an older module for SATA drives instead of libata. Or using libata for unsupported chipsets. On my slower system (AMD Sempron 3000+ PATA drives) Code:
hdparm -tT /dev/hda Code:
hdparm -tT /dev/sda Quote:
And try running the default kitchen sink huge.smp stock Slackware kernel. |
Quote:
I use only two input langauges, and they both don't need scim to work. Quote:
Quote:
Code:
/dev/hdd: Quote:
Quote:
|
Hi,
I rolled back to Firefox 2.x because of the molasses plugin for 3.x! :) Really the gains for 3.x were not enough to waste the time so I rolled back to 2.x. I'll wait a while too see what happens with Mozilla until I attempt another upgrade. FireFox 2.X meets my browser needs for now. |
Definitely a version 3 problem for firefox. I'm still running version 2 under slack, which works well; my Win XP version is 3.06 and it makes IE look like greased lightning.
But you must have something else going on, my hardware is considerable slower than yours yet I don't see those kinds of delays in, for example k3b or nvidia settings. |
Quote:
Firefox 3.0.x is slow for me too, but not really 15 seconds, more like 10 sec., while 2.0.x was much faster in the 3-5 sec range same with mozilla/seamonkey. How long does mozilla take for you ? Other apps take from less than 1 sec to 2 sec, except KDE apps, which take a while, but I removed them. Now, is anything else using the HDD ? Check the HDD usage and see if anything is constantly or repeatedly using the HDD. App loading speed depends mostly on the HDD ... read / write rates, as well as the filesystem, and when disk usage is substantial (lots of reading and writing) then the I/O scheduler becomes important. |
Firefox is hardly a good barometer. Firefox has always been slow starting because of the GTK-XUL design. I keep waiting for a QT version.
I have not liked Firefox 3.x at all, especially all the sqlite crap. I suspect part of the startup delays with Firefox is dependent upon the add-ons installed. Your start times and system are similar to mine. I have a dual core box with about the same startup times. I'm not using SCIM. I used to compare software startup times to NT4, which I still maintain on an older box. Everything on NT4 starts almost immediately. Nothing in KDE starts almost immediately. Using a different desktop or window manager is not a solution because in any other environment, all of the KDE libraries must first be loaded, which increases startup times. |
Quote:
Quote:
I'll try disabling cpu frequency governor. Quote:
Quote:
Maybe something is "wrong" with ext3 mount options and can be improved?: Code:
/dev/hdd1 / ext3 defaults 1 1 Quote:
Quote:
Quote:
Quote:
Quote:
|
Quote:
Quote:
http://packages.slackware.it/search....&t=1&q=fluxbox No reason to try flux, if BB doesn't improve anything. Quote:
dd if=/dev/zero of=1.bin bs=1M count=2048 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 29.6432 s, 72.5 MB/s For pata 2147483648 bytes (2.1 GB) copied, 39.8727 s, 53.9 MB/s I use JFS, not EXT3. Here's a link on tweaking ext3 http://www.paulgraydon.co.uk/geeky/t...t3-mountpoint/ Quote:
But I still believe something else is at play here. My AMD 3000+ with an Nvidia 6200 and newest Nvidia drivers is no where near as slow as your machine with KDE 4. My Intel 8400 (Nvidia 7600) is just about instant with KDE 3.10. Sometimes in Fluxbox I believe the system has ESP :D. What's your motherboad make and model? There are problematic chipsets and controller cards out there. Is this only an issue with Slackware? Are other distros quicker? If the other distro(s) is quicker copy your .config file over and try your kernel with that distro. |
Quote:
So run this: Code:
bash-3.1$ cat /sys/block/hdd/queue/scheduler Now try out some of them, you can do so on-the-fly, just echo the name of the scheduler into that file as root: Code:
echo cfq > /sys/block/hdd/queue/scheduler |
Quote:
Quote:
Code:
2048+0 records in Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
That dd test is not as clear a benchmark as you might think, it's not a linear relationship:
Code:
bash-3.1$ dd if=/dev/zero of=1.bin bs=256k count=20 |
Quote:
Quote:
--EDIT-- "Deadline" didn't help. Firefox launch after "cold boot" took 20 seconds, opera - 10, kmail - 7. --EDITtt-- disabling frequency governor didn't help. 18 seconds first launch in firefox, 10 seconds opera, 5 seconds kmail, 2.5 seconds nvidia-settings. Any other ideas besides using preload? |
Try "anticipatory".
|
All times are GMT -5. The time now is 08:51 AM. |