X startup times: Jaunty vs. Moblin

Robbie Williamson robbie at canonical.com
Sat Mar 14 03:49:19 GMT 2009


Would using the bootgraph.pl kernel script help here...if we are thinking it may be something in the kernel causing the delay?

-Robbie
Sent via BlackBerry by AT&T

-----Original Message-----
From: Bryce Harrington <bryce at canonical.com>

Date: Fri, 13 Mar 2009 18:44:11 
To: Scott James Remnant<scott at ubuntu.com>
Cc: Timo Aaltonen<tjaalton at cc.hut.fi>; Matt Zimmerman<mdz at canonical.com>; Ubuntu Development<ubuntu-devel at lists.ubuntu.com>
Subject: Re: X startup times: Jaunty vs. Moblin


On Thu, Mar 12, 2009 at 03:32:19PM +0000, Scott James Remnant wrote:
> Here's a boot-performance related challenge for X efficianados amongst
> you.
> 
> The attached file black-jaunty-20090310-4_cropped.png shows a bootchart
> for Jaunty on a Dell Mini 9.
> 
> You'll note that the Xorg server takes roughly four seconds to start
> (from 9.5s to 13s) before it calls the X session manager, and thus
> begins the login to GNOME.
> 
> 
> The attached file white-moblina1-20090312-1.png shows a bootchart for
> Moblin Core Alpha 1 on the same hardware.
> 
> You'll note that the Xorg server takes significantly less time to start,
> in fact, roughly 1.5s (from 2s to 3.5s) before it calls the session
> manager.

I've done some further analysis on this.

We can break the X boot sequence into four phases:

 I.   0   - 2.7 sec   X init
 II.  2.7 - 3.5 sec   ??
 III. 3.5 - 5.8 sec   Session startup
 IV.  5.8 - 7.8 sec   Client X activity (monitor probing)

Phase IV was already discussed on the other leg of this thread; the
sequence of EDID messages in Xorg.0.log is probably just
gnome-session-daemon doing its stuff, nothing we really care about.

Phase III we don't care about either, that's just regular boot stuff.

Phase II is a mystery; the Xorg.0.log doesn't cover this period.
See below for suggestions.

Phase I we've got data so can look at more closely.  See the attached
spreadsheet for details.  Comparing the times it reaches different key
landmarks reveals that several specific steps of the init process have
been hugely optimized:

0. Moblin does its DRM kernel operations faster than Ubuntu.
   This is a sequence of [drm] operations none really stands out
   individually but the whole total is a lot faster.
   Fwiw, Moblin is using UXA for this, Ubuntu uses EXA.
   Ubuntu: 0.83 sec       Moblin: 0.46 sec         = 372 msec improvement.

1. Moblin loads the libvgahw.so faster than Ubuntu.
   Ubuntu: 0.33 sec       Moblin: 0.0003 sec       = 325 msec improvement.

2. Moblin does its PCI probing much faster than Ubuntu.
   Ubuntu: 0.31 sec       Moblin: 0.05 sec         = 260 msec improvement.

3. Moblin loads up UXA much faster than Ubuntu loads EXA
   Ubuntu: 0.17 sec (EXA) Moblin: 0.002 sec (UXA)  = 169 msec improvement.

4. Moblin loads the AT keyboard device from HAL faster than Ubuntu.
   Ubuntu: 0.19 sec       Moblin: 0.026 sec        = 168 msec improvement.

5. Moblin does its xf86ClaimFixedResources() call faster
   Ubuntu: 0.17 sec       Moblin: 0.078 sec        =  94 msec improvement.

6. Moblin does its EDID probing faster than Ubuntu.
   Ubuntu: 0.26 sec       Moblin: 0.174 sec        =  83 msec improvement.

The rest of the differences look to be just noise - nickels and dimes.

To generalize, it appears they:

  * Benefit a lot from kernel UXA/DRM performance changes
  * Made module loading faster (maybe compiled in?)
  * Do hardware probing INCREDIBLY faster.  I wonder if they're even
    skipping the HW probing and caching or embedding the data?


Now briefly on Phase II...

The moblin case does not have a comparable time period to this, so it
seems to be something Ubuntu is doing that they're not, and it costs 800
msec.  There are no messages in the Xorg.0.log for this period, so it's
not X startup activity.  The boot chart seems to show a quiescent period
followed by some activity; is something going on in the kernel that X is
waiting on?  You might want to look at an strace or cross-reference this
time period with the kernel logs might to shed some light as to what's
going on.


Hope this helps,
Bryce



More information about the ubuntu-devel mailing list