You are not logged in.
Pages: 1
I've managed to lower my boot time to 14 seconds on the asus eee, but I know it can get lower that that... Apart from recompiling the kernel (which I intend to do last), can you suggest anything else might help?
Bootchart
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"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# 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/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="no"
TIMEZONE="Europe/Athens"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=()
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="asuseee"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# 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
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(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 (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(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 @crond @hal gdm)My rc.sysinit
#!/bin/bash
#
# /etc/rc.sysinit
#
. /etc/rc.conf
. /etc/rc.d/functions
echo " "
printhl "Arch Linux\n"
printhl "${C_H2}http://www.archlinux.org"
printhl "Copyright 2002-2007 Judd Vinet"
printhl "Copyright 2007-2009 Aaron Griffin"
printhl "Distributed under the GNU General Public License (GPL)"
printsep
# mount /proc, /sys and our RAM /dev
/bin/mount -n -t ramfs none /dev
/bin/mount -n -t proc none /proc
/bin/mount -n -t sysfs none /sys
# Create our default nodes that minilogd may need
/bin/mknod /dev/null c 1 3
/bin/mknod /dev/zero c 1 5
/bin/mknod /dev/console c 5 1
# More initial /dev setup that udev doesn't do
/bin/ln -snf /proc/self/fd /dev/fd
/bin/ln -snf /proc/self/fd/0 /dev/stdin
/bin/ln -snf /proc/self/fd/1 /dev/stdout
/bin/ln -snf /proc/self/fd/2 /dev/stderr
/bin/ln -snf /proc/kcore /dev/core
/bin/mkdir /dev/pts
/bin/mkdir /dev/shm
# start up our mini logger until syslog takes over
/sbin/minilogd
# anything more serious than KERN_WARNING goes to the console
# 'verbose' cmdline parameter enables more messages
if /bin/grep -q " verbose" /proc/cmdline; then
/bin/dmesg -n 8
else
/bin/dmesg -n 3
fi
# enable rtc access
/sbin/modprobe rtc-cmos >/dev/null 2>&1
RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null); RTC_MAJOR="${RTC_MAJOR%% *}"
if [ -n "$RTC_MAJOR" ]; then
/bin/mkdir /dev/misc/
/bin/mknod /dev/misc/rtc0 c $RTC_MAJOR 0
/bin/ln -s /dev/misc/rtc0 /dev/rtc
fi
HWCLOCK_PARAMS="--hctosys"
if [ "$HARDWARECLOCK" = "UTC" ]; then
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc"
else
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime"
fi
if [ "$USEDIRECTISA" = "yes" -o "$USEDIRECTISA" = "YES" ]; then
HWCLOCK_PARAMS="$HWCLOCK_PARAMS --directisa"
fi
# Set clock early to fix some bugs with filesystem checks
# Clock is set again later to match rc.conf
if [ -f /etc/localtime ]; then
/sbin/hwclock $HWCLOCK_PARAMS --noadjfile
fi
echo > /proc/sys/kernel/hotplug
if [ -x /sbin/udevadm -a -d /sys/block ]; then
# We have udev and /sys appears to be mounted, use UDev
stat_busy "Starting UDev Daemon"
/sbin/udevd --daemon
/sbin/udevadm trigger
stat_done
else
# Static /dev, our last resort
status "Using static /dev filesystem" true
fi
# Load modules from the MODULES array defined in rc.conf
if ! [ "$load_modules" = "off" ]; then
if [ -f /proc/modules ]; then
stat_busy "Loading Modules"
for mod in "${MODULES[@]}"; do
if [ "$mod" = "${mod#!}" ]; then
/sbin/modprobe $mod
fi
done
stat_done
fi
if [ -d /proc/acpi ]; then
stat_busy "Loading standard ACPI modules"
ACPI_MODULES="ac battery button fan processor thermal"
k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | /bin/sed 's|-|_|g')"
j="$(echo ${MODULES[@]} | /bin/sed 's|-|_|g')"
#add disabled MODULES (!) to blacklist - much requested feature
for m in ${j}; do
[ "$m" != "${m#!}" ] && k="${k} ${m#!}"
done
# add disablemodules= from commandline to blacklist
k="${k} $(echo ${disablemodules} | /bin/sed 's|-|_|g' | /bin/sed 's|,| |g')"
for n in ${ACPI_MODULES}; do
if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then
/sbin/modprobe $n > /dev/null 2>&1
fi
done
stat_done
fi
fi
# run udev uevents
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
stat_busy "Loading UDev uevents"
udevstart="$(/bin/date +%s%0N)"
# /sbin/udevadm trigger
/sbin/udevadm settle
stat_done
udevend="$(/bin/date +%s%0N)"
printhl " UDev uevent processing time: $((($udevend-$udevstart)/1000000))ms"
fi
# bring up the loopback interface
if [ -d /sys/class/net/lo ]; then
stat_busy "Bringing up loopback interface"
/sbin/ifconfig lo 127.0.0.1 up
if [ $? -ne 0 ]; then
stat_fail
else
stat_done
fi
fi
# If necessary, find md devices and manually assemble RAID arrays
#if [ -f /etc/mdadm.conf -a "$(/bin/grep ^ARRAY /etc/mdadm.conf 2>/dev/null)" ]; then
# # udev won't create these md nodes, so we do it ourselves
# for dev in $(/bin/grep ^ARRAY /etc/mdadm.conf | /bin/awk '{print $2}'); do
# path=$(echo $dev | /bin/sed 's|/[^/]*$||')
# node=$(echo $dev | /bin/sed "s|^$path/||")
# minor=$(echo $node | /bin/sed 's|^[^0-9]*||')
# [ ! -e $path/$node ] && /bin/mknod $path/$node b 9 $minor
# done
# status "Activating RAID arrays" /sbin/mdadm --assemble --scan
#fi
if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
if [ -x /sbin/lvm -a -d /sys/block ]; then
# Kernel 2.6.x, LVM2 groups
/sbin/modprobe -q dm-mod 2>/dev/null
stat_busy "Activating LVM2 groups"
/sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
/sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
if [ $? -ne 0 ]; then
stat_fail
else
stat_done
fi
fi
fi
# Set up non-root encrypted partition mappings
#if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then
# /sbin/modprobe -q dm-mod 2>/dev/null
# stat_busy "Unlocking encrypted volumes:"
# csfailed=0
# CS=/sbin/cryptsetup.static
# do_crypt() {
# if [ $# -ge 3 ]; then
# cname="$1"
# csrc="$2"
# cpass="$3"
# shift 3
# copts="$*"
# stat_append "${cname}.."
# # For some fun reason, the parameter ordering varies for
# # LUKS and non-LUKS devices. Joy.
# if [ "${cpass}" = "SWAP" ]; then
# # This is DANGEROUS! The only possible safety check
# # is to not proceed in case we find a LUKS device
# # This may cause dataloss if it is not used carefully
# if $CS isLuks $csrc 2>/dev/null; then
# false
# else
# $CS -d /dev/urandom $copts create $cname $csrc >/dev/null
# if [ $? -eq 0 ]; then
# stat_append "creating swapspace.."
# /sbin/mkswap -L $cname /dev/mapper/$cname >/dev/null
# fi
# fi
# elif [ "${cpass}" = "ASK" ]; then
# printf "\nOpening '${cname}' volume:\n"
#
# if $CS isLuks $csrc 2>/dev/null; then
# $CS $copts luksOpen $csrc $cname < /dev/console
# else
# $CS $copts create $cname $csrc < /dev/console
# fi
# elif [ "${cpass:0:1}" != "/" ]; then
# if $CS isLuks $csrc 2>/dev/null; then
# echo "$cpass" | $CS $copts luksOpen $csrc $cname >/dev/null
# else
# echo "$cpass" | $CS $copts create $cname $csrc >/dev/null
# fi
# else
# if $CS isLuks $csrc 2>/dev/null; then
# $CS -d $cpass $copts luksOpen $csrc $cname >/dev/null
# else
# $CS -d $cpass $copts create $cname $csrc >/dev/null
# fi
# fi
# if [ $? -ne 0 ]; then
# csfailed=1
# stat_append "failed "
# else
# stat_append "ok "
# fi
# fi
# }
# while read line; do
# eval do_crypt "$line"
# done </etc/crypttab
# if [ $csfailed -eq 0 ]; then
# stat_done
# else
# stat_fail
# fi
# # Maybe someone has LVM on an encrypted block device
# if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then
# if [ -x /sbin/lvm -a -d /sys/block ]; then
# /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null
# /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null
# fi
# fi
#fi
status "Mounting Root Read-only" /bin/mount -n -o remount,ro /
FORCEFSCK=
[ -f /forcefsck ] && FORCEFSCK="-- -f"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk"
if [ -x /sbin/fsck ]; then
stat_busy "Checking Filesystems"
if /bin/grep -qw quiet /proc/cmdline; then
/sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >/dev/null 2>&1
else
/sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
fi
fsckret=$?
if [ ${fsckret} -gt 1 ]; then
stat_fail
if [ $((${fsckret}&2)) -eq 2 ]; then
echo
echo "********************** REBOOT REQUIRED *********************"
echo "* *"
echo "* The system will be rebooted automatically in 15 seconds. *"
echo "* *"
echo "************************************************************"
echo
/bin/sleep 15
else
echo
echo "***************** FILESYSTEM CHECK FAILED ****************"
echo "* *"
echo "* Please repair manually and reboot. Note that the root *"
echo "* file system is currently mounted read-only. To remount *"
echo "* it read-write type: mount -n -o remount,rw / *"
echo "* When you exit the maintenance shell the system will *"
echo "* reboot automatically. *"
echo "* *"
echo "************************************************************"
echo
/sbin/sulogin -p
fi
echo "Automatic reboot in progress..."
/bin/umount -a
/bin/mount -n -o remount,ro /
/sbin/reboot -f
exit 0
fi
stat_done
fi
stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
/bin/rm -f /etc/mtab*
# make sure / gets written to /etc/mtab
/bin/mount -o remount,rw /
# Write /proc, /sys and /dev to /etc/mtab
if [ -e /proc/mounts ]; then
/bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
fi
# now mount all the local filesystems
/bin/mount -a -t $NETFS
stat_done
#status "Activating Swap" /sbin/swapon -a
stat_busy "Configuring System Clock"
if [ ! -f /var/lib/hwclock/adjtime ]; then
echo "0.0 0 0.0" > /var/lib/hwclock/adjtime
fi
if [ "$TIMEZONE" != "" -a -e "/usr/share/zoneinfo/$TIMEZONE" ]; then
/bin/rm -f /etc/localtime
/bin/cp "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
fi
/sbin/hwclock $HWCLOCK_PARAMS
stat_done
if [ -f /var/run/random-seed ]; then
stat_busy "Initializing Random Seed"
/bin/cat /var/run/random-seed >/dev/urandom
stat_done
fi
stat_busy "Removing Leftover Files"
/bin/rm -f /etc/nologin &>/dev/null
/bin/rm -f /etc/shutdownpid &>/dev/null
/bin/rm -f /var/lock/* &>/dev/null
/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
/bin/rm -f /forcefsck &>/dev/null
(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
: > /var/run/utmp
/bin/chmod 0664 /var/run/utmp
# Keep {x,k,g}dm happy with xorg
/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
/bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix
stat_done
#status "Updating Shared Library Links" /sbin/ldconfig
if [ "$HOSTNAME" != "" ]; then
status "Setting Hostname: $HOSTNAME" /bin/hostname $HOSTNAME
fi
# Set the NIS domain name, if necessary
[ -f /etc/conf.d/nisdomainname ] && . /etc/conf.d/nisdomainname
if [ "$NISDOMAINNAME" != "" ]; then
status "Setting NIS Domain Name: $NISDOMAINNAME" /bin/nisdomainname $NISDOMAINNAME
fi
status "Updating Module Dependencies" /sbin/depmod -A
# Flush old locale settings
: >/etc/profile.d/locale.sh
/bin/chmod 755 /etc/profile.d/locale.sh
# Set user defined locale
[ -z "$LOCALE" ] && LOCALE="en_US"
stat_busy "Setting Locale: $LOCALE"
echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh
stat_done
if echo "$LOCALE" | /bin/grep -qi utf ; then
stat_busy "Setting Consoles to UTF-8 mode"
# UTF-8 consoles are default since 2.6.24 kernel
# this code is needed not only for older kernels,
# but also when user has set vt.default_utf8=0 but LOCALE is *.UTF-8.
for i in $(/usr/bin/seq 0 63); do
/usr/bin/kbd_mode -u < /dev/vc/${i}
printf "\e%%G" > /dev/vc/${i}
done
# the $CONSOLE check helps us avoid this when running scripts from cron
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%G"; fi' >>/etc/profile.d/locale.sh
stat_done
[ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q -u $KEYMAP
else
stat_busy "Setting Consoles to legacy mode"
# make non-UTF-8 consoles work on 2.6.24 and newer kernels
for i in $(/usr/bin/seq 0 63); do
/usr/bin/kbd_mode -a < /dev/vc/${i}
printf "\e%%@" > /dev/vc/${i}
done
# the $CONSOLE check helps us avoid this when running scripts from cron
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e%%@"; fi' >>/etc/profile.d/locale.sh
stat_done
[ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP
fi
if [ -n "$CONSOLEFONT" ]; then
stat_busy "Loading Console Font: $CONSOLEFONT"
#CONSOLEMAP in UTF-8 shouldn't be used
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
CONSOLEMAP=""
fi
for i in $(/usr/bin/seq 0 63); do
if [ -n "$CONSOLEMAP" ]; then
/usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1
else
/usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} >/dev/null 2>&1
fi
done
if [ $? -ne 0 ]; then
stat_fail
else
for i in $(/usr/bin/seq 0 63); do
printf "\e(K" > /dev/vc/${i}
done
# the $CONSOLE check helps us avoid this when running scripts from cron
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh
stat_done
fi
fi
# Adding persistent network/cdrom generated rules
#if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
# stat_busy "Adding persistent cdrom udev rules"
# /bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
# stat_done
#fi
if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
stat_busy "Adding persistent network udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
stat_done
fi
# Save our dmesg output from this boot
if [ -f /var/log/dmesg.log ]; then
/bin/rm /var/log/dmesg.log
fi
/bin/dmesg > /var/log/dmesg.log
# End of file
# vim: set ts=2 noet:Offline
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=()
As far as I understand it, you could avoid "udev", which takes some time, by setting MOD_AUTOLOAD="no" and inserting in
MODULES explicitly the ones you really need.
I didn't come yet to try it on my eeepc.
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=()As far as I understand it, you could avoid "udev", which takes some time, by setting MOD_AUTOLOAD="no" and inserting in
MODULES explicitly the ones you really need.I didn't come yet to try it on my eeepc.
Mektub
Considering I'll recompile the kernel, should I incorporate the drivers to the kernel or just use modules? Which one would be better for faster booting? In either case MOD_AUTOLOAD will be set to "no", thanks for the advice.
Anything else that could help with the boot speed? Hardware advice is also welcome.
Offline
~$ hwdetect --modules
![]()
This helped me to change from 2000 ms boot time to 800 ms
Anything else that could help with the boot speed? Hardware advice is also welcome.
Hot stuff:
SSD - solid state disk
Last edited by quarkup (2009-02-20 11:11:04)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
~$ hwdetect --modules
This helped me to change from 2000 ms boot time to 800 ms
So, the output of "hwdetect --modules" will be a list of modules I can use in my rc.conf and thus MOD_AUTOLOAD="yes" is no longer nessesary, right?
Hot stuff:
SSD - solid state disk
This reminds me, I was thinking of using a different scheduler since I've read that in SSD drives some schedulers perform much better. I found this blog post that seems interesting. Does anyone know if the scheduler has any impact on booting speed?
Offline
quarkup wrote:~$ hwdetect --modules
This helped me to change from 2000 ms boot time to 800 ms
So, the output of "hwdetect --modules" will be a list of modules I can use in my rc.conf and thus MOD_AUTOLOAD="yes" is no longer nessesary, right?
I got MOD_AUTOLOAD="yes"
Once the modules are all loaded, by enabling this option I "consume" only ~70ms
I tried MOD_AUTOLOAD="no" and didn't noticed any issue.
![]()
Last edited by quarkup (2009-02-20 12:52:53)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
Once the modules are all loaded, by enabling this option I "consume" only ~70ms
I see that you mention milliseconds again, how exactly do you count these milliseconds? Since my last message, I've tried other I/O schedulers and three out of four get the same result. I believe that there IS a difference among schedulers but since bootchart displays the results in seconds, I can't compare them. If you could just tell me how you count in ms I could compare them and see which one is faster at booting the eee. In case you're wondering, noop is the slowest, requiring 16sec to boot the eee while cfq, anticipatory and deadline require 14sec according to bootchart.
Offline
quarkup wrote:Once the modules are all loaded, by enabling this option I "consume" only ~70ms
I see that you mention milliseconds again, how exactly do you count these milliseconds? Since my last message, I've tried other I/O schedulers and three out of four get the same result. I believe that there IS a difference among schedulers but since bootchart displays the results in seconds, I can't compare them. If you could just tell me how you count in ms I could compare them and see which one is faster at booting the eee. In case you're wondering, noop is the slowest, requiring 16sec to boot the eee while cfq, anticipatory and deadline require 14sec according to bootchart.
I'm talking about "loading" modules, not the full-boot time..
After turning on the PC, there will be shown on the virtual terminal the time taken by Udev to load all modules.
Last edited by quarkup (2009-02-20 13:49:55)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
I'm talking about "loading" modules, not the full-boot time..
After turning on the PC, there will be shown on the virtual terminal the time taken by Udev to load all modules.
Interesting, I hadn't noticed udev displays the time it takes to load the modules, I just checked and my udev takes 1720ms. There is plenty of room for improvement. Now I have figure out how to count the boot time in fractions of a second... I think the kernel has a bootchart-like feature too but I can't find the page I saw this info.
Offline
quarkup wrote:I'm talking about "loading" modules, not the full-boot time..
After turning on the PC, there will be shown on the virtual terminal the time taken by Udev to load all modules.
Interesting, I hadn't noticed udev displays the time it takes to load the modules, I just checked and my udev takes 1720ms. There is plenty of room for improvement. Now I have figure out how to count the boot time in fractions of a second... I think the kernel has a bootchart-like feature too but I can't find the page I saw this info.
You could also stop using gdm and use slim or no login manager, just take a look at the wiki there is a article about it. Loading gdm cost me an extra 2 seconds so you could tweak that:)
Offline
As DreamAxe said, using the NOOP scheduler should provide a large performance increase on any media that uses flash. Why? Schedulers like CFQ (the default) attempt to give you the best performance possible by scheduling I/O operations to be optimal for a mechanical hard drive's head to sweep across in one go. The NOOP scheduler basically does nothing instead. For a non-mechanical drive, where there is no real seek time, the NOOP scheduler will do much better (and will save a (small) amount of CPU time).
You can enable NOOP by doing 'echo "NOOP" > /sys/block/yourdrivehere/queue/scheduler'. You can enable it permanently by adding the line 'block/yourdrivehere/queue/scheduler' to /etc/sysfs.conf (make sure you have sysfsutils installed). This also helps with any other flash drive, like USB drives, etc.
I'm not sure why (s)he's getting worse boot performance with NOOP, but it definitely should be faster for normal operations.
Last edited by Ranguvar (2009-02-20 14:59:01)
Offline
You could also stop using gdm and use slim or no login manager, just take a look at the wiki there is a article about it. Loading gdm cost me an extra 2 seconds so you could tweak that:)
I'll look into it, thanks ![]()
I'm not sure why (s)he's getting worse boot performance with NOOP, but it definitely should be faster for normal operations.
I (He
) only took into account the effect on boot time. Noop is most likely a better choice when it comes to normal operations, but right now I'm interested mainly in lowering the boot time as much is possible. Still, one of the I/O schedulers probably takes less time than the others... Now I need to find a way to measure that time (fractions of a second) with a utility other than bootchart.
Offline
UPDATE: hwdetect --modules didn't help.
I put the list generated by hwdetect into my rc.conf and and set MOD_AUTOLOAD="no" and rebooted. During the boot I got an error about the intel-rng module (I think it was "no such device") and the boot continued normally. No improvement in boot speeds.
Then I tried removing the intel-rng from the list of modules, rebooted but my boot time increased instead of decreasing!
Finally, I set MOD_AUTOLOAD=yes while keeping the list of modules in rc.conf. Boot time was back to 14 seconds.
I find this behaviour very weird... Has anyone got a clue why this is happening?
Offline
As DreamAxe said, using the NOOP scheduler should provide a large performance increase on any media that uses flash. Why? Schedulers like CFQ (the default) attempt to give you the best performance possible by scheduling I/O operations to be optimal for a mechanical hard drive's head to sweep across in one go. The NOOP scheduler basically does nothing instead. For a non-mechanical drive, where there is no real seek time, the NOOP scheduler will do much better (and will save a (small) amount of CPU time).
You can enable NOOP by doing 'echo "NOOP" > /sys/block/yourdrivehere/queue/scheduler'. You can enable it permanently by adding the line 'block/yourdrivehere/queue/scheduler' to /etc/sysfs.conf (make sure you have sysfsutils installed). This also helps with any other flash drive, like USB drives, etc.
I'm not sure why (s)he's getting worse boot performance with NOOP, but it definitely should be faster for normal operations.
I think you could also append "elevator=noop" to the kernel line in /boot/grub/menu.lst if you're using grub.
Offline
Update
After I compiled 2.6.28.7, boot time decreased to 12 seconds ![]()
Still, udev takes up too much of the total boot time. About 1413ms. Any idea on how to reduce that? Manually adding the modules to rc.conf and setting MOD_AUTOLOAD to "no" doesn't help at all, it actually increases the boot time.

Offline
Look at :
http://forum.eeeuser.com/viewtopic.php?id=25964
But as far as I'm concerned, I don't really want to sacrifice important features to win a few second, and then need to launch things "by hand" or forget about them.
Offline
Nice link faelar, though the author there mentions that the fastest boot time he got with "real X" (that is Xorg) is 15-20 seconds.
I could probably replace xorg with kdrive, use a window manager like jwm, or even replace the intel driver with vesa, but my goal isn't to make the system less usable in order to boot faster, I like the features and comfort that gnome provides. If 12 seconds is the lowest I can get with a fully usable gnome desktop, so be it, it's not bad at all ![]()
Offline
gnome, yuck, you really should use something like openbox + conky on the eeepc!
I have a 18px margin at top (for a clock and a few other stats) and a 1px margin at the bottom so I can right click and middle click!
Offline
Pages: 1