You are not logged in.

#1 2007-09-19 01:16:10

dspahn
Member
Registered: 2007-09-17
Posts: 10

How to save time booting a slow laptop?

I have a Toshiba Portege 3490CT, 700MHz, 128MB RAM, which is running Arch with xfce4. cpufreq does not work with this model, so I have the processor set to high speed full time. I want to save time during boot by paring down the operating system. I would like to save minutes of boot time, and I would guess the best way would be to modify udev to either use cached information or set up hardware profiles for the following:

Just the laptop
Laptop + Dock
Laptop + Dock + PCMCIA CDROM
Laptop + PCMCIA CDROM

Is there a way to save states or set static configurations? I started Linux just after my distro (At the time) started using udev, so I never had to learn how to set static device configs.

The two longest boot delays occur when the kernel/initrd runs udev, and when the udev daemon script runs.

There are probably other ways to save boot time, in addition. I would guess recompiling the kernel for my hardware would help, but I didn't find a link to how to compile the kernel in Arch.

So here are my questions:
How do I cut out udev's automatic stuff since my hardware doesn't change that much
and how do I compile an Arch kernel?

Please let me know if I am barking up the wrong tree.
Thanks!

Offline

#2 2007-09-19 03:10:00

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: How to save time booting a slow laptop?

While I don't fault you for wanting to shave time (who doesn't!) I would say that simply upgrading your memory to 256MB would make a pretty big difference in overall system performance, especially if you're running Xfce.  We're talking less than $40 at most PC shops.

Aside from that, I usually just disable seldom-used hardware by commenting the modules/daemons arrays in /etc/rc.conf.  For example, I rarely use bluetooth so it remains commented out 99% of the time.

I recommend having a read through the Arch Wiki which will, among many things, answer your question about kernel compilation.


thayer williams ~ cinderwick.ca

Offline

#3 2007-09-19 13:59:26

dspahn
Member
Registered: 2007-09-17
Posts: 10

Re: How to save time booting a slow laptop?

Thanks for the info!
Unfortunately, the memory for this computer runs up over $100 for a 128MB chip because it uses some sort of proprietary connection, so an upgrade is out of my price range at the moment. The big slowdown is waiting for udev at the very start of boot. The computer sits there for three minutes running udev. Without udev, boot would take less than 2 minutes. XFCE works fast enough for my purposes.

I have been working through the wiki, and I have decided to see if I can get the computer to boot without the udev hook before attempting to compile my own kernel. I am now stuck on something new: for modules, I am loading:
ext3 ext2 reiserfs pata_pcmcia ata_generic ata_piix ide_disk

the hooks I am running are:
base resume pata scsi sata pcmcia ide filesystems

I am using the kernel26suspend2 package for my kernel. I am getting the boot error that a kernel panic occurred because it could not find /dev/sda3. I have a single IDE hard drive, partitioned into a ext3 partition (/), a swap partition, a ext2 (/boot) partition, and a reiserfs (/music) data partition. I know I'm missing something. Does anyone have any idea what it may be? I'm pretty sure the problem is in the initrd. Including the kernel option "disablehooks=udev" is an easy way to recreate the problem without waiting 20 minutes to build a new initrd, so I know I have left something out in the mkinitcpio.conf file.

Thanks!

Offline

#4 2007-09-19 15:12:00

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: How to save time booting a slow laptop?

Why do you load pata, sata, scsi and ide if you've got only one ide disk? Only loading pata should be enough (it is the newer driver which replaces the old ide). I'm not sure how to go about your error though...

Offline

#5 2007-09-19 15:21:35

dspahn
Member
Registered: 2007-09-17
Posts: 10

Re: How to save time booting a slow laptop?

I only loaded those modules/hooks because I don't know much about Arch yet. I have been trying to figure out how it all works, and I was really confused that I needed pata to load ide... I think like a traditional linuxer- PATA != SATA != IDE, but it was loading them all at startup... I'll try removing the older stuff and see if it helps. Thanks!

edit:
I am going to rebuild my initrd using these modules:
ext3 ext2 reiserfs pata_pcmcia
And these hooks:
base udev resume pata pcmcia filesystems

(I can always disable udev during boot to see if there was a conflict or something...)
I know you didn't intend this to be the solution, but I am willing to experiment every time I make a change, so that I understand everything better in the event I stumble across the solution.

Last edited by dspahn (2007-09-19 15:27:04)

Offline

#6 2007-09-19 17:52:55

dspahn
Member
Registered: 2007-09-17
Posts: 10

Re: How to save time booting a slow laptop?

I did some more forum searching and found that I could remove udev from hooks in mkinitcpio.conf if I ran mkinitcpio -M, then listed (most of) those modules in the Modules array of mkinitcpio.com. I also commented out the udev stuff in rc.sysinit... and it broke the OS! I Got a notification that the root fs failed as an ext2 (It's an ext3) and the I should repair it. I uncommented those lines that load the uevents (I think there were 2 or 3 lines in rc.sysinit) and everything mounted properly. What do I need to do in order to set everything static instead of udev? Ideally, I'd like to set up 4 static hw profiles.

Thanks!

Offline

#7 2007-09-19 17:59:07

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: How to save time booting a slow laptop?

i'm pretty sure you gain most time by compiling your own kernel and disabling ALL the stuff you dont need.
also compile in the modules you use.

I haven't done this in arch but in ubuntu (theres a post in this in forums with examples)  the timegained was 10-15 sec.

Guess this would work in arch too. and you could put timer to 1000hz and enable slubs and cfs and whatnot if they are available already  smile

Offline

#8 2007-09-19 20:36:16

dspahn
Member
Registered: 2007-09-17
Posts: 10

Re: How to save time booting a slow laptop?

What the heck is a slub? big_smile

Offline

#9 2007-09-19 21:04:56

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: How to save time booting a slow laptop?

dspahn wrote:

What the heck is a slub? big_smile

http://lwn.net/Articles/229984/

i'll see if i can find the ubuntu kernel tweak howto, just incase some1 would be willing to comment if it works in arch or not...


http://ubuntuforums.org/showthread.php?t=157560

and

http://ubuntuforums.org/showpost.php?p= … tcount=507

lots of stuff to tweak hmm

Offline

#10 2007-09-20 00:56:22

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: How to save time booting a slow laptop?

dspahn wrote:

What the heck is a slub? big_smile

SLUB is the new object memory allocator for linux, it is still being tested though and not enabled by default in stock kernels (but you can enable it at compile time). It is supposed to replace the old allocator (SLAB) pretty soon.

Offline

Board footer

Powered by FluxBB