Measuring Mobile Web Performance v2


Published on

Measuring Mobile Web Performance presentation at the London Ajax Mobile Conference 2nd July 2011. Covers the basics of web performance measurement and looks specifically at the measurement of page load speed from mobile devices.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Forget what you thought you knew…
  • Here is one reason why a mobile browser isn’t the same as a desktop browser….(on Android) the “web browser” is a Java App calling a C/C++ app which calls another C app…
  • Different bandwidthDifferent latencyDifferent network layer entirely (Backhaul probably isn’t even IP-based…)
  • And if you throw in CyanogenMod you can get even better performance…
  • And if you throw in CyanogenMod you can get even better performance…
  • What type of network is it connected to?
  • I was on the Thames Clipper on my way back from the O2 after a concert. So I ran some automated testing and this graphs my results… Average32.859Median12.071Std Deviation45.691Min9.275Max156.520
  • “Snakes… on a motherf**king plane!” Network latency varies enormously…. What can we see here?The connection is relatively good at sending and receiving data. The green crosses represent packets that were actually lost which only happened for 75 of 1000.There are some crazy-high round trip times. The minimum round trip time was 107ms (which would put my home cable connection to shame) and even the median is pretty awesome at 239ms but the maximum was a whopping 20226 ms - that's more than 20 seconds!
  • Test MarkerTime (Sec)Signal Strength (ASU)19.2753212.681339.68274156.52018512.071969.28513752.86814810.1849923.1658Average32.859Median12.071Std Deviation45.691
  • 1.JavaScript timing e.g. WebTuna, Boomerang, Episodes2.Browser plug-in e.g. HTTPwatch3.Custom browser variant e.g. A Webkit-build (often used as a monitoring agent)4.Proxy timing e.g. Fiddler proxy5.Web Server Module e.g. APM solutions like AppDynamics, Dynatraceetc6.Network-level e.g. Atomic Labs Pion, Tealeaf, Coradiant
  • 2.Browser plug-in e.g. HTTPwatchBut only some mobile browsers have a plug-in architecture… and exactly what timing info that would provide… I have no idea…
  • 4.Proxy timing e.g. Fiddler proxy or Charles ProxyObserver Affect #1 = Affect #2=
  • 5.Web Server Module e.g. APM solutions like AppDynamics, Dynatraceetc
  • 1.JavaScript timing e.g. WebTuna, Boomerang, EpisodesYou can also use YUI Profiler I believe have seen JavaScript warnings appear due to “excessive time in the onBeforeUnload event” – so keep in mind that JavaScript is a lot slower in mobile devices and hence the observer effect is larger (and the timing more accurate).
  • Network tap based solutions are great for measuring your own site, not so great for measuring 3rd party sites.PCAPPerf is limited to WiFi… which isn’t anything like the real “mobile” experience. The mobile network stack is NOT the same as the desktop stack, and the client side delay is larger also. *In theory you can use tcpdump on a rooted phone. More on that later…
  • The mobile network stack is NOT the same as the desktop stack, and the client side delay is larger also.
  • Is a tethered, rooted phone over wifi adequate to your needs?
  • Is knowing what’s happening “on the wire” enough, or do you want to understand what’s happening at the browser level?And the “mobile context” …So lets look at a few in detail…
  • Flexible solution (in theory works with every WiFi enabled phone)But WiFi isn’t mobile…And it’s a faff…
  • Essentially the PCAPPerf approach as SaaSBut it does support iPhone and Android.
  • Currently Android only but PoC code for Blackberry and iPhone exists. iPhone client in 90 to 120 days, all being well.
  • Rooted and Tethered, again…
  • Even a PC-based version of Webkit isn’t the same as webkit running on a mobile device. But useful none the less. Lots of other features and unsurprisingly there is a (expensive) Pro version “The MITE Pro annual user license is $5,000 and includes 100 hours of free remote testing. To learn more about single- and multiple-license purchases, please contact us today.”
  • The mobile network stack is NOT the same as the desktop stack, and the client side delay is larger also.
  • Measuring Mobile Web Performance v2

    1. 1. Stephen Thair, Seriti Consulting, @TheOpsMgr<br />London Web Performance Meetup Group, @LDNWebPerf<br />Measuring mobile performance<br />02/07/2011<br />© Seriti Consulting<br />1<br />
    2. 2. Before we start…<br />3<br />Things to keep in mind<br />02/07/2011<br />© Seriti Consulting<br />2<br />
    3. 3. Desktop<br />≠<br />Mobile<br />02/07/2011<br />© Seriti Consulting<br />3<br />
    4. 4. A Java app calling a java app calling a C++ app using JNI to call a java app….<br />02/07/2011<br />© Seriti Consulting<br />4<br /><br />
    5. 5. Wifi<br />≠<br />Mobile<br />02/07/2011<br />© Seriti Consulting<br />5<br />
    6. 6. WiFivs HSDPA Performance <br />02/07/2011<br />© Seriti Consulting<br />6<br />
    7. 7. Mobile<br />≠<br />Mobile<br />02/07/2011<br />© Seriti Consulting<br />7<br />
    8. 8. Different Phones = Different Performance<br />02/07/2011<br />© Seriti Consulting<br />8<br /><br />
    9. 9. Different operating systems<br />02/07/2011<br />© Seriti Consulting<br />9<br />
    10. 10. Different Browsers…<br />02/07/2011<br />© Seriti Consulting<br />10<br /><br />
    11. 11. Different network types…<br />02/07/2011<br />© Seriti Consulting<br />11<br /><br />
    12. 12. Mobile Performance is location-dependent<br />02/07/2011<br />© Seriti Consulting<br />12<br /><br />
    13. 13. HSDPA… on a #!%&$@*ing train<br />02/07/2011<br />© Seriti Consulting<br />13<br />Max RTT = 20266ms<br /><br />
    14. 14. Page Load times (along the thames)<br />02/07/2011<br />© Seriti Consulting<br />14<br />Off the chart (2m36s)<br />
    15. 15. How many ways are there to measure web performance?<br />And how useful are they on Mobile?<br />02/07/2011<br />© Seriti Consulting<br />15<br />
    16. 16. 6<br />02/07/2011<br />© Seriti Consulting<br />16<br />
    17. 17. 6Browser plug-ins<br />02/07/2011<br />© Seriti Consulting<br />17<br />As used in HTTPWatch, DynatraceAjax Edition etc<br />But only some mobile browsers support plug-ins…<br />
    18. 18. 5Proxy Timing<br />02/07/2011<br />© Seriti Consulting<br />18<br />E.g. Fiddler Proxy (<br />There is no proxy settings in Android unless you root your phone (<br />Only useful for WiFi…<br />Beware the “observer effect”<br />
    19. 19. 4Web Server Module<br />02/07/2011<br />© Seriti Consulting<br />19<br />As used by many APM solutions e.g. Dynatrace, New Relic<br />Install mod_ or ISAPI filter <br />Measure the RTT between web server and DB/Application tier<br />Great for measuring your back-end performance<br />Not much good for front end…<br />
    20. 20. 3JavaScript Timing<br />02/07/2011<br />© Seriti Consulting<br />20<br />As used in Boomerang, Episodes, GA, WebTuna etc<br />OK for web pages, better with new WebTiming and NavigationTiming APIs not that mobile browsers support them…<br />Relies on JavaScript and Cookies… which is problematic…<br />
    21. 21. 2 Network level Timing<br />02/07/2011<br />© Seriti Consulting<br />21<br />As used by PCAPPerf and by Atomic Labs Pion, Tealeaf, Coradiant<br />PCAPPERF limited to over WiFi (otherwise you can’t capture the packets)*<br />Pion, Tealeaf etc require network tap…<br />
    22. 22. 1 Custom browser<br />02/07/2011<br />© Seriti Consulting<br />22<br />As used by (on the phone) and synthetic agents (by active monitoring providers e.g. Site Confidence)<br />At present this is the only way to get real OTA performance data. <br />
    23. 23. 02/07/2011<br />© Seriti Consulting<br />23<br />So what to use?<br />
    24. 24. 02/07/2011<br />© Seriti Consulting<br />24<br />Depends on your needs<br />
    25. 25. 02/07/2011<br />© Seriti Consulting<br />25<br />Development <br />vs<br />“Real World”<br />
    26. 26. 02/07/2011<br />© Seriti Consulting<br />26<br />Network perspective vsBrowser Perspective? <br />
    27. 27. PCAPPerf Testing <br />02/07/2011<br />© Seriti Consulting<br />27<br />WiFi Connection to PC<br />PC acting as Wifi hotspot and capturing packets with Wireshark<br />Upload pcap file to<br />And<br />View the waterfall <br />Upload<br /><br />
    28. 28. Mobitest – <br />02/07/2011<br />© Seriti Consulting<br />28<br />“PCAPPerfas SaaS” + some on-device event capture + screenshots<br />WiFi only<br />Tethered machines in Ottawa, DC, Amsterdam<br />
    29. 29. Mobitest / PCAPPerf waterfall<br />02/07/2011<br />© Seriti Consulting<br />29<br />
    30. 30. “Browser2”<br />02/07/2011<br />© Seriti Consulting<br />30<br />Android Native Browser code instrumented for performance measurement<br />Test Anywhere <br />Full Mobile context – device & location & network<br />Browser-level perspective<br />Screenshots<br />Automated Testing<br />
    31. 31. Device Context<br />02/07/2011<br />© Seriti Consulting<br />31<br />
    32. 32. 02/07/2011<br />© Seriti Consulting<br />32<br />Location Context<br />
    33. 33. 02/07/2011<br />© Seriti Consulting<br />33<br />Network Context<br />
    34. 34. “Browser2” Waterfall<br />02/07/2011<br />© Seriti Consulting<br />34<br />New “detail mode” hybrid waterfall<br />
    35. 35. 02/07/2011<br />© Seriti Consulting<br />35<br />
    36. 36. 3pMobile Open Beta<br />02/07/2011<br />© Seriti Consulting<br />36<br />Register at<br />Download the APK & install <br />Test away!<br />The results from the tests shown today are available<br />Username =<br />Password = ajaxmobile<br />Feel free to take a look (but please don’t delete any tests not your own)<br />
    37. 37. 02/07/2011<br />© Seriti Consulting<br />37<br />So what else is there? <br />
    38. 38. TCP Dump on Rooted phone<br />02/07/2011<br />© Seriti Consulting<br />38<br /><br />
    39. 39. JavaScript Bookmarklets<br />02/07/2011<br />© Seriti Consulting<br />39<br />Steve Souder’s Mobile Performance Bookmarlet<br /><br />None of these measure performance per se, but they can give you more information about the page (but beware of a strong “observer effect”) <br />
    40. 40. Keynote MITE (Emulation)<br />02/07/2011<br />© Seriti Consulting<br />40<br />The free Keynote MITE emulator<br />Webkit-based emulation based on device profiles<br />
    41. 41. Debugging tools<br />02/07/2011<br />© Seriti Consulting<br />41<br />Most SDK’s include debugging tools and profilers that can help you understand what’s going on<br />But you are tethered to your PC (normally)<br />
    42. 42. Watchmouse“IAM” library<br />02/07/2011<br />© Seriti Consulting<br />42<br />In-App Monitoring (IAM) is a set of libraries to help instrument your web apps. Currently iPhone only. <br />Replace your app WebView calls with IAMWebView<br />It will gather the performance data and beacon it out for you<br /><br />
    43. 43. 02/07/2011<br />© Seriti Consulting<br />43<br />And that’s all I’ve got… <br />
    44. 44. 02/07/2011<br />© Seriti Consulting<br />44<br />Questions?<br />Stephen Thair, Seriti Consulting, @TheOpsMgr<br /><br /><br />London Web Performance Meetup Group, @LDNWebPerf<br />Monthly Meetups in Central London (near Bank)<br /><br />