You are not logged in.

#1 2005-12-10 11:22:22

Zanton
Member
Registered: 2005-12-06
Posts: 80

Increasing bootup speed

Coming from Gentoo and the new fast Initng boot system, I wanted to tweak a little my configuration to try to reach the same time for booting (for information, with Gentoo and sysinit 41s, with initng 21s and with Arch 35s).

I can lauch dameons in a parallel way using @ in the /etc/rc.conf daemon line, and I did it. Sure it works, but I gain only 2s. The main problem imo consists in udev and the filesystem checks which here are launched one after the other and I want to make them lauch in parallel. I don't know how to do it in fact, because they are not daemons listed in /etc/rc.conf, but they are in /etc/rc.sysinit. So is there a way to tell Arch and the init system to lauch them in a parallel way ?

Offline

#2 2005-12-10 11:50:12

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: Increasing bootup speed

You can edit rc.sysinit to your own liking. Search the forums, you can use Initng in Arch Linux too, you could compile the modules you need into your kernel and then turn off all hardware detection.

Offline

#3 2005-12-10 12:10:02

Zanton
Member
Registered: 2005-12-06
Posts: 80

Re: Increasing bootup speed

I read this post and it seems that initng doesn't increase significantly the bootup speed. I already compiled almost all my modules in kernel and make some new tweaks in /etc/rc.conf and now I boot in 31s including gdm which was not true with initng boot time I wrote in my first post. Now I just don't know how to tell to daemons in /etc/rc.sysinit to start in parallel.

EDIT: I think I have to think a little before posting ^^

Offline

#4 2005-12-10 12:22:49

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Increasing bootup speed

Zanton wrote:

So is there a way to tell Arch and the init system to lauch them in a parallel way ?

Nope. Not other than hacking sysinit with -F to the mount command. Arch doesn't revolve around speed and performance the way gentoo does. You aren't going to find many optimizations other than the backgrounding feature to the daemons and the use of hwdetect, which was by nature, faster than hotplug.

Offline

#5 2005-12-11 03:14:22

Zanton
Member
Registered: 2005-12-06
Posts: 80

Re: Increasing bootup speed

Ok, so here are the results after some tests. Without any modification I was booting in 36s on my P4 3.2GHz, 1Go and IDE disk. I make most of the daemons in /etc/rc.conf to run in background and do the same on some specific processus in /etc/rc.sysinit (for example, you cannot do it for udev or fsck because they don't just "run" and you're system doesn't work in first case, or u don't have any filesystem check for the second). With that said, I boot in 26s : http://img234.imageshack.us/my.php?imag … fin5lp.png
And this include the gdm launch which is not the case for bootchart with initng and when I was using initng on my Gentoo, I was booting in 21-22s without gdm which take almost 5s to get ready. To make it simple, I'm booting as fast as using initng. I compared with other bootcharts I made in the past (Gentoo and Debian) and I'm a bit surprised of the amount of time spend to start udev : the start_udev/udevstart was not taking anymore than 1.5s to be ended. If someone has any explanation on this phenomenon I would be happy to read it. Maybe can we tweak it a little and gain 2-3s smile

Offline

#6 2005-12-11 03:44:05

ganja_guru
Member
Registered: 2005-02-14
Posts: 464

Re: Increasing bootup speed

how do you 'background' programs in rc.conf and rc.sysinit?

Offline

#7 2005-12-11 03:59:00

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Increasing bootup speed

35 seconds? You're using hotplug, aren't you... Use hwdetect instead, by setting MOD_AUTOLOAD to "yes" in /etc/rc.conf and removing "hotplug" from the DAEMONS array.

(FWIW, my machine boots in 20 seconds or so.)

Offline

#8 2005-12-11 04:19:44

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Increasing bootup speed

ganja_guru wrote:

how do you 'background' programs in rc.conf and rc.sysinit?

To background the daemons, prefix each with @. Becarefull though, you don't wan't to background something that needs to be finished loading before loading another that depends on the previous.

Offline

#9 2005-12-11 04:23:14

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Increasing bootup speed

Gullible Jones wrote:

(FWIW, my machine boots in 20 seconds or so.)

Mine boots in 1 second or less. I hooked it up three-phase 220, fed it 'roids and slapped it around all silly to do so.

Offline

#10 2005-12-11 04:47:24

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Increasing bootup speed

ROFL... Very Gentoo. lol

Offline

#11 2005-12-11 04:38:25

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Increasing bootup speed

Penguin wrote:
Gullible Jones wrote:

(FWIW, my machine boots in 20 seconds or so.)

Mine boots in 1 second or less. I hooked it up three-phase 220, fed it 'roids and slapped it around all silly to do so.

I used to have a windows machine that booted in 8 seconds.  It was rad.

Offline

#12 2005-12-11 11:20:35

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

Re: Increasing bootup speed

Very interesting - I'll definitely give this a try. I don't know how many times I've said to myself, at the end of a busy day, "If only I'd had another 10 seconds - I could have got so much more done". tongue

Offline

#13 2005-12-11 11:29:27

Zanton
Member
Registered: 2005-12-06
Posts: 80

Re: Increasing bootup speed

Gullible Jones wrote:

35 seconds? You're using hotplug, aren't you... Use hwdetect instead, by setting MOD_AUTOLOAD to "yes" in /etc/rc.conf and removing "hotplug" from the DAEMONS array.

(FWIW, my machine boots in 20 seconds or so.)

It wasn't hotplug but hwdetect, but I'm curious to know which config you have to boot so fast. Can you make a bootchart please to know what make your config boot so fast ? I indeed want to see if your udevstart takes so long as mine :?
And I agree with tomk : booting faster is just not a matter of "my c*** is bigger than yours" (C SOAD), but when I remember the number of times I didn't reboot to test something just because of a slow boot, I think it's definitely an interesting way to customize his own distro.

EDIT: to launch in the background prog from /etc/rc.sysinit, you have to put an amperquote & at the end of the command line. Remember not to use it with udev and the fsck prog smile

Offline

#14 2005-12-11 15:01:46

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Increasing bootup speed

My rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/unimaps
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE=
HARDWARECLOCK="UTC"
TIMEZONE=US/Eastern
KEYMAP=us
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

#
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - modules in this list will never be loaded by hwdetect
MOD_BLACKLIST=(pcspkr)
#
# Modules to load at boot-up (in this order)
#   - prefix a module with a ! to disable it
#
MODULES=(via)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="localhost"
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
eth0="dhcp"
INTERFACES=(lo eth0)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
#
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network-profiles
#
#NET_PROFILES=(main)

#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng acpid network crond dbus hal alsa mpd cups)


# End of file

Pretty normal stuff. I could reduce the boot time by a couple seconds by making some of the daemons load in parallel, but I don't really see the point in bothering.

(Note that ReiserFS's mount times increase with HDD size. If you have a very large HDD, that could be your problem.)

Offline

#15 2005-12-11 18:41:16

Zanton
Member
Registered: 2005-12-06
Posts: 80

Re: Increasing bootup speed

Could you make a bootchart please ? I effectively have a "large" DD but the reiserfs partition are not very large (almost 50 Go). Thanks for advance.

Offline

#16 2005-12-22 09:53:21

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: Increasing bootup speed

@gullible jones

Hmm.. I remember booting really fast with the arch 2.13 kernel. now that I have 2.14 it goes about 10 seconds slower for some reason..

My question is are you guys using custom built kernels?


The ultimate Archlinux release name: "I am your father"

Offline

#17 2005-12-22 10:00:49

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: Increasing bootup speed

heheh.. just timed my boot. I think my laptop is trying to break some record for slowness..

1min 40sec.. no X.

My laptop:
centrino 1.86ghz
80gb seagate 4200rpm
intel 915gm chipset
1024gb ddr ram

using archlinux built kernel 2.14

weird..

please help me speed up boot..

Cheers


The ultimate Archlinux release name: "I am your father"

Offline

#18 2005-12-22 10:06:47

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: Increasing bootup speed

sweet.. I  @ted everything I could find in rc.conf. now boots in 1 min 13 seconds.

btw I completely shut down the computer and take time when I press the power button.


The ultimate Archlinux release name: "I am your father"

Offline

#19 2005-12-22 10:17:56

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: Increasing bootup speed

A little more improvements. Changed my fstab:

none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/cdrom             /mnt/cd   iso9660   ro,user,noauto,unhide   0      0
/dev/dvd               /mnt/dvd  udf       ro,user,noauto,unhide   0      0
#/dev/fd0               /mnt/fl   vfat      user,noauto             0      0

/dev/hda2     swap         swap         defaults     0 0
/dev/hda1     /         ext3        noatime     0 1
/dev/hda3     /storage     reiserfs    noatime,notail     0 0

Removed the fdd, since i dont have any.. added notail and noatime to increase performance.


The ultimate Archlinux release name: "I am your father"

Offline

#20 2005-12-22 10:18:33

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: Increasing bootup speed

A little more improvements. Changed my fstab:

none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/cdrom             /mnt/cd   iso9660   ro,user,noauto,unhide   0      0
/dev/dvd               /mnt/dvd  udf       ro,user,noauto,unhide   0      0
#/dev/fd0               /mnt/fl   vfat      user,noauto             0      0

/dev/hda2     swap         swap         defaults     0 0
/dev/hda1     /         ext3        noatime     0 1
/dev/hda3     /storage     reiserfs    noatime,notail     0 0

Removed the fdd, since i dont have any.. added notail and noatime to increase performance.

Now boots at 1min 8sec. a slight improvement.


The ultimate Archlinux release name: "I am your father"

Offline

#21 2005-12-22 11:52:51

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Increasing bootup speed

Okay... Are you using hotplug? If so, switch to hwdetect, or load your modules manually.

Offline

#22 2005-12-22 15:24:43

Stalwart
Member
From: Latvia, Riga
Registered: 2005-10-18
Posts: 445
Website

Re: Increasing bootup speed

Tested my laptop - from pressing enter in grub menu to xdm prompt - 35 secs

Celeron-M 1.4 / 256 Mb / crappy SiS motherboard, sound and video

[stalwart@fuaran ~]$ uname -a 
Linux fuaran 2.6.13-archck8 #1 Thu Oct 20 18:34:25 EEST 2005 i686 Intel(R) Celeron(R) M processor         1.40GHz GenuineIntel GNU/Linux
[stalwart@fuaran ~]$ cat /proc/cpuinfo 
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 13
model name    : Intel(R) Celeron(R) M processor         1.40GHz
stepping    : 8
cpu MHz        : 1400.434
cache size    : 1024 KB
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 2
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx
bogomips    : 2801.25

[stalwart@fuaran ~]$ lshwd
00:00.0 Host bridge: Silicon Integrated System|Host-to-PCI Bridge (sis-agp)
00:01.0 PCI bridge: Silicon Integrated System|SiS648FX Virtual PCI to PCI Bridge (AGP) (unknown)
00:02.0 ISA bridge: Silicon Integrated System|SiS963 PCI to ISA Bridge (unknown)
00:02.1 SMBus: Silicon Integrated System|SiS961/962 SMBus Controller (i2c-sis96x)
00:02.5 IDE interface: Silicon Integrated Systems [SiS]|5513 [IDE] (sis5513)
00:02.6 Modem: Silicon Integrated System|SiS7013 56k Modem (slamr)
00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS]|SiS7012 PCI Audio Accelerator (snd-intel8x0)
00:03.0 USB Controller: Silicon Integrated Systems [SiS]|7001 USB (ohci_hcd)
00:03.1 USB Controller: Silicon Integrated Systems [SiS]|7001 USB (ohci_hcd)
00:03.3 USB Controller: Silicon Integrated Systems [SiS]|7002 USB 2.0 Controller (ehci-hcd)
00:04.0 Ethernet controller: Silicon Integrated Systems [SiS]|SiS900 10/100 Ethernet (sis900)
00:06.0 CardBus bridge: Texas Instruments|PCI1410 PC card Cardbus Controller (yenta_socket)
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS]|SiS Real256E (sis)
003:002 USB Human Interface Devices:  [/dev/input/mice] (usbhid)
003:001 USB Hub: Virtual|Hub (unknown)
002:001 USB Hub: Virtual|Hub (unknown)
001:001 USB Hub: Virtual|Hub (unknown)

rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/unimaps
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE=
HARDWARECLOCK="localtime"
TIMEZONE=Europe/Riga
KEYMAP=us
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

#
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# Scan hardware and load required modules at bootup
MOD_AUTOLOAD="yes"
# Module Blacklist - modules in this list will never be loaded by hwdetect
MOD_BLACKLIST=()
#
# Modules to load at boot-up (in this order)
#   - prefix a module with a ! to disable it
#
MODULES=(!usbserial)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="fuaran"
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(gateway)
#
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network-profiles
#
#NET_PROFILES=(main)

#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng @network @acpid @alsa @crond @autofs dbus hal !netfs !hotplug !pcmcia)


# End of file

IRC: Stalwart @ FreeNode
Skype ID: thestalwart
WeeChat-devel nightly packages for i686

Offline

#23 2005-12-22 16:26:16

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: Increasing bootup speed

I am not using hotplug, stalwart, are you using arch kernel? or own compiled kernel?

I was checking all my loaded modules, and i have too much.. thought of maybe what I dont need to the blacklist.. but dont know what all of them do.. how can I figure out what its for?

I am thinking of compiling my own kernel and using the mm sources.. gullible jones, is your kernel manual compiled?

cheers


The ultimate Archlinux release name: "I am your father"

Offline

#24 2005-12-22 17:03:20

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: Increasing bootup speed

Out of curiosity I just checked out how long my Arch installation takes to boot up. I installed bootchart and bootet up with init=/sbin/bootchartd and this is what I got: http://nooms.de/up/bootchart.png

Now I'm really shocked that fsck+mount alone take more than 30 seconds to finish... Here's a list of what I mount on startup:

· hda1 - ext2 - 16M
· hda2 - ext3 - 19G
· hda3 - reiserfs - 130G
· hdb2 - reiserfs - 115G

Is this long time fsck and mount need to check and mount my filesystems normal on a setup like this? This installation runs on a Nforce2 system with an Athlon XP-M 2600+, btw.

Any suggestions on how I could improve the time my box needs to boot are highly appreciated!

Offline

#25 2005-12-22 17:10:42

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: Increasing bootup speed

ReiserFS takes a long time to fsck. sad


·¬»· i am shadowhand, powered by webfaction

Offline

Board footer

Powered by FluxBB