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
Yeah, I did 'chmod -x /usr/bin/ksplash*'.

At any rate, nothing seems to be making a significant impact on startup time. I'd try prelink, but the version on slackbuilds.org is broken for Slackware's version of glibc, and will wreck every binary on the system.

(Tried preload BTW, it doesn't help. In fact, I don't think it does anything at all, period.)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Does bootchart show which component is using up the most resources?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
plasma-desktop seems to be using the most time and resources (about 10 seconds to start, and lots of CPU and disk I/O). About as much I/O and CPU (and a bit less time) are used cumulatively by kdeinit4, kded4, and kwin. korgac and kmix are kind of resource intensive on start, but then so is wicd; I don't think those make much of a difference. And krunner uses a surprising amount of I/O and CPU, but not much all told.

The big issue seems to be Plasma taking forever to start. The funny thing is, if you start Plasma from a terminal in a standalone window manager session (e.g. Openbox), it only takes a couple secnds. So I really don't understand the huge delay.
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
I finally got things set up so that startup time is decent. I think.

I reinstalled and did three things:

- Switched to a partition layout with /var on a separate ext2 partition. Kind of dumb (file corruption on /var would mess up the package manager) but ext2 is very fast.
- Turned off noatime on the root partition in favor of the default options (i.e. relatime). If that made a difference for the worse, I haven't noticed it.
- Switched to the SimpleSmall splash screen.

Not sure which had the most impact, but time for KDE to restart is now down to a more bearable 12 seconds.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It would be interesting to profile the startup process carried out by Plasma Desktop.
I do notice that Plasma usually does spit out quite a bit of debugging information, so this could be one possible source of delays.

Another could be caused by interactions with kactivitymanagerd and the lack of Nepomuk not yet being operational. This should show in D-Bus activity.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
Redirecting plasma's debug output to /dev/null doesn't do anything. Neither does turning off the Activity Manager daemon.

However, turning off *all* KDE services (that are possible to turn off) speeds things up a little bit more, at the cost of disabling nice stuff like power management.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Hm, another possible suspect is the creation of Plasma's SVG and Wallpaper caches - which in theory should survive between sessions but could possibly be being discarded. They will be located under /var/tmp/kdecache-$USER/ as usual.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
I don't think they're being discarded, since deleting them slows down KDE startup time significantly.

(I do suspect that using a separate ext2 /var partition has something to do with the speedup though; that should make reads and writes on /var faster, and KDE does seem to do a lot of stuff in /var.)
jackphil
Registered Member
Posts
9
Karma
0
OS
I have the same problem, and have any progress now?
Gullible Jones
Registered Member
Posts
121
Karma
0
OS
In a word... No.

The best you can do is switch from the default splash screen to the Simple one. On my Aspire 3680 laptop this cuts the start time by about 10 seconds. But KDM still takes a while to start, and things are pretty slow once running.

Frankly my advice is to ditch KDE as a desktop environment, and instead use it as a suite of applications (with a standalone window manager and kdeinit4). The only real problem is power management, which isn't hard but requires some ugly hacks to implement.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
If you run "qdbus org.kde.kded /kded loadModule powerdevil" then KDE Power Management should load up outside of a KDE session.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
jackphil
Registered Member
Posts
9
Karma
0
OS
in my case, i found a solution: goto System Settings-->Startup and Shutdown-->Service Manager, uncheck all the services. at last, reboot, the KDE startup will be speedup significantly
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Very interesting... Can you please try experimenting will enabling/disabling certain modules to see if it is a particular module causing the dramatic slowdown in startup?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
jackphil
Registered Member
Posts
9
Karma
0
OS
it's removable device automounter and power management

To be honest, I noticed the first booting everyday is longer than the rebooting by testing carefully. So unchecking services seems just speedup the loading of last splash icons (K icon), may be it faster a little, 2-3 seconds, but not so much. The major diference is between first booting and rebooting.

Then I noticed some service will be running even I uncheck it, such as time zone, clippboard, networkmanager. I think deleting these components on panel will b ehelp. But I don't like it
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The Time Zone daemon looks after a cache of time zone data, which is used by multiple KDE applications (one prominent location it is used is on the Time Zones tab of Plasma's Digital Clock settings).

Network Management is likely loaded automatically by the Network Management applet. Without this service loaded you will not have access to your local networks (as NetworkManager will not have any settings to use). This is especially the case if you are using a wireless connection.

Interestingly - both Power Management and Device Automounter have one thing in common - they use Solid, which in turn uses D-Bus extensively to communicate with UDisks/UPower.

I would recommend sending an email about this performance issue in those two modules to kde-hardware-devel@kde.org so the Solid developers can investigate this.


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


Bookmarks



Who is online

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