LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-19-2005, 04:19 PM   #1
KWTm
Member
 
Registered: Jan 2004
Distribution: Kubuntu 14.04 (Dell Linux-preinstalled laptop + 2 other laptops)
Posts: 117

Rep: Reputation: 21
KDE slow: takes 20 seconds to launch programs


Hello! Can someone tell me why it takes so long for KDE to start a program?

I've looked at some posts on LinuxQuestions.org that seem to deal with this, but I don't think they apply to me. They suggest a lack of memory (I have 600+MB --that *better* be enough!) or incorrect drivers for NVidia/ATI cards, neither of which I have.

When I click on the KWrite icon, for example, it takes about 20 seconds of staring at the "waiting" cursor before the window of the newly launched program comes up. This applies to any program, big or small (including small programs like KWrite or Konsole which should come up almost instantly).

It makes me think that this is something KDE is doing to check every program before it runs, or perhaps it keeps encountering some error and eventually times out and then figures out how to load the program some other way.

Is there some way I can figure out what it's doing as I wait for the program to start? I've tried starting KDE programs from the command line, but there is no error message or output.

I don't know if the following info helps: When I connect (ssh) from another computer and run programs on the command line, there *is* output ... something about not finding the display or something, and then "building ksyscoca" and eventually I am able to run KDE programs on the remote computer, displaying on the X display on my local computer. But I think this is just something that happens anyway whenever I use ssh with X-forwarding.

Can anyone help me? Is there some way I can at least "peek" into the inner workings of what's going on? Is there some config file I should be setting? Some command to tell me what's hogging all the resources in the 20 seconds after program launch? Any help would be appreciated.

I use Mandrake 10.0/official on my Microtel Athlon 1GHz computer with 614MB RAM (1GB swap) and 80GB drive, the Wal-Mart one that came pre-loaded with Lindows, now called Linspire.
 
Old 02-20-2005, 06:38 AM   #2
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Rep: Reputation: 32
A common cause of this problem is the /etc/hosts file
make sure it contains the line

Code:
127.0.0.1   localhost
 
Old 02-20-2005, 06:40 AM   #3
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
how many services are running that don't need to be. Almost every distro I've tried has at least 6-10 services that I don't use. CUPs would be one, but check out others and see what you can disable on startup.

KDE is probably that slow for me, I'm on a AMD 3000+ w/ 1GB of ram, I'm slowly migrating myself to Gnome.
 
Old 02-20-2005, 06:58 AM   #4
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
No. KDE is quite snappy for me on a machine with 512 MB RAM, Athlon XP 2600+ processor running on 1.7 GHz.

Mostly this is not a KDE problem, but a problem more technical related to hard disk access, cache and so on.
 
Old 02-20-2005, 06:46 PM   #5
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
If its disk access, play with hdparm -tT /dev/hda and try various setting to get the timing a little better
 
Old 02-20-2005, 11:09 PM   #6
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
it is possible that the .kde directory goes with an older version you used to have or something and its hashing over config files it doesn't understand.

try deleting ~/.kde and then when you startup you will get the config wiz and various apps will all rewrite their configs and possibly all will work better
(try turning off that wait cursor and launch feedback as well that stuff is wastefull and stupid)
 
Old 02-20-2005, 11:30 PM   #7
Glock Shooter
Member
 
Registered: Jan 2002
Location: Riverside, CA
Distribution: Slackware Convert!!
Posts: 210

Rep: Reputation: 30
Start it from a terminal and see if you get any errors when it is starting.
 
Old 03-04-2005, 09:54 AM   #8
ssandlin
LQ Newbie
 
Registered: Feb 2005
Location: Richmond, VA
Distribution: slackware, Fedora
Posts: 25

Rep: Reputation: 15
Quote:
Originally posted by musicman_ace
If its disk access, play with hdparm -tT /dev/hda and try various setting to get the timing a little better
I asked this question in another forum...but I'll try here too to see if there are any other suggestions.

Original Post Link:
http://www.linuxquestions.org/questi...70#post1506770

I've tried a few suggested changes to my 2.6.10 kernel config, but no luck. Do hdparm changes affect both kernel boots? If so, shouldn't my settings be correct in 2.6.10 if I get good access times in 2.4.29 kernel? Which -X setting should I use if my motherboard's IDE is UDMA 33/66/100 using a 100 cable? If drive settings are consistant no matter which kernel is booted, then that would narrow the problem down to a kernel config error right?

My config and dmesg are in the thread.
Any other ideas?

Shaun
 
Old 03-04-2005, 12:03 PM   #9
Ace07
Member
 
Registered: Feb 2005
Distribution: Fedora Core 3 (2.6.10_1.741)
Posts: 72

Rep: Reputation: 15
Quote:
Originally posted by musicman_ace
KDE is probably that slow for me, I'm on a AMD 3000+ w/ 1GB of ram, I'm slowly migrating myself to Gnome.
Ive never had much luck with KDE myself. What can I say, I am a Gnome fanboi.
 
Old 03-04-2005, 12:11 PM   #10
ssandlin
LQ Newbie
 
Registered: Feb 2005
Location: Richmond, VA
Distribution: slackware, Fedora
Posts: 25

Rep: Reputation: 15
I'm getting this slow drive access problem without the glorious help from any X windows running...

btw I just recently made a switch to Fluxbox...sooo nice!
 
Old 03-04-2005, 12:23 PM   #11
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
I don't know why all you are complaining about KDE performance. My box runs fine and it's a lowly Pentium III clocked at only 975Mhz, and kwin is just zippy. If you're on a faster box and it's bogged down, trim back what you're running in the background; edit the runlevel and turn off what you don't need. Also, if you're running Xorg and turned on composite and are running transparent windows, either pick the right video card so you can get hardware acceleration, or forgo some of the eye candy.
 
Old 03-04-2005, 12:35 PM   #12
ssandlin
LQ Newbie
 
Registered: Feb 2005
Location: Richmond, VA
Distribution: slackware, Fedora
Posts: 25

Rep: Reputation: 15
I have absolutely no problems with KDE. I figure to each his own. It ran just fine for me when I wasn't having drive access slowness.

Anyone have a pointer or 2 about solving my slow hard drive problems?

output from hdparm -tT /dev/hda

2.4.29 (base kernel installed w/ Slack)

cached - 504MB in 2sec = 252.00 MB/sec
buffered - 72MB in 3.01sec = 23.92 MB/sec

2.6.10 (self config from kernel.org)

cached - 56MB in 2.02sec = 27.66 MB/sec
buffered - 30MB in 3.15sec = 9.54 MB/sec

That's a HUGE gap in performance between the two! I'm sure I did something wrong, but don't know enough to see what it is!

you can see output from dmesg and config 2.6.10 at this thread:

http://www.linuxquestions.org/questi...70#post1506770

Thanks
Shaun
 
Old 03-04-2005, 12:42 PM   #13
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Ive always had a slow response in any Full Desktop manager.





Gnome seams a little faster then kde but takes a little getting used to if your going from windows.


i used kde on my server that has a 300mhz with 256mb ram for a long time but eventually swiched to fluxbox because of performance.


I know i bash on kde and gnome way too much on this forem but I just dont see why there so slow even explorer on windows xp is faster on 64mb of ram then kde if kde or gnome will even run. albeit windows explorer slows when lots of other crap is loaded like spyware and other junk.
 
Old 03-05-2005, 10:50 AM   #14
KWTm
Member
 
Registered: Jan 2004
Distribution: Kubuntu 14.04 (Dell Linux-preinstalled laptop + 2 other laptops)
Posts: 117

Original Poster
Rep: Reputation: 21
KDE slow because of services? How disappointing!

Thank you for all of your replies. The most useful reply to me was from foo_bar_foo, who suggested that it could be a problem with rehashing config files with unrecognized parameters. This is truly a waste of resources, and might explain one main frustration I have with Windows and my Linux and just desktop systems in general: when you first use them, they seem to work well, and then as time goes on, they get more and more bogged down for no particular reason ... and you wonder, hey, if the computer is a digital, predictable system, why on earth would it start working differently as time goes on?? If this is indeed what is going on, then, contrary to popular myth, Linux (or at least Mandrake Linux) *would* benefit from a clean re-install every so often, taking away its advantage over Windows. Bleah.

Another thing I'm peeved about: when a KDE program opens a file dialogue (as in "Save As... [filename]"), it gives a window showing the current directory. It lists all the files in the current directory. And then [gasp!] it puts an icon next to each file that varies depending on whether it's a text file, graphic image, etc. Well, now, unlike Windows, KDE doesn't determine the file type based on the extension --no sir, you can't fool KDE into mistaking that trojan spyware is a text file just because it ends in ".txt"; KDE's going to ANALYZE THE FILE CONTENTS to see what file type it is. Unfortunately, I have hundreds of files in my directories, and it takes a few seconds just to bring up the file list. All this just to save a file. (Please don't suggest that I organize files into subdirectories --I already do, and it just so happens that several directories have hundreds of files.)

Cadj, I wasn't aware that "/etc/hosts" had to contain "127.0.0.1 localhost". What happens if it doesn't? As it happens, mine contains the actual names of the machines in my home network, and it names itself (eg. "192.168.0.101 yuma", where yuma is the name of the machine I'm running on). I guess it aids in looking up itself. I'll try that; thanks.

As for other suggestions, I guess I do find them disappointing, although this is by no means the fault of the posters. Turning off unneeded services? Switching to a different Desktop Environment? I thought Linux was more efficient than this. I'm running on a 1GHz machine, and you'd think this would be more responsive than Windows 3.1 running on a 400MHz Pentium1 or something. What in bloody blazes is Mandrake Linux doing with all my computing power? Yes, I do run some non-desktop services, like the "sshd" demon and CUPS (my other computers do need to print), but I consider these *needed* services, and I'm not running an Apache server or anything (although I had been planning to). The thing is, I'm not sure things are much faster on my 1.2GHz machine, and technically they should be 20% faster.

I do think that hard drive access might be a factor, but the applications shouldn't be that hard-drive intensive; I check my swap memory, and it's hardly being used. And it's not thrashing (inefficiently using swap memory due to swap memory full), since I have a 1GB swap partition.

Someone said "run it on command line and see if there are any errors", but I had already said in my original posting that "I've tried starting KDE programs from the command line, but there is no error message or output."

Some posters have said that KDE runs fine on their slower machines. One thing that could be useful is having people post actual times for starting programs, having file windows pop up, etc. It could be just perception of speed. or that I happen to be an impatient guy. Let me do some timings and post them, too.
 
Old 03-05-2005, 11:16 AM   #15
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Re: KDE slow because of services? How disappointing!

Quote:
Originally posted by KWTm
As for other suggestions, I guess I do find them disappointing, although this is by no means the fault of the posters. Turning off unneeded services? Switching to a different Desktop Environment? I thought Linux was more efficient than this. I'm running on a 1GHz machine, and you'd think this would be more responsive than Windows 3.1 running on a 400MHz Pentium1 or something.
Ah but then you're falling into the trap of comparing apples to oranges.

If you installed EVERYTHING, then here is a sampling of what you probably have turned on by default in runlevel 5 (the list is MUCH longer but here are some examples):

DHCP server
BIND (dns)
Apache (httpd)
MySQL
Webmin
MySQL
Postgresql
Postfix (or sendmail)

. . . all of which are generally unnecessary on a home machine, unless you're developing web and network apps, or serving up web content.

Some may call it bloat, but Linux gives you the choice to install everything, install nothing, or anything in between those two extremes. If you installed apps and daemons more appropriate for an enterprise server or for a development workstation, don't bother wondering why it's slow - each daemon you load is going to take at least some RAM,

Also, are you running applets in your dock? Do you have applications minimized to your "system tray?" Again, those apps take up precious RAM (even when you have a gig it does matter), and they all take some additional CPU time even when idle because the kernel has to manage each application's handles in its memory space, and although an application may be sitting there taking 0% CPU time in and of itself, it will take the kernel ever-so-slightly longer to process each thread's message.

So, my telling you to edit your runlevel and analyze what you are running is perfectly valid. Out of the box a Linux environment may be running scores of processes, while the desktop version of Windows runs almost nothing out of the box --- so your comparison is apples to oranges and is not fair nor is it objective.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting Reiser4 partition takes about 5 seconds DX2 Linux - General 4 05-03-2005 06:55 PM
NFS mount takes 6 seconds drspiffy Linux - Networking 5 03-16-2005 09:34 PM
KDE 3.1 suddenly slow (boot and opening programs) nameLock Linux - Newbie 4 01-14-2004 11:45 PM
programs &KDE loading slow in 9.2 erik Mandriva 5 12-01-2003 04:42 AM
Mandrake 9.1/KDE launching programs slow ShakyJake Linux - General 11 08-02-2003 05:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration