36
www.xbosoft.com 1 erformance Testing - Part 2 – Testing the Server

Mobile Performance Testing - Testing the Server

  • Upload
    xbosoft

  • View
    2.358

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mobile Performance Testing  - Testing the Server

www.xbosoft.com

1

Mobile Performance Testing - Part 2 – Testing the Server

Page 2: Mobile Performance Testing  - Testing the Server

Assumptions, Target Audience• This webinar will cover the role of the server in mobile

performance, how to test for it, and what can be done.• Focus on mobile website performance• Performance testing of the mobile app/device was covered

in a previous webinar.• Performance testing emphasizing the network will be

covered in a future webinar– March 14 at 10 AM EST 2013

• Target audience – managers, developers, testers

Page 3: Mobile Performance Testing  - Testing the Server

Agenda• Introduction: The Mobile Challenge• Differences between Mobile and Desktop usage• Know what is going on behind the scenes – 1st Step, a Simple Comparison Test– 2nd Step, a Simple Performance Test– 3rd Step, a Simple Load Test

• Optimization Strategies• Conclusion

Page 4: Mobile Performance Testing  - Testing the Server

Introduction: The Mobile Challenge• Mobile Internet usage is projected to pass desktop Internet

usage in 2014• Google found that a .5-1 second increase in page load time

resulted in a 20% decrease in traffic and revenue.• Akamai found that the number of users who abandon a page

after 3 seconds was 57%.• We expect the online experience to be as fast as our desktop

experience, but it isn’t, and that is a problem.• Mobile is slower, but it doesn’t have to be.

Page 5: Mobile Performance Testing  - Testing the Server

2013 State of Mobile Testing SurveyDifferences Between Desktop and Mobile QA processes• 30% of mobile developers believe that the differences

between mobile and desktop are significant enough to have different processes for development and QA.

• An additional 25% don’t have different processes for mobile, but think that different processes for mobile are necessary.

- 2013 State of Mobile Testing, XBOSoft

• Report of the survey findings can be found at www.xbosoft.com/knowledge_center/ from March 2013

Page 6: Mobile Performance Testing  - Testing the Server

What are the Differences between Mobile and Desktop?

Page 7: Mobile Performance Testing  - Testing the Server

Differences between Mobile and Desktop

Fat vs. Thin data pipe:

Fat, high speed, Broadband data pipe

Thin, slow, 2.5G or 3G data pipe

The Cloud

Page 8: Mobile Performance Testing  - Testing the Server

Differences between Mobile and Desktop

Many Tower connections: • Jumping from tower to tower can slow down

your connection by an order of magnitude.

Page 9: Mobile Performance Testing  - Testing the Server

Differences between Mobile and DesktopSmaller, less powerful device: Your mobile device has a less powerful CPU, less RAM and a smaller

screen resolution. The server needs to take this into account.

Navigation: Your finger is used to navigate so touches have to be translated into clicks.

Page 10: Mobile Performance Testing  - Testing the Server

Differences between Mobile and Desktop

Downloading Strategies:• Some websites preload all the next level pages.

– This can greatly speed up the user experience for the desktop, but for the mobile device, it takes up valuable bandwidth and can be costly.

• Some anticipate what you might click on next and preloads those pages.

Charging for Data Usage: • In many countries, data usage can be expensive.

Page 11: Mobile Performance Testing  - Testing the Server

m.site vs. apps vs. full website

Three approaches to making you website accessible to mobile devices

1. m.site – the most common approach + designed for mobile makes it faster and easier to read – two versions of your website – features missing or accessed differently cause user discontent

2. Mobile app – resides on mobile device + Highly optimized for that mobile device– User may not download app or keep it up to date

3. Mobile Accessible of full website + One version of website, common user experience – can compromise main website, harder to program

Page 12: Mobile Performance Testing  - Testing the Server

Know what you are testing

Proxy Servers: What are they?

GPRS

Internet

Proxy Server

Two Examples :• Nokia devices and • Opera mini browsers

Website Server

Page 13: Mobile Performance Testing  - Testing the Server

Know what you are testingProxy Servers: How do they affect your testing?• Nokia devices and Opera mini browsers• Can reduce by up to 90% the amount of data

transferred.• Speed and Cost savings can be considerable• most users will NOT access your servers through a

proxy server• make sure you are testing in non-proxy server

environments

Page 14: Mobile Performance Testing  - Testing the Server

1st Step, a Simple Comparison TestSimple load performance test on XBOSoft’s main page and several of its key pages. Not thorough, but a quick check. Of course an automated smoke test is preferred, but this is a quick fist step for those starting.

Compare XBOSoft’s1. full version website, xbosoft.com, from the desktop.2. xbosoft.com, from the mobile device.3. m.xbosoft.com, from the mobile device.

Page 15: Mobile Performance Testing  - Testing the Server

1st Step, a Simple Comparison Test1. full version website,

xbosoft.com, on the desktop

3. m.xbosoft.com, on the mobile device

2. xbosoft.com, on the mobile device

Page 16: Mobile Performance Testing  - Testing the Server

1st Step, a Simple Comparison Test

• Download speed was reduced by 40% on the first download from the full website to the m. website.

• However for a repeat download, the reduction in time was only 7%.

Page 17: Mobile Performance Testing  - Testing the Server

Tools• Webpagetest – webpagetest.org

– Quick and easy to start– Offers connection analysis, page loading waterfall analysis, first view

and repeat view analysis, a report card and much more

• Akamai has a simple test for your mobile device - http://mobitest.akamai.com/m/index.cgi– Doesn’t differentiate between first run and repeat runs with caching.– Very simple, but good for getting started

• howtogomo.com– Quick and easy

• Plus many, many more

Page 18: Mobile Performance Testing  - Testing the Server

2nd Step, a Simple Performance Test

• Test with WiFi, take the network out of the equation.• The Network part of the equation will be discuss in

Mobile Performance Testing Part 3: the Network• Goal is to make phone as fast as desktop without

having network involved

Page 19: Mobile Performance Testing  - Testing the Server

2nd Step, a Simple Performance Test

Test with webpagetest.org• It is free.• Run by WPO Foundation whose goal is to “support Web

Performance Movement”.• A quick way to identify areas that are causing

performance problems.• Mainly for desktop testing, but it good for a quick test for

iOS or Android 2.3

Page 20: Mobile Performance Testing  - Testing the Server

2nd Step, a Simple Performance Test

webpagetest.org provides• A summary.• The load times, for both first and repeat downloads.• Connection analysis.• Detailed look at each component downloaded.• Plus much more.

Page 21: Mobile Performance Testing  - Testing the Server

2nd Step, a Simple Performance Test

Page 22: Mobile Performance Testing  - Testing the Server

2nd Step, a Simple Performance TestGo to webpagetest.org and enter• Website url• Test location – choose from almost any where in the world• Browser/device

For this Simple Performance Test, we chose• Website url – xbosoft.com and m.xbosoft.com• Test location – Dulles VA• Browser/device - iPhone 4 iOS 5.1

This will analyze the performance of your website, from this specified location and this specified device/browser.

Page 23: Mobile Performance Testing  - Testing the Server

2nd Step, a Simple Performance Test

• First Byte Time – time for receiving first byte for the page.• Keep Alive Enabled – connection socket is kept open so that many objects

can use it.• Compress Transfer – compress object types “JavaScript” or “text”.• Compress Images – compress object types “image”.• Cache Static Content – controls expiration of objects in cache.• CDN Detected – Content Delivery Network, Is a distributed system of

servers being used? – to be discussed in detail in next webinar

Page 24: Mobile Performance Testing  - Testing the Server

2nd Step, a Simple Performance Testwebpagetest.org

Gives the same information as our ‘Simple Comparison Test’, but with an automated tools.

Page 25: Mobile Performance Testing  - Testing the Server

First View for xbosoft.com

Ten connection sockets were opened, many stayed open to retrieve many objects, which increases performance.

Page 26: Mobile Performance Testing  - Testing the Server

First View – Waterfall of Objects•The number of objects

requested is a lot for a mobile device.•To speed up the first

download, many of the objects need to be combined.•The repeat download

was so much faster because most of these objects were cached.

Page 27: Mobile Performance Testing  - Testing the Server

Repeat View for xbosoft.com

Dramatic decrease in connections and objects which resulted in dramatic decrease in response time.

Page 28: Mobile Performance Testing  - Testing the Server

First View for m.xbosoft.com•The number of

objects was cut from 50 to 20•The number of

connections was cut from 10 to 3

Page 29: Mobile Performance Testing  - Testing the Server

Repeat View for m.xbosoft.com

•Caching cut the number of bojects in half.

Page 30: Mobile Performance Testing  - Testing the Server

3rd Step, a Simple Load TestAt a minimum, Simple Load Test should be done• start with a server that has been load tested for the desktop.• simulate the 500 desktop users.• add one mobile user at a time and monitor the effect on the server.

Simulate 500 users

Add mobile user 1 at a time

Page 31: Mobile Performance Testing  - Testing the Server

Optimization Strategies

• 80% of the time it takes for a web page to load is on the client side

• The server has to change what it delivers to make the client’s job easier.

Two main Strategies1. Reduce transmissions2. Reduce payload

Page 32: Mobile Performance Testing  - Testing the Server

1) Reducing the number of HTTP Requests

Why will this help?- Round trip with a broadband connection can be 1-30 milliseconds- Round trip for a 2.5G or 3G network is usually 300-400 milliseconds (and it

can be a lot worse).- Round trip for a 4G network is typically 200+.

What can be done?– Consolidating Resources– Embed resources in html for first-time use– HTML5 Web Storage– Uni-directional server update

Page 33: Mobile Performance Testing  - Testing the Server

2) Reduce PayloadsWhy will this help?– Less data transferred, less time spent– If over device hw capacities, reducing payload can mean the

difference between loading a page and a page failure

What can be done?– Compress– Resize– Simplify

Page 34: Mobile Performance Testing  - Testing the Server

Future Solution?Those that favor ‘making your full website more mobile

friendly’ is the future solution because of1) Moore’s Law for computer power and storage, and2) Nielsen’s Law for Internet bandwidth.

Page 35: Mobile Performance Testing  - Testing the Server

Conclusion• Test early, test often.• Best way to solve mobile performance problems is

to prevent them. Don’t wait until after deployment to start worrying about performance issues.

• You don’t need complicated, expensive tools to get started, a lot can be done simply.

• No server performance testing will lead to disaster!

Page 36: Mobile Performance Testing  - Testing the Server

Q & A

Follow us on twitter: @XBOSoft

www.xbosoft.com/knowledge_center/