[LIVE] Our ideas for optimizing XBMC Live (Linux OS) for shorter perceived boot-time?

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
BLKMGK Offline
Donor
Posts: 1,740
Joined: Jul 2006
Reputation: 4
Location: USA Virginia
Post: #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)
(This post was last modified: 2008-07-05 18:56 by BLKMGK.)
find quote
flyingrat Offline
Senior Member
Posts: 258
Joined: Jul 2008
Reputation: 5
Location: Sweden
Thumbs Up  Important project objective
Post: #17
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)
find quote
deeceefar2 Offline
Junior Member
Posts: 12
Joined: Jul 2006
Reputation: 0
Post: #18
Here is a guide I found, it is a bit older, but still relavent:

http://ubuntusoftware.info/Howto_tweak_u...imate.html
find quote
Ryuzaki Offline
Junior Member
Posts: 27
Joined: May 2008
Reputation: 0
Post: #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.
find quote
Ryuzaki Offline
Junior Member
Posts: 27
Joined: May 2008
Reputation: 0
Post: #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.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Wink  More ideas for optimizing the boot performance of XBMC Live (and other Linux distros)
Post: #21
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.
find quote
lcapriotti Offline
a.k.a Luigi, Team-XBMC XBMCbuntu Dev
Posts: 816
Joined: Jan 2008
Reputation: 12
Location: Italy
Post: #22
I have read it this morning and found some informative paragraph; I guess Ubuntu will go that way for 9.04.

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.


[Image: badge.gif]
find quote
CapnBry Offline
Fan
Posts: 406
Joined: Oct 2004
Reputation: 0
Location: Tampa, FL USA
Post: #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.
find quote
s7mx1 Offline
Senior Member
Posts: 265
Joined: Dec 2007
Reputation: 4
Post: #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: hardy-20080929-1.png]

[Image: hardy-20080929-9.png]
find quote
s7mx1 Offline
Senior Member
Posts: 265
Joined: Dec 2007
Reputation: 4
Post: #25
Seems like the forum discriminate the letter which stands just before y. In the previous post I was saying to start xwindows early.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #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.
find quote
lcapriotti Offline
a.k.a Luigi, Team-XBMC XBMCbuntu Dev
Posts: 816
Joined: Jan 2008
Reputation: 12
Location: Italy
Post: #27
it would be interesting to talk about your changes for Atlantis+1.
Let's keep in touch ... 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.


[Image: badge.gif]
find quote
s7mx1 Offline
Senior Member
Posts: 265
Joined: Dec 2007
Reputation: 4
Post: #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.
find quote
s7mx1 Offline
Senior Member
Posts: 265
Joined: Dec 2007
Reputation: 4
Post: #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
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #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.
find quote