[LIVE] Our ideas for optimizing XBMC Live (Linux OS) for shorter perceived boot-time?
#16
Doing some of these myself, concurrent booting of system processes on a multicore system sounds useful, I am also looking at nodiratime rather than noatime for safeties sake and feedback on that would be appreciated. turned off all sorts of things like the BT manager, print queue junk, and evolution alarm since I don't use this box for mail. Still looking through suggestions looking for those that won't impact general data safety but provide some boost. What I've done so far seems pretty safe I think and ought to help at least a little.

Edit: found a GUI utility names BUM that looks good for managing services and whatnot. Bootchart also looks interesting but I've not yet run it. with this you can see what part of your boot process is problematic and slowing things.
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#17
Thumbs Up 
webbanane Wrote:I believe one of the most important WAF (women acceptance factor) is the boot-time (and my own acceptance factor in living room). This definitely was the MAIN reason why I prefered to take a proprietary MICROSOFT Xbox with XBMC over a notebook! I believe I can not overstress this fact!

Absolutly, I cannot agree more! This is a very important success factor and should be stated as the main project objective in "The Linux port plan, Milestone 3 - Package XBMC ..." (ref: http://wiki.xbmc.org/?title=XBMC_for_Lin..._port_plan)
--

Lars.
1. XBMC: http://github.com/FlyingRat/xbmc (ffmpeg-head-inc-xbmc-patches)
2. FFmpeg: http://github.com/FlyingRat/FFmpeg (ffmpeg-head-with-xbmc-custom-patches)
3. XBMC-updated-FFmpeg-binaries (just dev snapshots, no regular distros)
Reply
#18
Here is a guide I found, it is a bit older, but still relavent:

http://ubuntusoftware.info/Howto_tweak_u...imate.html
Reply
#19
Use pure Upstart for booting. Seriously, when done properly you have a REAL concurrent boot setup, unlike the current sysv script emulation of upstart in Ubuntu. You can almost negate boot time when done properly. If oyu have a powerful enough machine you can have things start basically instantly in 2-3 waves.

--Core Functions
----Modules
----Any pre-reqs of proprietary driver modules

--User Daemons
----LIRC
----MySQL/Whatever else
----Xorg Pre-reqs

--User-Space Stuff
----Start X, directly starting XBMC
----whatever else

Naturally this is grossly over simplified. I used to do this on my old mythbox to accomplish about a 5 second boot. I Accomplished this by moving parts of the generic schema above to user-space scripts, excluding MySQL, which at the time needed to load well before the MythTV server for me. But that's probably of no matter to most people.

Things like Apache, and the like could easily be rigged via startx, although that's a little hackish.

My recommendation is look in /etc/init.d pick out what you really need (I STRONGLY suggest reading up first), plot it out on a web. And then clear (backup) event.d, and start working on your own script hierarchy. After doing this with the bare bones, you can start adding more and more to it. Note: it gets very complex very quickly, so start basic, and go from there.
Reply
#20
Forgot to mention that essentially your event.d scripts, for simplicity, will just point to /etc/init.d/* for various start stop reload calls. Otherwise it would take a far greater amount of time... but probably you would also cut a few more seconds off going Pureblood upstart.
Reply
#21
Wink 
New article about improving boottime on a general Linux distribution:
Blog post by Fredric Crozat (a.k.a. samedi, a Mandriva developer) on 27th of September 2008.
http://blog.crozat.net/2008/09/improving...linux.html

Makes for an interesting read if nothing else Nod

I think that we for XBMC Live should focus on the "perceived boot time"

Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#22
I have read it this morning and found some informative paragraph; I guess Ubuntu will go that way for 9.04.
Reply
#23
If you haven't seen the video from the Linux Plumbers Conference he references, check this out on youtube. It is shockingly fast, but they say to expect it to be roughly twice as long on "rotational media" vs SSD. CD media I'm not even sure what to expect, I mean super-readahead will certainly help because of the low transfer rate of the device, but access times are so slow I'm wondering if things will get slower as you try to move the reader all over the place.

Anyway, the slides from the show are also available here in pdf. The rest of the original article is already available to LWN subscribers and will be up for everyone else on Oct 2.
Reply
#24
I did some tweaking inside initramfs and init scripts yesterday. Managed to reduce the full boot time from 55s to 30s. However the perceived boot time for the better optimised system is about 47s.

My setup:

Distribution: XBMC Live beta1
Harddisk: san over 100M network, so the max disk throughput is about 10M/s
CPU: Intel Pentenum M 1.6

my setup is quite slow, you probably will get better result using dedicated disk and powerful cpu.

One thing I can think of is to start very early, since it needs time to 'discover' chipset. I will try to use upstart. I hope to reduce the perceived boot time within 30s.

Some bootchart results:

Image

Image
Reply
#25
Seems like the forum discriminate the letter which stands just before y. In the previous post I was saying to start xwindows early.
Reply
#26
Note that it is really only fast boot-time from USB and Harddrives that are important for us to achieve with XBMC Live, ...fast boot-time for the Live CD is secondary.

Wink

s7mx1 Wrote:Some bootchart results
Bootchart is a great visual too for this http://www.bootchart.org

Cool
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#27
it would be interesting to talk about your changes for Atlantis+1.
Let's keep in touch ... Wink
Reply
#28
Gamester17 Wrote:Note that it is really only fast boot-time from USB and Harddrives that are important for us to achieve with XBMC Live, ...fast boot-time for the Live CD is secondary.

Wink

Bootchart is a great visual too for this http://www.bootchart.org

Cool

Hi,

Live CD can be installed on your usb disk or harddrive (using my script). In my case I booted it up from my san box (network booting). So I think It's the case we need put effort on.
Reply
#29
l.capriotti Wrote:it would be interesting to talk about your changes for Atlantis+1.
Let's keep in touch ... Wink


The changes are quite small. What I did was
* optimise scripts in initramfs
remove anything that is not necessary, for example anything related with ntfs, ps3 and nfs
modify boot scripts so it will not check locations that's not necessary (for instance scripts/local-top and scripts/local-premount)
load the most important module first, if you have a usb disk, you probably need to load those usb modules first. In my case I put a single line to ask it to load my network card module b44 above all modules, but the bit*h will not settle down within 4 seconds.
* optimise init scripts
basically just play around the scripts, disable some, change the boot order for example.

I will try later something like this:
http://aldeby.org/blog/index.php/speed-u...-boot.html
Reply
#30
s7mx1 Wrote:remove anything that is not necessary, for example anything related with ntfs, ps3 and nfs
NTFS support is needed though, maybe not directly on boot but later once the GUI is available to the user as XBMC Live should be able to read from any NTFS formatted disk that is used for storage of music/video/picture files (when for example connected via ESATA or USB, or the internal harddrive when booting XBMC Live as a Live CD or Live USB).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
[LIVE] Our ideas for optimizing XBMC Live (Linux OS) for shorter perceived boot-time?2