| View previous topic :: View next topic |
| Author |
Message |
Pythonhead Developer


Joined: 16 Dec 2002 Posts: 1801 Location: Redondo Beach, Republic of Calif.
|
Posted: Tue Aug 05, 2003 5:18 am Post subject: |
|
|
I didn't look to see if it'd work with our rc system, but maybe you speed freaks might check it out:
http://opensource.openfuel.com/frc/ |
|
| Back to top |
|
 |
syadnom Guru


Joined: 09 May 2002 Posts: 531
|
Posted: Tue Aug 05, 2003 6:53 am Post subject: some info? |
|
|
Pythonhead,
some more info on this please?
i'm really only interested if the changes to init can be handled by a script. I would like to keep this as simple as possible. |
|
| Back to top |
|
 |
syadnom Guru


Joined: 09 May 2002 Posts: 531
|
Posted: Tue Aug 05, 2003 8:15 am Post subject: OK, so far |
|
|
So far I have done this:
in /etc/init.d/modules
i added & , see below &
| Quote: |
load_modules() {
[ -z "$1" ] && return 0
[ ! -r "$1" ] && return 0
# Loop over every line in $1
(egrep -v "^#|^$" "$1"; echo) | # make sure there is a LF at the end
while read module args
do
[ -z "${module}" ] && continue
ebegin " Loading module ${module}"
modprobe -q ${module} ${args} &>/dev/null &
eend $? " Failed to load ${module}"
done
echo
return 0
} |
changed line 13 of /etc/conf.d/rc
| Quote: |
from RC_PARALLEL_STARTUP="no"
to RC_PARALLEL_STARTUP="yes" |
this loads all the modules inthe background effectively loading them in parallel and also loads all of the scripts in init.d/ in the same manner.
i load all sound and filesystem drivers, USB, cdrom, loopback as modules to load them in parallel as i have no clue how to have the kernel do this internally and have no desire to patch it if it did know how.
list of modules:
| Quote: |
uhci-hcd
nvidia
smbfs
nfs
fat
msdos
vfat
udf
isofs
loop
ntfs
|
i tested this on three systems. here are the IMPROVEMENTS in time and system specs:
Athlon 1600+(originally 29sec)
WD 120GB 8MB buffer drive
512 DDR PC2100
reduced 8 seconds.
from grub prompt 16 seconds.
total boot to KDM 21 seconds
Athlon 1600+(originally 33sec)
SCSI seagate 18.2gb 7200 rpm
same as first + 4 seconds for SCSI controller init
Athlon 1600+(originally 64sec)
SCSI TB array, 3 channel H/W raid via HP Megaraid RAID 5.
(partitioned out 40GB for system)
1GB DDR PC2700
reduced by 12 seconds
from grub 26(SCSI init is slow)
total boot to KDM 52 seconds, SCSI hardware is slow to scan through 45 possible devices.
Very fast boot for this setup. I used to run Win2k server on this and boot took ~3 minutes.
the three systems have the same gentoo install, just copied a fresh built system to the respective machines via nfs(knoppix ) i build support for motherboard chipset and IDE for all systems into same kernel. felt it wouldn't effect times and would make it a lot easier on me. |
|
| Back to top |
|
 |
syadnom Guru


Joined: 09 May 2002 Posts: 531
|
Posted: Tue Aug 05, 2003 8:16 am Post subject: hdparm |
|
|
| will post hdparm -Tt numbers soon |
|
| Back to top |
|
 |
siti Tux's lil' helper


Joined: 05 May 2003 Posts: 118 Location: Canterbury, New Zealand
|
Posted: Sat Aug 09, 2003 5:31 am Post subject: |
|
|
To seem like your computer is booting fast you could edit /etc/init.d/xdm and put "before *" in depend. So xdm/gdm/kdm will come up first and your computer will continue to load other services but it will still be usable! Optionally you could add "sleep 5" before eend 0 so xdm loads quickly then the other services continue.
I guess this would be simlair to what windows me/xp + does. |
|
| Back to top |
|
 |
Safrax Guru

Joined: 23 Apr 2002 Posts: 419
|
Posted: Sat Aug 09, 2003 5:45 am Post subject: Re: OK, so far |
|
|
| syadnom wrote: | So far I have done this:
| Quote: |
uhci-hcd
nvidia
smbfs
nfs
fat
msdos
vfat
udf
isofs
loop
ntfs
|
|
smbfs, nfs, fat, msdos, vfat, udf, isofs, loop, and ntfs will automatically load themselves when you mount a filesystem that uses them and as such can be removed from the module loader.
Last edited by Safrax on Sat Aug 09, 2003 5:07 pm; edited 1 time in total |
|
| Back to top |
|
 |
Safrax Guru

Joined: 23 Apr 2002 Posts: 419
|
Posted: Sat Aug 09, 2003 5:46 am Post subject: |
|
|
| siti wrote: | To seem like your computer is booting fast you could edit /etc/init.d/xdm and put "before *" in depend. So xdm/gdm/kdm will come up first and your computer will continue to load other services but it will still be usable! Optionally you could add "sleep 5" before eend 0 so xdm loads quickly then the other services continue.
I guess this would be simlair to what windows me/xp + does. |
Your right. It would be similar. XP loads most services after a user logs in. 2k does it before a user logs in though, between the start of the GUI and login prompt. |
|
| Back to top |
|
 |
syadnom Guru


Joined: 09 May 2002 Posts: 531
|
Posted: Sat Aug 09, 2003 6:57 am Post subject: so far. |
|
|
so far we have:
#in /etc/init.d/
edit modules and add "&" at the end of the modprobe -q----- line
make all non-boot filesystems modules and allow kernel to autoload them, dont load at boot.
make sure hdparm is setting -d1 at least, any other optimisations possible
#also
change line 13 of /etc/conf.d/rc to RC_PARALLEL_STARTUP="yes"
i hope to expand this list as this thread grows.
dont be afraid to offer any thoughts you might have. |
|
| Back to top |
|
 |
M104 Tux's lil' helper


Joined: 13 Jan 2003 Posts: 132 Location: Riverside, CA
|
Posted: Sat Aug 09, 2003 11:16 am Post subject: |
|
|
Disable the slow memory checks in BIOS, if you can.
How about only loading the services that you need? Most of my boot time is in the daemons, not the kernel modules. If you're on the road a lot, do you always have a printer and compiling farm available? Why load cups and distcc then?
Here's my idea: Create a number of "profiles" though grub or lilo depending on what services you need to start up. Name these profiles and pass the name as a kernel parameter. Use something unique like "my_boot_profile=whatever". Then, have your boot script check the profile name from /proc/cmdline on boot and run the appropriate profile script. Fast and simple.
Oh yeah, you want to clock your boot time? Make a statement that runs near the end of your shutdown script which stores the current time to a file. Try to do this right before the hard drive is umounted. Then use another statement at the very end of your startup script which compares the stored time to the current time. Then reboot the system. Your boot time is roughly the reported time. (With any luck, the extra time it takes to umount the drive and reboot the system will be about the same as the time it takes to spin up a cold hard drive.) But if you want to know exactly, a stopwatch would be much better.
Cheers! _________________ "Pulling together is the aim of despotism and tyranny. Free men pull in all kinds of directions."
Terry Pratchett, The Truth |
|
| Back to top |
|
 |
Reformist Guru


Joined: 06 Oct 2002 Posts: 323
|
Posted: Sun Aug 10, 2003 7:04 am Post subject: |
|
|
I think a script to clock boot time would be great, especially for us laptop users. _________________ -Phil Crosby |
|
| Back to top |
|
 |
mark Tux's lil' helper

Joined: 04 Jun 2002 Posts: 119
|
Posted: Sun Aug 10, 2003 10:38 am Post subject: |
|
|
[quote="Safrax"] | siti wrote: | To seem like your computer is booting fast you could edit /etc/init.d/xdm and put "before *" in depend. So xdm/gdm/kdm will come up first and your computer will continue to load other services but it will still be usable! Optionally you could add "sleep 5" before eend 0 so xdm loads quickly then the other services continue.
I guess this would be simlair to what windows me/xp + does. |
I added this and get a circular dependency,
root # rc-update add xdm default
* xdm added to runlevel default
* Caching service dependencies...
* Services 'xdm' and 'checkroot' have circular
* dependency of type 'ibefore'; continuing... [ ok ]
* rc-update complete.
Pesumably I need to be more specific?
Mark _________________ Regards
Mark |
|
| Back to top |
|
 |
syadnom Guru


Joined: 09 May 2002 Posts: 531
|
Posted: Mon Aug 11, 2003 1:01 am Post subject: ok. |
|
|
in /et c/init.d/xdm you should have. this should place it before everything except checkroot.
need checkroot
before * |
|
| Back to top |
|
 |
rgm n00b

Joined: 29 Aug 2002 Posts: 4
|
|
| Back to top |
|
 |
Safrax Guru

Joined: 23 Apr 2002 Posts: 419
|
Posted: Fri Sep 19, 2003 12:53 am Post subject: Re: Saw this on IBM DeveloperWorks - re: paralellizing |
|
|
Gentoo already has that. There's a setting in /etc/conf.d/rc along the lines of Parallel startup that simply requires a change from no to yes and a reboot to make sure its working.. |
|
| Back to top |
|
 |
tapir n00b


Joined: 11 Jan 2003 Posts: 5 Location: Maastricht, Netherlands
|
Posted: Fri Sep 19, 2003 7:25 am Post subject: RC_PARALLEL_STARTUP="yes" |
|
|
I haven't seen any major improvements when setting this property. The startup still waits for a major NFS file system export, while that shouldn't block say apache from starting.
Who wrote this script? Perhaps (s)he can exlain what it does?? |
|
| Back to top |
|
 |
nephros Advocate


Joined: 07 Feb 2003 Posts: 2130 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Fri Sep 19, 2003 3:04 pm Post subject: |
|
|
It also often saves a little time to pass "reboot=warm" to the kernel command line.
This skips the BIOS mem test (among other stuff) on reboot.
(This applies for i386, check /usr/src/linux/arch/<arch>/boot/reboot.c for other archs.) _________________ Please put [SOLVED] in your topic if you are a moron. |
|
| Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 15989 Location: Colorado
|
|
| Back to top |
|
 |
rgm n00b

Joined: 29 Aug 2002 Posts: 4
|
Posted: Fri Sep 19, 2003 4:16 pm Post subject: Re: Saw this on IBM DeveloperWorks - re: paralellizing |
|
|
| Safrax wrote: | | Gentoo already has that. There's a setting in /etc/conf.d/rc along the lines of Parallel startup that simply requires a change from no to yes and a reboot to make sure its working.. |
There's nothing like that on my system.
The header to my rc file: | Code: |
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/rc,v 1.9 2003/03/09 09:06:23 azarah Exp $ |
|
|
| Back to top |
|
 |
bushwakko Guru


Joined: 25 Mar 2003 Posts: 495
|
Posted: Fri Sep 19, 2003 5:06 pm Post subject: me too.. |
|
|
I don't have it either, same header.
I WANT IT, AND I DON'T HAVE IT ;)
that's just nasty _________________ Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb |
|
| Back to top |
|
 |
mark Tux's lil' helper

Joined: 04 Jun 2002 Posts: 119
|
Posted: Fri Sep 19, 2003 5:36 pm Post subject: |
|
|
I've not had a chance to look at it but I saw this link posted on slashdot in relation to fast booting
http://www.fefe.de/minit/
Mark _________________ Regards
Mark |
|
| Back to top |
|
 |
trikke n00b


Joined: 08 Jul 2003 Posts: 35
|
Posted: Mon Sep 22, 2003 5:43 pm Post subject: |
|
|
[quote="mark"] | Safrax wrote: | | siti wrote: | To seem like your computer is booting fast you could edit /etc/init.d/xdm and put "before *" in depend. So xdm/gdm/kdm will come up first and your computer will continue to load other services but it will still be usable! Optionally you could add "sleep 5" before eend 0 so xdm loads quickly then the other services continue.
I guess this would be simlair to what windows me/xp + does. |
I added this and get a circular dependency,
root # rc-update add xdm default
* xdm added to runlevel default
* Caching service dependencies...
* Services 'xdm' and 'checkroot' have circular
* dependency of type 'ibefore'; continuing... [ ok ]
* rc-update complete.
Pesumably I need to be more specific?
Mark |
i'm having the same problems
even without the need "checkroot" |
|
| Back to top |
|
 |
garn Tux's lil' helper

Joined: 10 Sep 2003 Posts: 131
|
Posted: Tue Sep 30, 2003 2:12 am Post subject: |
|
|
at the very end of /sbin/rc-envupdate.sh it says:
which is SLOW and doesn't need to be run every time so replace with:
| Code: | else
if [ /etc/env.d -nt /etc/profile.env ]; then
parse_envd
fi
fi
|
which means if anything in /etc/env.d has been changed since /etc/profile.env was generated, then regenerate it.
saves a good 5-10 seconds.
i'm looking at speeding up depscan.sh, it takes FOREVER. |
|
| Back to top |
|
 |
trikke n00b


Joined: 08 Jul 2003 Posts: 35
|
Posted: Tue Sep 30, 2003 6:59 am Post subject: |
|
|
what version of the script do u use ?
i have "env-update.sh,v 1.1 2003/05/12"
and have other code at my end of the file
| Code: |
else
/bin/gawk -v SVCDIR="${svcdir}" \
-f /lib/rcscripts/awk/functions.awk \
-f /lib/rcscripts/awk/genenviron.awk
fi
|
|
|
| Back to top |
|
 |
garn Tux's lil' helper

Joined: 10 Sep 2003 Posts: 131
|
Posted: Tue Sep 30, 2003 8:31 pm Post subject: |
|
|
/home/cvsroot/gentoo-src/rc-scripts/sbin/rc-envupdate.sh.bash,v 1.2 2002/11/18 13:07:02 azarah Exp $
hrmm i have v1.2 and you have v1.1 and yours is newer... but that says env-update.sh not rc-envupdate.sh
i'll emerge the latest rc-files thing and see what that is |
|
| Back to top |
|
 |
garn Tux's lil' helper

Joined: 10 Sep 2003 Posts: 131
|
Posted: Tue Sep 30, 2003 9:02 pm Post subject: |
|
|
/home/cvsroot/gentoo-src/rc-scripts/sbin/rc-envupdate.sh.bash,v 1.2 2002/11/18 13:07:02 azarah Exp $
hrmm i have v1.2 and you have v1.1 and yours is newer... but that says env-update.sh not rc-envupdate.sh
i'll emerge the latest rc-files thing and see what that is.
okay all emerged. env-update.sh is the new version and it's not nearly as slow as the old. |
|
| Back to top |
|
 |
|