You are not logged in.

#1 2013-01-23 17:42:43

Registered: 2012-12-24
Posts: 32

Disabling unused Kernel modules / Boottime performance

Hi Folks.
I recently bought an ssd to speed up my Dell Vostro 3350 subnotebook. I used Ubuntu before, but since I wasn't very happy with it in the last year, i decided to change to arch. So now i've just done a fresh arch installation with gnome3 on it, and i'm trying to optimize System performance. I already put /tmp into a ramdisk, and the firefox profile into ram, and the system is quite fast now. The only thing still getting on my nerves is boottime now. I feel like i have almost no performance gain here in contrast to the system running on a hard disk. I read through a few articles here in the wiki and on other websites, and they all recommend disabling those kernel modules that i don't need. How do I find out which kernel modules i don't need, and how do I disable them? Is there some kind of detailed tutorial for that? The wiki article was just about half a page and didn't satisfy me because i fear i might break something. Also, is there a way to control how much time the single steps take? I already changed the kernel boot parameter from quiet to verbose, and it's all quite fast, it just hangs a few seconds after

[Loading Gnome Display Manager]
[Bluetooth target "something"]
...3-5 sec wait...

After that the GDM login page shows up and everything is fast again.
Any help would be appreciated smile



#2 2013-01-23 18:17:06

flipper T
Registered: 2012-09-14
Posts: 419

Re: Disabling unused Kernel modules / Boottime performance

output of

systemd-analyse blame

would be helpful

If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf


#3 2013-01-23 18:40:40

Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Disabling unused Kernel modules / Boottime performance

Gasp0de wrote:

they all recommend disabling those kernel modules that i don't need.

Not sure where you're getting this advice, but I suggest you take a minute while we apply some logic.

Kernel modules that you don't need will never be loaded, and are therefore already disabled. The only thing they "do" is take up small amounts of disk space, and hopefully you agree that their unloaded presence cannot possibly impact on your system's performance.

Just guessing here, but I suspect that the various articles you have read were extolling the virtues of recompiling your kernel with a configuration optimised for your particular hardware. People who choose to do this will usually omit modules and drivers that they don't need, but you can be assured that these omissions do not result in any benefit apart from freed-up disk space and faster kernel compilation times.

Last edited by tomk (2013-01-23 18:40:56)


#4 2013-01-23 18:54:12

Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 15,158

Re: Disabling unused Kernel modules / Boottime performance

Agreed with the above post.  I tinkered with compiling my own optimized kernel and it was quite a learning experience, but it provided no change whatsoever in boot up speed.  I do think a little streamlining of initramfs in contrast (by modifying mkinitcpio.conf) did have small but notable benefits -- and this is far easier to implement than recompiling the kernel.  The details of this can be found in a good blog post by falconindy which I'll let you google for as I don't have the link handy.

I don't think either of these (kernel compiling or initramfs optimizing) are what you are currently after though, and flipper's suggestion will be the best step to track down the several second lag you wish to get rid of.

• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.


#5 2013-01-23 19:10:02

From: Wirral, UK
Registered: 2009-06-21
Posts: 550

Re: Disabling unused Kernel modules / Boottime performance

I spend 5 minutes compiling my kernels to save about 2 seconds of boot time!  I keep on trying to get my 150 boots in as to actually benefit from it before the kernel is updated but I've not managed it yet hmm

As to what I actually do, I just rebuild the stock arch kernel but I compile in UK keymap so I can save time with vconsole service, I change processor type from generic and compile in ext4/reiserfs  modules so I don't need them in my boot image.  If I didn't have a processor capable of rebuilding and packaging the kernel in 5 minutes I wouldn't bother, I've usually pulled it in from SVN, built it and rebooted before pacman get's a chance to pull it in.

Last edited by Meyithi (2013-01-23 19:18:13)

The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system


#6 2013-01-23 20:21:57

Registered: 2012-12-24
Posts: 32

Re: Disabling unused Kernel modules / Boottime performance

Thank you all for replying.
You were right, i mixed that up, what i read about was compiling your own kernel, which is not something i want to do at the moment. I read some pages about systemd-analyze, and ran the "systemd-analyze blame" command. Here's what came out of it:

[lasse@Gasp0de ~]$ systemd-analyze
Startup finished in 1954ms (kernel) + 90088ms (userspace) = 92043ms
[lasse@Gasp0de ~]$ systemd-analyze blame
   220ms NetworkManager.service
   206ms systemd-udev-trigger.service
   149ms systemd-remount-fs.service
   136ms dev-mqueue.mount
   134ms dev-hugepages.mount
   123ms sys-kernel-debug.mount
   123ms systemd-vconsole-setup.service
    99ms systemd-sysctl.service
    91ms systemd-logind.service
    90ms systemd-udevd.service
    45ms udisks2.service
    40ms polkit.service
    29ms systemd-user-sessions.service
    29ms gdm.service
    21ms accounts-daemon.service
    19ms systemd-tmpfiles-setup.service
    16ms colord.service
    13ms upower.service
    13ms wpa_supplicant.service
    12ms tmp.mount
    11ms rtkit-daemon.service
     8ms home.mount
     8ms ntpd.service
     1ms sys-fs-fuse-connections.mount

Thank you for your patience with an arch linux beginner smile

EDIT: I recognised that none of that said anything about the actual boottime, so i measured it on my own: The system takes approximately 13 seconds from hitting Enter on the grub menu to the gdm login screen...

Last edited by Gasp0de (2013-01-23 20:46:04)


#7 2013-01-25 09:18:16

Registered: 2008-06-22
Posts: 794

Re: Disabling unused Kernel modules / Boottime performance

Try disabling gdm.service and NetworkManager.service to see how fast it is without them. Just to see. You can re-enable them again after testing.

systemctl disable NetworkManager.service
systemctl disable gdm.service
# Now reboot the computer and have your stop watch ready ;)
systemctl reboot
systemctl enable NetworkManager.service
systemctl enable gdm.service
# Now reboot the computer and have your stop watch ready ;)
systemctl reboot

Last edited by hunterthomson (2013-01-25 09:20:56)

OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec


#8 2013-01-25 10:02:17

Registered: 2012-12-24
Posts: 32

Re: Disabling unused Kernel modules / Boottime performance

That was about 3-4 seconds difference. However, i don't want to boot without gdm and networking, so I guess I'll have to do with 13 seconds. It's not as if it's slow smile



Board footer

Powered by FluxBB