You are not logged in.

#1 2008-07-27 11:16:23

Thoht
Member
From: Sweden
Registered: 2008-02-02
Posts: 75

Archlinux and booting times/system load

Hey!

I've been toying around with GNU/Linux for a while now, although the computer I still work on a daily basis on is a MacBook Pro (mostly drawing with a Wacom). It was all good and fun until I wanted to run Apache, PHP and stuf.

I bought a box, put together by myself (good fun) so that I could tinker to my hearts content with various distributions. However, ever so often I read about the amazing booting times of the budget UMPCs like Asus Eee, MSI Wind and so on. Is it possible to make that happen on my box with Archlinux? I've been measuring the booting times ever so often when switching between different DEs such as GNOME, KDE and various Openbox/Awesome compositions. I always install GRUB, not seeing at it was recommended over LILO for some reason, but found a article in the Wiki covering this subject which suggested the use of LILO.

The BIOS, I think, is loaded in 31 seconds. Then the GRUB loading message appears. After that it's another 34 seconds using GNOME, 27 using Awesome. I installed Ubuntu earlier this day, landing on 26 seconds (GNOME). How is this possible? What am I doing wrong? Another thing I noticed is that I don't experience GNOME on Ubuntu being noticably slower than Archlinux with Awesome or Openbox, but GNOME on Archlinux is definitely slower than all of the previous. I suppose it's my hardware configuration for Archlinux that must be flawed, which Ubuntu does in a more appropriate way with it's automatized setup?

I'm not sure if it helps, but here's my machine:

Box: Lian Li PC-V300A Alu Silver
PSU: FSP 350w PNFOEMATX 2.0
Motherboard: MK Gigabyte GA-945GCM-S2L
CPU: Intel® Core 2 Duo E4500 2,2GHz
Memory: 2x DDR2 1GB PC5300 Orig.
HDD: HD80 Seagate 7200.10 SATA8MB Cache 7200rpm NCQ
Optical: DVD±RW Optiarc AD-7200S Svart 20x Dual Layer SATA

(I was thinking I'd purchase a "Leadtek GeForce WinFast PX8800 GT 512MB" to improve the visuals, which are a bit blurry right now. I'm also looking into getting a soundcard eventually for an optical out to plug it into my Denon surround reciever.)

I'll include some of the installation choices I do:

HDD preparation:

Name        Flags    Part Type        FS Type            Size (MB)
---------------------------------------------------------------
sda1        Boot        Primary        Linux ext3        8192
sda2                Primary        Linux ext3        70807~
sda3                Primary        Linux swap        1024

I'm considering skipping the swap partition entirely. I'm not running anything heavy really, and Conky never indicated more than 800 MB memory was used.

Packages, I only select "Base".

Post installation I run "hwdetect", chosing "No" for all boot-options, and then "Yes", "Yes", "Yes", "Nano".

After that, I edit /etc/rc.conf:

locale="en_US.utf8"
hardwareclock="UTC"
timezone="Europe/Stockholm"
keymap="sv-latin1"
hostname="arvaker"
#eth0="eth0 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
#gateway="default gw 192.168.0.1"

Then I edit /etc/locale.gen, uncommenting the following:

en_US.UTF8
en_US     ISO-8859-1
sv_SE.UTF-8
sv_SE    ISO-8859-1

(I'm from Sweden, and want to use a Swedish keyboardlayout, have the clock display GMT +1, but keep the entire system in English, if you catch my drift? Easier to relate on the Internet that way...)

Then I run:

> locale-gen

After that I install GRUB, and edit it's configuration file:

kernel /boot/vmlinuz26 root=/dev/sda1 ro vga=792

My monitor is an Eizo 22". GRUB is installed on "/dev/sda". Then I reboot. After that I update the system, change my prompt, add my everyday user, install Sudo, ALSA, Xorg and then as of lately, Awesome. My Xorg install looks like this:

> sudo pacman -S libgl
> sudo pacman -S xorg
> sudo pacman -S mesa
> sudo pacman -S xf86-video-intel
> sudo pacman -S hwd
> sudo hwd -xa
> sudo pacman -S ttf-ms-fonts ttf-dejavu ttf-bitstream-vera

Not sure what else I can add. I expected this configuration with a light composition of applications such as Awesome, Xcompmgr, Nitrogen, Dmenu, uRXVT, GTK-CHTHEME, SLiM, Leafpad, Thunar, Firefox, Mirage, MPD, Sonata, Easytag, and Irssi to work at the speed of a lightning, but it doesn't really...

Any tips or pointers? The box is to be used to plug in to my reciever to play music (I like MPD, haven't tried MOC yet!), chat on IRC and run Apache, PHP, MySQL, mod_python. The latter something I'd like to hop into by SSH.

All help appreciated, thanks!


Credit to KiwiesRuleXD @ DeviantArt for the avatar.

Offline

#2 2008-07-27 23:20:07

mastapsi
Member
Registered: 2008-07-27
Posts: 14

Re: Archlinux and booting times/system load

A big time saver is to force some of your daemons (network, HAL, alsa, and FAM in particular) to start up in the background.  Normally, init will wait for them to finish.

You can do it by adding a @ infront of each daemon you want to start in the background in your /etc/rc.conf

Example

DAEMONS=(syslog-ng @network @netfs crond @alsa @hal @fam)

If you aren't sure if you can background somehting, don't.  But for sure backgrounding network should save you atleast 5-10 seconds on boot.

Offline

Board footer

Powered by FluxBB