Skip navigation.
KDE Developer's Journals

Slow booting? Not so slow anymore...

amantia's picture

I did some performace tuning today on my laptop, so i can make Kubuntu start up faster. It was mostly about disabling startup services I don't need and optimizing KDE startup performace according to the performace tips from wiki.kde.org. I did not tried to use the patched fontconfig or do something like that. I just have the standard kubuntu debs installed. The system was prelinked, but it was before I even started to optimize it, so it is not really relevant.

I will not go into the details, but here are some figures. The laptop is a PIII-500Mhz (actually this is written on the box, but every application, including the POST screen says it's a 550Mhz one), 192MB SDRAM 100Mhz (261MB/s), 6GB disk, Trident video adapter, 15" monitor, working in 16bit colors. hdparm -t /dev/hda shows 13.22 MB/s. Not too much...

  • Before optimizing: around 3 minutes (2:58 or something like that, I did not write down)
  • After optimizing: 2:01, from which 1:21 until KDM was usable. The rest is me typing the password until KDE become functional (kicker and its applets appeared, K Menu was usable).

As you can see I meassured together the startup of the Linux system and the login inside KDE, as after all I'm interested about the time I have to wait until I can use the desktop.

The speedup is impressive, I would say: ~33%. I don't know if the 40s KDE login can be reduced further or not, but it might be that I did not applied everything.

For what it matters I meassured the startup of my desktop system, which is way faster: AMD64 3200+ (slightly overcloked to around 3500+), 1GB dual-channel DDR 400Mhz (1957MB/s), 40GB disk (39.23MB/s), Nvidia Geforce FX5500 and X working in 24bits. Here I meassured a Windows XP and a SuSE 10.0 startup with SuSE's KDM, but my self-compiled KDE with debug info enabled:

  • Windows XP: 39s (I had to type the password here as well)
  • SuSE: 47s until KDM, 1:31 in total.

The surprise for me is that from KDM to my KDE session it took 44 seconds. What I can think of is that

  • I have a non-optimized debug build: bigger files, slower reading from disk, non-optimized code
  • I have more fonts
  • The session restoration is activated and it might have started to do the restoration before kicker and the applets were loaded.
  • I did not do anything described in the performace tips Eye-wink

From this the 47s is hard to reduce as I already have disabled all the startup services I don't need. Still SuSE does some things I cannot disable without rebuilding a kernel, like detecting RAID arrays.

UPDATE: I tried with another user, where the standard SuSE KDE 3.5 is started and there is no session restoration: KDM appeared in 50s (I think the 3s difference was due to a CD spin-up), total time was 1:10s. So logging in took 20s, which is less than half compared to what I got first time...

Conclusion? My conclusion is that if you are bothered with long startup times, there IS room to improve the situation. I will try at my father's PC as well. Your conclusion can be something else...

Links:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vmuppalla's picture

Try the SLICK version of Suse 10.0

It cut down my KDE start up time by 1/2 over standard SUSE.

On an older AMD based system ( older than yours), I get mandrake 2006 to boot in 20-25 secs and KDE starts up in 8 sec the first time after boot.

You need a hard driver with 8MB cache, 7200 RPM at least. On your system, ultrascsi might be really fast.

ltmon's picture

initng

Have you tried using initng (http://initng.thinktux.net/) to startup rather than the normal SysV init scripts?

The Kubuntu packages are at http://alioth.debian.org/projects/pkg-initng/.

It's really easy to install (a single deb install, then adding "boot=/sbin/initng" at the end of your grub entry).

You then need to use the ng-update command to list all your available services and choose which ones will be in the default runlevel. The debian packages come with sane defaults for this. I only had to add the bluetooth service to mine.

Once done you will probably see about a ~50% decrease in boot time from grub to X starting up.

There's a good thread in ubuntuforums.org with more details.

L.

amantia's picture

Not good

I tested it as I read about it also before (and I also read that it has some problems). The first try was not good: on startup I got a kernel panic. Second try was better, but the results were disappointing: 30 seconds more compared to the sysv init. I did not do anything else but installing, using ng-update to enable/disable what I want and to fix some scripts, like the kdm staring script (wanted to run from /usr/sbin and kubuntu has in /usr/bin) or the privoxy script. The large delay was just after saying "your system is booting" or whatever and printing out the 1% for the first started process.

So I'm back now to sysv init, but I reduced ~10 seconds more by recreating the initrd with just what I need. Kubuntu has an insanely large initrd by default which took a lot to load on my father's system. Now it loads only reiserfs plus whatever it wants by default instead of the whole netboot and acpi stuff.

I may play more with initrd and maybe initng as well on my laptop, just to see what I can do. Strangely since I optimized the init process hibernate does not work. Sad (no, on the laptop acpi is not disabled).

ltmon's picture

Strange that...

I had no problem at all... and the promised speed up was there (and more).

I guess that's why it's still beta software anyway.

L.

amantia's picture

CPU dependent

Can it be that initng requires a faster CPU to start and work? So it helps with faster systems, but does not help that much with slow ones.
That might explain the delay I saw at the startup.

dec0ding's picture

two things to have in mind

1. Windows starts faster because it doesn't do hardware check at boot time. Instead, listens all the time for new hardware which makes the system more busy and more RAM needed. So if we take the time of booting and we add the process of finding/adding new hardware we get longer processing time from XP than from *nix.

2. Using Hotplug as I do on Slackware could mean that Hotplug puts the device nodes everytime the system starts. Some network interfaces are not recognized without starting Hotplug's daemons...

And as we can all agree, we all want 2 times faster and more stable system and 2 times faster and stable booting, don't we? Eye-wink

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.