Mobile Application Performance Tips & Tricks to Significantly Boost App Performance Ray Bennett Director, Microstrategy - Mobile Service Line
11km/s (7mps) Escape Velocity Performance Definition What is it and how do we quantify it?
Performance Definition Timely application response to user input, request and command Enables productive navigation, analysis, workflow Does not detract from or negatively impact user experience Application stability Does not freeze, hang, or crash Application meets or exceeds requirements Fits within enterprise architecture and meets security objectives
Why is Performance Important? Application abandonment *From: HP Three Key Objectives for Mobile Testing. http://www8.hp.com/h20195/v2/getpdf.aspx/4aa5-4636enw.pdf
Microstrategy High Performance Initiative A multi-year, multi-million dollar initiative designed to improve our customers system performance. Engineering, Support, Professional Services
Microstrategy High Performance Initiative High Performance Benchmark Testing Lab What is it? Multi-million dollar state of the art lab Over 100 servers covering all major 64-bit OS platforms Multi-terabyte, industry-specific databases What is the charter? Deliver up to 10x faster BI applications Provide faster than 3-second response time for most predictable queries and analyses Provide faster than 5-second response time for the majority of ad hoc queries
Professional Services and the Mobile Service Line One Week Database to end user study of your system MicroStrategy Performance Analysis Workshop Main Deliverables: Performance op,miza,on roadmap - Where you are, where you want to be, and how to get there. Performance Op,miza,on Roadmap 1 Improve 2 Upgrade 3 Enhance System Configura,on Recommenda,ons System configura:on recommenda:ons. Configura,on Recommenda,ons Recommended! Expected Results Performance Monitoring Plan - Understand the tools and metrics you can use to monitor your performance. Performance Monitoring Plan
Tip #1 Tip #1 Consider the Entire System
Microstrategy Mobile Stack Devices Network Mobile Server Intelligence Server Database
Running
What is sent to Device? Document Definition Transport: Highly Compressed Binary File Mobile Server Contains: Document metadata definition Selector Objects Panel Objects Shapes, Lines Data Images (Background, Icons)
Loading
Tip #2 Tip #2 Engineer your Apps for Optimized Performance
Reactive vs. Proactive Reactive Performance Tuning Devices Network Mobile Server Database Intelligence Server Proactive Incorporate Performance tuning in design and development
Tip #3 Enable Caching at All Levels
Rule 1 Optimize Data Query Speed 3 Primary levers influence query speed 1. Optimize metadata designs (In Memory BI (Cubes)) 2. Optimize database design to process SQL faster 3. Optimize VLDB settings 16
Enable Caching Wherever You Can Device level
Device Level Caches Instantiating results on mobile client Devices Network Mobile Server Intelligence Server Database
Caching on Device Multiple methods 1. Live Execution 2. Pre-caching 3. Subscriptions 4. Background Execution
Live Execution
Device Caches In the beginning.live Execution Devices Network Mobile Server Intelligence Server No Device Side Cache! Database
Device Caches Running from Device Disk Cache Devices Network Mobile Server Intelligence Server Database GUI
Pre-caching
Device Caches Pre Caching Can be preloaded at startup Advantages of device caching include: - Can adapt intelligently to user behavior while downloading - Cache can be kept current with an update - Can be used for offline scenarios, once downloaded - Pre-loading status bar shows progress of downloads
Mobile Administrator Configuration Profile
Mobile Configuration Profile Settings Tab Part 1
Mobile Configuration Profile Home Screen Tab
Adaptive Pre-caching Work Flow Linked Dashboard 1 Linked Dashboard 2 Supporting Objects Folder Parent Dashboard Linked Dashboard 3 Linked Dashboard 4
Device Side Settings Caching Device settings for caching behavior
Optimizing Cache Strategies If you encounter trouble, be sure: Clear on Close is set to OFF at Mobile Configuration/Device Level Caching is enabled at appropriate levels - Project, Document, Dataset Level Cache settings are turned ON Adequate memory is allocated to save caches on the Server and Client Look for documents where some component is not cached Cache Expiration settings are high enough Refresh data only as often as needed
Microstrategy Desktop Caching settings Memory storage Make sure you have sufficient space to store datasets Same applies to formatted documents
Microstrategy Desktop Caching settings - Expiration Set cache expiration times per requirement
Microstrategy Desktop Administration Are caches being hit? Check to see if caches are being created and hit
Subscriptions
Subscriptions Work Flow Mobile Device Can serve subscriptions at App Start-up Mobile Server Subscriptions generated and caches stored in History List Inbox Intelligence Server
Subscriptions Advantages of Subscriptions include: - Can be set up on a schedule, downloaded on App startup - Can be used for offline scenarios, once downloaded - Can be managed on a per user basis - Default prompt answers can be provided
Subscriptions Subscribing from Desktop
Subscriptions Desktop Settings Can choose to run subscription immediately or as per schedule
Subscriptions Mobile Server Settings Ensure device checks for latest subscriptions regulary Ensure subscription caches load on startup
Subscriptions vs. Pre-Cache Subscriptions Cache Pre-Loading Schedule based/ Predetermined End User Driven Less frequently changing Data Real time / Adaptive Administrator Driven Real time Data Both Optimized for Performance Optimized for Offline Use
Remaining Caches Upstream from Mobile device
Other Component Caches Document, Result, Element, Object, DB Connection Devices Network Mobile Server Intelligence Server Database
Background Execution 43
Background App Refresh New as of: 9.4.1, Update 3 and HotFix 4 * Requires ios 7 or greater Same functionality as Newsstand" APNs and Schedule" Increase performance" Background report data download"
Background App Refresh APNS I-Server: 9.4.1 HF4 Mobile-Server: 9.4.1 HF4 Mobile-Client: 9.4.1 U3 Advantages include - Content can be downloaded even when App is in background (using new ios7 API) - Can be used for offline scenarios, once downloaded - Single MicroStrategy App (no need for 2 separate Apps) Things to be careful about - Device needs to be on wifi for downloads to happen - App needs to be running in background Newsstand
Background App Refresh Mobile Configuration
Tip #4 Leverage the best hardware available
Hardware Considerations As much as you can reasonably afford Examples may include - Better internal hardware architecture - Better Processor/CPU - More RAM - Better Network hardware - Better Graphics Engine/GPU - Specific Feature improvements: Camera, GPS, Video streaming etc - Better or newer OS - New features and functions supported by MSTR
Optimizing Performance Use the best hardware available For our internal test documents, - ipad Air was up to 40% faster than the ipad 4 - iphone 6 was up to 30% faster than iphone 5S In the ANDROID market, this difference can be very stark given the vast range of devices and specs Recommendation Always use the latest hardware certified by MicroStrategy for optimal performance
Tip #6 Tip #5 Leverage the best network(s) available
Network Devices Network Mobile Server Intelligence Server 51 Database 51
Network Considerations Carrier Performance The proof is in the pudding *Data for major US Carriers (PC Magazine Report 2012)
Network Considerations Performance variation by network
Network Considerations Various factors play a role: Bandwidth, Latency, Packet Loss, Signal Strength, Distance from Cell Towers, Actual Data being transferred etc For optimal network performance - Avoid Network completely using caching, slicing selectors, offline mode - Choose Wifi over cellular - Choose LTE over 4G over 3G etc. - Pay attention to the MicroStrategy Network error messages - Use free Apps like SpeedTest to monitor Network conditions - Use Best Practices in global deployment scenarios Other considerations - VPN services may add significant overhead, sometimes up to 40-50% - Firewalls and other layers of security could add overhead
Mobile Configuration Profile Network Settings at Server Level
Monitor Network Status From Device
Slow Network Connections
Tip #5 Tip #6 Always use the latest and greatest MicroStrategy release!
Application Software Considerations Newer versions may include: Newer features and/or modified workflows Fixes which may impact Performance/Reliability Device OS versions matter too Better Performance and Reliability than earlier versions - Incremental Downloading (9.2.1) - Binary Compression (9.3) - Combining HTTP requests (9.3) - Definition Caching (9.3) - New RWD Engine workflow (9.4) - Binary limits normally increase every few builds
Tip #7 Optimized performance begins with the design
Design Considerations Good Design and Workflow Make All the Difference How much data is really required to support the use case? Push detailed granular data deeper into the work flow Divide and conquer Not everyone needs the same level of detail
Images Image resolution and size impacts binary size and load times Before - Resolution: 1242x2208 - Image size: ~2.5MB - Execution time: 4.7s After - Resolution: 750x1334 - Image size: ~0.5MB - Execution time: 1.2s Improvement - Loads 75% faster - No adverse effect on image quality - Overall better end user experience!
Tip #8 Leverage document object settings and parameters
Normal Multi-Layout Dashboard All layouts are downloaded incrementally Dashboard 1 Dashboard 2 Dashboard 3
Linked Multi-Layout Dashboard Only selected layout is rendered at execution time.rest as needed First Slice Dashboard 1 Dashboard 2 Dashboard 3 Other Layouts
Slicing vs. Filtering All slices loaded on client Selector changes local & faster More data adds to downloading :me Offline analysis possible
Slicing vs. Filtering Only required slice is loaded Selector changes require trip to the server Single slice is fetched regardless Offline analysis not possible
Tip #9 You can not improve what you do not measure!
Mobile Configuration Profile Settings Tab Measure and Monitor
Logging on the Mobile Device Access via Settings
Logging on the Mobile Device Specifying logging behavior
Logging on the Mobile Device Log file - Verbosity Summary level statistics of critical actions Greater level of detail for each http request
Mobile Performance Logging Mobile Server Level Make sure Statistics are turned on and in Screen Mode Choose logging level based on level of detail needed
Mobile Performance Logging Mobile Server Level
Mobile Performance Logging Mobile Server Level Logfiles display here.
Enterprise Manager Track mobile performance Mobile Statistics include: - Execution Time - Rendering Time - App Version - OS Version - Cache Usage - Network etc Manipulation Tracking under development. Enterprise Manager documents for analysis
Monitoring App
Monitoring App
Monitoring App
Monitoring App
Tip #10 7-1 Don t forget Load and Stress Testing
Scripted Stress Testing and Performance Tools Simulate mobile server load using web load testing tools Borland Silk Performer (Microstrategy, in-house) MFC Blaster (Microstrategy, in-house) J-Meter (Simulates configurable server load) HP Loadrunner (Commonly used for Enterprise) Measure response times from mobile device Regression Test Automation with DeviceAnyWhere.com Analyze network communication: Fiddler (Microstrategy, in-house) Wireshark SpeedTest Monitor Device Performance: Xcode Instruments (Command line for ios) DDMS for Android
7-1 Other Performance Considerations
Other Factors to be Considered Analyze and Optimize the end-to-end workflow Once device and network are optimized, focus on: Server hardware - Concurrency Databases, Cubes, SQL queries Third party services like Google Maps, YouTube Reduce the number of graphs, grids or advanced visualizations
Thankyou! Questions? Ray Bennett, rbennett@microstrategy.com