This forum has been archived. All content is frozen. Please use KDE Discuss instead.
The Discussions and Opinions forum is a place for open discussion regarding everything related to KDE, within the boundaries of KDE Code of Conduct. If you have a question or need a solution for a KDE problem, please post in the apppropriate forum instead.

Profiling KDE startup [solved, new questions...]

Tags: None
(comma "," separated)
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
On an Asus Eee 1005HAB netbook...

Full KDE desktop start time: ~15 seconds, from the splash screen appearing to the desktop becoming responsive enough for use.

Openbox + KDE services (via kdeinit) start time: ~1 second.

That's a pretty large difference, and I've no idea what's taking up most of that. Is there any way I can profile the KDE start process and see what's taking the most time?
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Well it turns out the answer is that bootchartd can handle this. Yay.

So I created a "boot chart"... More like a login chart really. Among other things, it shows plasma-desktop taking a long time to start, and doing a lot of CPU and hard drive work.

Image

KDM (as kdmgreet) also takes some time to start up, and interestingly so does nepomukserver, even though I've disabled Nepomuk's functionality.

I'm most interested in Plasma though. What's it doing that's so intensive?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Plasma should not be too chatty... which applets do you have added?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Only the default ones in the toolbar...

- Launcher (old style, I dislike the Kickoff menu)
- Virtual desktop pager
- Taskbar
- Notification area (with wicd, power manager, KOrganizer, and disk management loaded)
- Clock/calendar

And that's it.

I'll throw in, BTW, that my laptop takes a similarly long time to start KDE. As did the workstation I used at my last job, which had a relatively powerful nVidia graphics card.
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Well, based on a post on the Arch forums I tried moving my plasmoids from the panel to the desktop... That shaved off maybe a few seconds, and at the price of making the desktop much less functional (because windows expand over desktop plasmoids). Getting from KDM to the desktop still takes a while compared to Gnome, let alone Xfce.
Dania321
Registered Member
Posts
4
Karma
0
My experience: plasma-desktop taking a very, very long time to start, and doing a lot of CPU and hard drive work. Strange as if the code is not too clean - even puzzling.
Dania
User avatar
toad
Global Moderator
Posts
1258
Karma
7
OS
@ Dania

Your problem is down to incorrect settings and/or the wrong display driver. I suggest you open your own thread asking for advice and give as much info as possible (card/driver/desktop effects?/rendering engine).


Debian testing
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Moving applets from the panel to the desktop should not have been able to have that much of an impact. This indicates that Plasma possibly has some severe layouting optimisations that could be carried out to improve performance.

You may wish to discuss this on the plasma-devel@kde.org mailing list. I would recommend providing actual numbers or bootchart graphs however.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
I think you misread my post - it didn't have much impact, only a couple seconds. Start time was still in roughly the same ballpark.
User avatar
toad
Global Moderator
Posts
1258
Karma
7
OS
gj, try e4rat.

https://wiki.archlinux.org/index.php/E4rat

It takes fifty percent off your boot time - especially looking at your boot chart and if you boot straight into KDE.


Debian testing
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
toad: thanks for the advice; but I really think that a low-level hack specific to one filesystem is not a viable long-term solution to KDE's start time issues.
madgnu
Registered Member
Posts
1
Karma
0
OS
Hi all!

I've tested plasma-desktop startup with strace: https://bugs.kde.org/show_bug.cgi?id=281945

Seems to be dbus-related issue...
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Wow, that's nice. How'd nobody notice that?

And in the mean time, are there any possible workarounds? Maybe one could start the dbus-x11 session after KDE startup had finished?
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
... Anyone?

Can I reduce Dbus's wait time? Do some kind of caching? Disable whatever slows things down? This long delay whenever I restart KDE is rather annoying...

Edit: gah, turns out the slow startup had nothing to do with Dbus. Please forgive my rudeness earlier... :<
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Okay, I took another boot chart and gave it a look... One of the things I hadn't noticed before is that the process spawning Plasma, krunner, the tray icons, and everything else is kdeinit4. And the big delay seems to occur after Plasma starts... So I think it's not Plasma that's slowing things down, but kdeinit4 delaying for some reason after starting Plasma.

Also, I noticed that modifying the startkde4 script to add --no-kded to kdeinit4's invocation shaves off a few seconds of start time. Not much, but it's something at least.

Anyway here is the new bootchart:

Image


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]