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)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The above post is empty I am afraid.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
It can't be seen because you added too much text. Please use a pastebin for console outputs, ideally http://paste.kde.org


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Ah, sorry about that. Here's the log on Pastebin.org:

http://pastebin.com/pVMmPrTr
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Well this is interesting...

I tried prelinking again, and this time did not neglect to export KDE_IS_PRELINKED=1. This brought startup time from a cold boot to 18 seconds... And startup time with KDE cached to 16 seconds.

It seems to me like maybe some process or thread is waiting an unnecessarily long time.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It seems that kbuildsycoca4 is only running once.
Do you have a bootchart by any chance which may indicate what is taking so long to start?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Here: http://imageshack.us/photo/my-images/69 ... 05231.png/

If you want I can take another one, there's a delay at the KDM login screen in this one because I got distracted.

My totally uneducated guess: it looks to me like KDE is just doing a lot of stuff on startup - maybe without enough paralellism, but probably just too much stuff for a low-end computer to be quick about.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I've taken a look at this, and there seem to be multiple points where things take a while. It is about 2.5 seconds following the execution of "startkde" before the actual preperation for a KDE session begins with the launch of kdeinit4. It takes a further 3.5 seconds to go through all startup steps it must take. Then ksmserver is launched, which begins the spawning of a full KDE session.

KSMServer seems to prioritise starting KWin - which takes 1.5 seconds. The parallel execution of Plasma and KRunner then begin. Plasma appears to use the disk/cpu for ~6 seconds to fully startup.

For the preliminary (prior to kdeinit4):
- ~1 second is lost waiting for xrdb - which prepares the X server resources.
- ~0.5 seconds is lost executing environment scripts - located either at ~/.kde/env / or system-wide locations.

For the kdeinit4 phase:
- Execution of kbuildsycoca4 / kconf_update take ~0.5 seconds.
- Miscellaneous steps by kded4 (loading of it's modules + hostname resolution) take ~1.5 seconds.
- Execution of hardware setup (kcminit) takes ~0.5 seconds.

For the KSMServer phase:
- Startup of KSMServer itself takes ~0.5 seconds.
- Launching of KWin takes ~1.5 seconds
- KNotify launch takes ~1 second, however Plasma and KRunner begin launching half way through this
- KRunner takes ~2 seconds.
- Plasma takes ~6 seconds.

Apart from the Plasma startup, the "slow" startup of KDE is due to a lack of parallelisation. Big blockers to this are:
- kded4
- kwin

The major slow point does seem to be Plasma however... this is likely due to loading of plugins (data engines, applets, containments, etc) and libraries previously not used, as well as the loading of data (such as theme elements, icons, etc).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
IOW, probably nothing I could solve. Thanks nonetheless, and apologies if I seemed excessively whiney about this at times.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You could try optimising it on your system - by uninstalling Plasma themes and applets you do not use, and disabling kded4 modules you do not have a need for (be careful here though, some may provide needed functionality critical to the desktop).


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

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