You are not logged in.
Pages: 1
First Youtube video: Eeepc 2G surf booting to X windows in 10 seconds.
Okei, booting system in video isn't real life system (even though most of stuff works and am using daily), but something what i am using to check how fast Eee can boot and what are the limiting factors. So it is merely proof of concept of that eee:s UI can started in 10sec and behind scenes stuff takes couple seconds more. Tthis writing is kind of public notes of my testing. General idea is that linux should be able to boot very fast (like in seconds) and 30sec-60sec boot times are just bad design and even Asus implementation could be done better.
My configuration in video contains
EeePC 2G surf 800Mhz with modified Asus Xandros
- Bios #0129 - all hardware enabled; quiet, quick and boot booster enabled
- Grub2 + 915 resolution hack
- Kernel: Linux 2.6.21.4-eeepc (from Asus) basically vesafb and everything else is compiled as modules
- finit-mod
- xserver-xfbdev (Kdrive) + icewm + dfm
- services.sh (almost same what is in Xandros)
-- also lot of testing and small edits which mostly didn't have any real effect to boot times.
Some files and bootcharts
How to read those bootcharts: Watch loads in general and not exact times. Timeline includes time in BIOS, Grub menu etc and i had also variation with sleeps in services.sh so there is major differencies between setups (eg. they can't be compared by side by side). Also noted that bootchartd is in 'profile running system' -mode and not in default init mode.
- kconfig , grub.cfg and dmesg from init=/bin/sh.
- bootchart: Almost original Asus setup
- bootchart: Fastest setup what i got with real X (15-20sec)
- bootchart: Kdrive+icewm (this is setup in video and what i use) (10 sec)
- bootchart: Kdrive+blackbox (8 sec)
So what makes it faster than default Xandros easy mode which boots in 34second ?
Easy stuff (eg stuff which doesn't limit the functionality)
- No AsusLauncher
- No Power monitor
- No Unionfs
- No initrd
- Moved/removed Scim to start more nicely (it is darn heavy to start)
- Ext3 mounts very slowly so Ext2 is better (and booting in readonly mode at most of the boottime helps also)
- compile touchpad driver as kernel module and load it with modprobe at background (it has slow init)
- generally: compile everything in kernel to modules
- /sbin/finit-mod is faster than original /sbin/fastinit (it sleeps less or something)
Extreme stuff
- Use framebuffer instead of native drivers in X-windows (vesafb starts lot faster, but it is unaccelerated)
- use kdrive instead of xorg's big x-server
- Enable BIOS "Boot booster" (Warning: it breaks things. eg. Battery doesn't found on boot. etc. )
- optionally: use faster windowmanager than icewm (blackbox, jwm, matchbox etc)
Some stats
- Fastest time what i could boot to init=/bin/sh (by kernel messages) was 5.4second
- Fastest boot time to xserver-Xfbdev + blackbox was 8s
- Boot booster effect is 3second in 2G Surf
- Eeepc 4G is 10% faster to boot than 2G surf, so Bios overclocked 4G should be a lot faster (20-30% ?)
So what if this is not enough, what to test next? (some ideas)
- Faster bootloader
- Kernel modifications (example: paraller device probing)
- Using SquashFS when booting to full X
- Fedoras OneSecondX -project
- Booting full X up with Tuxonice keep image -mode. (probaply slower than 10sek, but it could be usefull for jumpstarting large apps eg. X, Compiz, Firefox etc )
Further information
- Benob's: Eee-Pc fast boot with Ubunutu (detailed writing howto boot ubuntu very fast with kdrive and fastboot.sh)
- eeeXubuntu using finit (fastinit reimplementation)
- EeePCLinuxOS > Fastinit
Last edited by zache (2008-04-25 10:56:04 pm)
Offline
Wow! I'm very impressed zache! Want to see how much faster you can make this! Well done!
There is a small latency decrease (faster booting) with Intel's C Compiler over GCC. This is mainly due to SSE vectorisation. Can't get it to compile a kernel yet, however it will help with kdrive and finit-alt. If you have problems with either - drop me a PM as it is mainly just header's for ANSI compliance.
A Realtime kernel on the EEE is faster to boot - but not with wireless. This is mainly due to the ath5k and madwifi-ng driver not supporting realtime.
Adding "i8042.dumbkbd=1" to the kernel line in grub helped with the synaptics driver jamming up the kernel. I also add "force-hpet" - but HPET is not as quick to load as old style RTC - so until tickless becomes the norm (i.e. faster) it may be better to do things the old fashioned way.
The Gallium project will (hopefully) replace MESA and improve acceleration - it is much smaller codewise and should boot quicker - I personally lack knowledge enough to get it working, but it looks very promising.
Good luck - and can't wait to see your 9 second boot into X.
Offline
Wow, very nice work! I have been dreaming of a system that boots this fast, so this looks like this will be a good source of information!
As for the HPET vs RTC, the tickless kernel allows the CPU to sleep longer which should result in better battery life. On the other hand I read the CPU of the Eee still uses about the same amount of power in low-power mode, anyone have any definate answers?
Offline
Metalshark: I wonder if (we don't care if configuration is usable ) time could be under 5s. Basically time is (POST + Bootloader +Kernel) 5s or 6s + (fastinit+Xfbdev+blackbox) 1 or 2 sec . So question is how we can make our kernel boot faster or init start earlier. And if so, then userspace will follow
Usable configuration for 5/6sec boot could be: 1.) boot fast as possible to X, 2.) ask pin/login 3.) do rest of boot at background when UI waits human interaction and for user everything would seem to be instant.
But right now i am installing ubuntu to test how easy or hard is implement finit stuff there, so next thing is slower boots for some time, but it is probaply more usefull than trying to boot eee in 5sec ![]()
btw: do anybody have any ideas how to get /proc/acpi/battery/BAT0 working when "boot booster" is enabled? Right now my battery just doesn't exist for linux if it is enabled and it somehow renders setting to unusable. Also does anybody knows if it works in windows?
Last edited by zache (2008-04-27 7:40:53 am)
Offline
Excellent work, would love to see ubuntu load this fast
Offline
The EEE's Celeron can't clock up or down dynamically - we can change the FSB's frequency and hi/low voltage option - and that's it. You can only save power by being idle (the power save scheme artificially inserts idle ticks). Hence tickless is a good idea. It's new though and therefore not as fast... yet.
Going down a laptop repair shop (lots in London) you can pick up a Pentium M 773 very cheaply and get it replaced (BGA processor replacement). It is capable of changing it's own speed and power requirements - without BIOS modding it'll run at a peak speed of 910MHz and if you're a light CPU user it'll save you battery life.
The only easy way to get really small boot times would be to copy of the idea of boot booster - but for the OS. For instance if we meddle with the suspend to disk code, take a snapshot of X loaded (before the background services) then load it from disk everytime the EEE is turned on. Need UDev and HAL to be ultra polished though - to deal with devices being detected upon boot up.
Minix can boot up in less than 3 seconds - so there is hope yet :-D
Offline
Sorry to bring a dead thread back to life but i thought it was better to post here than start a new one.
System is 4G non surf with 2G of ram. No overclocking at all. Boot Booster enabled.
OS is Gentoo with 2.6.25 Kernel. Im also using OpenRc.
Instead of using agetty to spawn a terminal on tty1 I have it startx. I also have a few services start up after X starts like sshd and cron. Im using fluxbox as the wm. There is a really long pause after init startx. The display turns black and the backlight turns off then on then off then on again and finally X starts. Not sure whats up with that. All and all I can go from cold boot to X in 21secs with very minor modifications. Im sure if can streamline the kernel and make X faster i could get down to the 12-15 secs easily. Here is my bootchart file if someone could look over it. I have no idea what most of it means.
http://micahzellers.com/boot.png
edit: Forgot to add that my usr dir is squashed with an aufs filesytem over top.
Last edited by micah (2008-06-05 11:23:56 am)
Offline
Hmm, based on your bootchart 21secs is actually very good (kind of that my guess is that my 2G would boot slower with same configuration and Xandros/Debian). I wonder if it because Gentoo comples binaries for specific platform, 4G:s higher Mhz or because more memory than in my 512MB.
Anyway, from your bootchart. Udev takes lot of time at beginning of the boot and it delays all other things, so it would be first thing what i would optimize (I would probaply just background or remove it). Sourcejedi wrote that he has patch for Udev to speed things up and it could be more elegant solution. (see this thread)
Secondly i would check why hwclock is taking so long in bootchart (it looks something which can backgrounded)
Third thing is that the Xandros fastinit is so fast because it starts X basically fast as possible and runs rest init scripts (services.sh) paraller with X- Your system does basic init stuff first and after that it runs rest of the system (like X).
Though starting X earlier than system is ready surely breaks stuff, but it is kind of easily doable and doens't break things much (Xandros proves it). So if you want to test it you could start startx directly from initscripts and see if it starts or fails (and why). Starting X just before hwclock looks like good place for first test.
Also this thread is maybe intresting. ( btw Finit / fastinit isn't really that much faster than doing same stuff from normal init, so switching normal init / openrc to finit for speed doesn't help. The Finit's big thing is that if you are breaking your system MUCH, it allows to change system in a ways that normal init doesn't allow)
Last edited by zache (2008-06-06 12:35:42 pm)
Offline
I actually tried starting X with and init script but for some reason the keyboard stops responding.
Offline
Yeah, i had same issue, though with puppy linux which uses normal init. I solved it with switching to finit, but before i did it i noticed that X loses keyboard focus if X starts before parent script dies (or if it starts before init spawns terminals?). I never tried to diagnose why it really loses keyb though and init scripts what i used in my puppy linux were way simpler than your openrc scripts.
Offline
Im actually very happy with the boot speeds so i think im going to stop tinkering with it unless someone has another suggetion. I might wipe out my winxp partition and mess around with another distro and see if i can do better.
Offline
While going through dmsg last night, I found something interesting. (If it's something you've already considered, or doesn't apply, please ignore ![]()
The Intel hardware random number generator module (intel-rng.ko) attempts to load fairly early in my bootup process; and I noticed it takes about a second before it fails with:
"intel_rng: FWH not detected"
That process of checking and failing takes about a second.
Might be worth a shot to add "blacklist intel-rng" somewhere under /etc/modprobe.d
or even just delete the module itself.
Hope this helps ![]()
Offline
That is actually a good tip. I ended up having it built in the kernel and it did make a small difference.
Offline
Pages: 1