mobile measurements: the mobile app / OS perspective Why understanding mobile app performance is hard
cellular performance matters to some apps • most demanding apps • multiplayer gaming • VoIP • video chat • somewhat demanding • web search • app interfaces with web services • reasonably irrelevant • network transfers that aren’t in the critical path 26.March.2014 sharad.agarwal@microsoft.com 2
app development environment 26.March.2014 sharad.agarwal@microsoft.com 3
Start screen icons 26.March.2014 sharad.agarwal@microsoft.com 4
The Weather Channel 26.March.2014 sharad.agarwal@microsoft.com 5
Mitt Mitt Rating Rating 26.March.2014 sharad.agarwal@microsoft.com 6
Mitt Mitt Mitt Mitt Rating Rating Rating Rating 26.March.2014 sharad.agarwal@microsoft.com 7
Mitt Mitt Rating Rating 26.March.2014 sharad.agarwal@microsoft.com 8
Mitt Mitt Rating Rating Mitt Romney Internet 26.March.2014 sharad.agarwal@microsoft.com 9
Mitt Mitt Rating Rating Mitt Romney Internet Tweets “If I had a nickel for every time Mitt Romney said something stupid I'd be in his tax bracket” “Mitt Romney might vote for Obama as well” “We recommend Mitt Romney for president” “I would definitely trust Mitt Romney with my money.” 26.March.2014 sharad.agarwal@microsoft.com 10
Mitt Mitt Rating Rating Mitt Romney Internet Tweets “If I had a nickel for every time Mitt Romney said something stupid I'd be in his tax bracket” “Mitt Romney might vote for Obama as well” “We recommend Mitt Romney for president” “I would definitely trust Mitt Romney with my money.” 26.March.2014 sharad.agarwal@microsoft.com 11
Mitt Mitt Rating Rating Mitt Romney Internet 53% Tweets “If I had a nickel for every time Mitt Romney said something stupid I'd be in his tax bracket” “Mitt Romney might vote for Obama as well” “We recommend Mitt Romney for president” “I would definitely trust Mitt Romney with my money.” 26.March.2014 sharad.agarwal@microsoft.com 12
Hypothetical Synchronous Code Mitt Mitt Rating Rating 53% 26.March.2014 sharad.agarwal@microsoft.com 13
Hypothetical Synchronous Code Mitt Mitt Rating Rating ClickHandler () 53% { } 26.March.2014 sharad.agarwal@microsoft.com 14
Hypothetical Synchronous Code Mitt Mitt Rating Rating ClickHandler () 53% { tweets = HttpGet(url); } 26.March.2014 sharad.agarwal@microsoft.com 15
Hypothetical Synchronous Code Mitt Mitt Rating Rating ClickHandler () 53% { tweets = HttpGet(url); rating = ProcessTweets(tweets); } ProcessTweets (tweets) { ... } 26.March.2014 sharad.agarwal@microsoft.com 16
Hypothetical Synchronous Code Mitt Mitt Rating Rating ClickHandler () 53% { tweets = HttpGet(url); rating = ProcessTweets(tweets); display.Text = rating; } ProcessTweets (tweets) { ... } 26.March.2014 sharad.agarwal@microsoft.com 17
Hypothetical Synchronous Code Mitt Mitt Rating Rating ClickHandler () 53% { tweets = HttpGet(url); rating = ProcessTweets(tweets); display.Text = rating; } ProcessTweets (tweets) { ... } Thread Click Handler Click Handler End Start 26.March.2014 sharad.agarwal@microsoft.com 18
Hypothetical Synchronous Code Mitt Mitt Rating Rating ClickHandler () 53% { tweets = HttpGet(url); rating = ProcessTweets(tweets); display.Text = rating; } ProcessTweets (tweets) { ... } Thread Click Handler Click Handler End Start User Perceived Delay 26.March.2014 sharad.agarwal@microsoft.com 19
Asynchronous Code Mitt Mitt Rating Rating 53% 26.March.2014 sharad.agarwal@microsoft.com 20
Asynchronous Code Mitt Mitt Rating Rating ClickHandler () { 53% AsyncHttpGet(url, DownloadCallback ); } DownloadCallback (tweets) { rating = ProcessTweets(tweets); UIDispatch( DisplayRating , rating); } DisplayRating (rating) { display.Text = rating; } ProcessTweets (tweets) { ... } 26.March.2014 sharad.agarwal@microsoft.com 21
Asynchronous Code Mitt Mitt Rating Rating ClickHandler () { 53% AsyncHttpGet(url, DownloadCallback ); } DownloadCallback (tweets) { rating = ProcessTweets(tweets); UIDispatch( DisplayRating , rating); } DisplayRating (rating) { display.Text = rating; } ProcessTweets (tweets) { ... } UI Thread ClickHandler ClickHandler End Start User Click 26.March.2014 sharad.agarwal@microsoft.com 22
Asynchronous Code Mitt Mitt Rating Rating ClickHandler () { 53% AsyncHttpGet(url, DownloadCallback ); } DownloadCallback (tweets) { rating = ProcessTweets(tweets); UIDispatch( DisplayRating , rating); } System DisplayRating (rating) { display.Text = rating; } ProcessTweets (tweets) { ... Async Get Call } UI Thread ClickHandler ClickHandler End Start User Click 26.March.2014 sharad.agarwal@microsoft.com 23
Asynchronous Code Mitt Mitt Rating Rating ClickHandler () { 53% AsyncHttpGet(url, DownloadCallback ); } DownloadCallback (tweets) { rating = ProcessTweets(tweets); UIDispatch( DisplayRating , rating); } System DisplayRating (rating) { display.Text = rating; Download } Callback Background Thread ProcessTweets (tweets) ProcessTweets { ... Async Get Call } UI Thread ClickHandler ClickHandler End Start User Click 26.March.2014 sharad.agarwal@microsoft.com 24
Asynchronous Code Mitt Mitt Rating Rating ClickHandler () { 53% AsyncHttpGet(url, DownloadCallback ); } DownloadCallback (tweets) { rating = ProcessTweets(tweets); UIDispatch( DisplayRating , rating); } System DisplayRating (rating) { display.Text = rating; Download UI Dispatch } Callback Background Thread ProcessTweets (tweets) ProcessTweets { ... Async Get Call } UI Thread ClickHandler ClickHandler End Start User Click 26.March.2014 sharad.agarwal@microsoft.com 25
Asynchronous Code Mitt Mitt Rating Rating ClickHandler () { 53% AsyncHttpGet(url, DownloadCallback ); } DownloadCallback (tweets) { rating = ProcessTweets(tweets); UIDispatch( DisplayRating , rating); } System DisplayRating (rating) { display.Text = rating; Download UI Dispatch } Callback Background Thread ProcessTweets (tweets) ProcessTweets { ... Async Get Call } UI Thread ClickHandler ClickHandler End Display Start Rating User Click 26.March.2014 sharad.agarwal@microsoft.com 26
Apps are highly asynchronous 30 popular apps 167,000 transactions from user study 26.March.2014 sharad.agarwal@microsoft.com 27
Apps are highly asynchronous 30 popular apps 167,000 transactions from user study • On average, 19 asynchronous calls per user transaction • On average, 8 parallel threads per user transaction 26.March.2014 sharad.agarwal@microsoft.com 28
Apps are highly asynchronous 30 popular apps 167,000 transactions from user study • On average, 19 asynchronous calls per user transaction • On average, 8 parallel threads per user transaction For each user transaction, what was the critical path, and did the network matter? 26.March.2014 sharad.agarwal@microsoft.com 29
Mitt Mitt Rating Rating 26.March.2014 sharad.agarwal@microsoft.com 30
Mitt Mitt Tweets Rating Rating 26.March.2014 sharad.agarwal@microsoft.com 31
Mitt Mitt Tweets Rating Rating Posts 26.March.2014 sharad.agarwal@microsoft.com 32
Mitt Mitt Tweets Rating Rating Posts 26.March.2014 sharad.agarwal@microsoft.com 33
Mitt Mitt Tweets Rating Rating 47% Posts 26.March.2014 sharad.agarwal@microsoft.com 34
Mitt Mitt Tweets Rating Rating 47% Posts Background Thread Background Thread Background Thread UI Thread User Transaction 26.March.2014 sharad.agarwal@microsoft.com 35
Mitt Mitt Tweets Rating Rating 47% Posts Background Thread Background Thread Background Thread UI Thread User Click User Transaction 26.March.2014 sharad.agarwal@microsoft.com 36
Mitt Mitt Tweets Rating Rating 47% Posts Background Thread Background Thread Facebook Twitter Background Thread Thread Blocked UI Thread User Click User Transaction 26.March.2014 sharad.agarwal@microsoft.com 37
Mitt Mitt Tweets Rating Rating 47% Posts Twitter Process Callback Fire Tweets Background Thread Background Thread Facebook Twitter Background Thread Thread Blocked UI Thread User Click User Transaction 26.March.2014 sharad.agarwal@microsoft.com 38
Mitt Mitt Tweets Rating Rating 47% Posts Twitter Process Callback Fire Tweets Background Thread Facebook Process Callback Fire Posts Background Thread Facebook Twitter Background Thread Thread Blocked UI Thread User Click User Transaction 26.March.2014 sharad.agarwal@microsoft.com 39
Mitt Mitt Tweets Rating Rating 47% Posts Twitter Process Callback Fire Tweets Background Thread Facebook Process Callback Fire Posts Background Thread Facebook Twitter Background Thread Thread Blocked Thread Wakeup UI Thread User Click User Transaction Display 26.March.2014 sharad.agarwal@microsoft.com 40
Twitter Process Callback Fire Tweets Background Thread Facebook Process Callback Fire Posts Background Thread Facebook Twitter Background Thread Thread Blocked Thread Wakeup UI Thread User Click User Transaction Display 26.March.2014 sharad.agarwal@microsoft.com 41
Recommend
More recommend