Mobile Application Performance
Tips & Tricks to Significantly Boost App Performance
Ray Bennett
Performance Definition
11km/s (7mps)
Escape Velocity
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
Why is Performance Important?
Microstrategy High Performance Initiative
A multi-year, multi-million dollar initiative designed to improve our customers’ system performance.
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.
• System Configura,on Recommenda,ons –
System configura:on recommenda:ons.
• Performance Monitoring Plan -‐ Understand the
tools and metrics you can use to monitor your performance.
Improve 1 Upgrade 2 Enhance 3
Performance Op,miza,on Roadmap
Recommended!
Expected Results
Configura,on Recommenda,ons
Tip #1
Tip #1
Devices Network
Mobile Server
Intelligence Server
Database
Document Definition Transport:
Highly Compressed Binary File
Contains:
• Document metadata definition
• Selector Objects
• Panel Objects
• Shapes, Lines
• Data
• Images (Background, Icons) What is sent to Device?
Mobile Server
Tip #2
Tip #2
Reactive
Performance Tuning
Proactive
Incorporate Performance tuning in design and
development Devices Network Mobile Server Intelligence Server Database
Tip #3
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
Device level
Instantiating results on mobile client
Devices Network
Mobile Server
Intelligence Server
Database
Multiple methods
1.
Live Execution
2.
Pre-caching
3.
Subscriptions
4.
Background Execution
In the beginning….Live Execution Devices Network Mobile Server Intelligence Server Database Device Caches No Device Side Cache!
Running from Device Disk Cache
Devices Network
Mobile Server
Intelligence Server
Database
Pre Caching
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
Device Caches
Configuration Profile
Settings Tab – Part 1
Home Screen Tab
Work Flow
Parent Dashboard
Linked Dashboard 1
Linked Dashboard 2
Linked Dashboard 3
Linked Dashboard 4
Supporting Objects Folder
Caching
Device Side Settings
Device settings for caching behavior
• 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
Optimizing Cache Strategies
Caching settings – Memory storage
Microstrategy Desktop
Make sure you have sufficient space to
store datasets
Same applies to formatted documents
Caching settings - Expiration
Microstrategy Desktop
Set cache expiration times per
Administration – Are caches being hit?
Microstrategy Desktop
Check to see if caches are being
Work Flow Subscriptions Intelligence Server Mobile Server Mobile Device Can serve subscriptions at App Start-up
Subscriptions generated and caches stored in History List Inbox
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
Subscribing from Desktop
Desktop Settings
Subscriptions
Can choose to run subscription immediately or as
Mobile Server Settings
Subscriptions
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
Upstream from Mobile device
Document, Result, Element, Object, DB Connection
Devices Network
Mobile Server
Intelligence Server
Database
Background App Refresh
New as of: 9.4.1, Update 3 and HotFix 4
• Same functionality as Newsstand"
• APNs and Schedule"
• Increase performance"
• Background report data download"
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
APNS
I-Server: 9.4.1 HF4 Mobile-Server: 9.4.1 HF4 Mobile-Client: 9.4.1 U3
Background App Refresh
Mobile Configuration
Tip #4
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
As much as you can reasonably afford
Use the best hardware available
Optimizing Performance
• 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 #5
Leverage the best network(s) available
Devices Network
Mobile Server
Intelligence Server
Database
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%
Network Settings at Server Level
From Device
Tip #6
Always use the latest and greatest MicroStrategy
release!
• 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
Application Software Considerations
Tip #7
• 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
Design Considerations
Image resolution and size impacts binary size and load times
Images 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!
Before
- Resolution: 1242x2208
- Image size: ~2.5MB
Tip #8
All layouts are downloaded incrementally
Normal Multi-Layout Dashboard
Dashboard 2 Dashboard 3 Dashboard 1
Only selected layout is rendered at execution time….rest as needed
Linked Multi-Layout Dashboard
Dashboard 2 Dashboard 3 Dashboard 1
Other Layouts First Slice
Slicing vs. Filtering
• All slices loaded on client
• Selector changes local & faster
Slicing vs. Filtering
• Only required slice is loaded
• Selector changes require trip to the server
• Single slice is fetched regardless
Tip #9
Measure and Monitor
Access via Settings
Specifying logging behavior
Log file - Verbosity
Logging on the Mobile Device
Summary level statistics of critical actions
Greater level of detail for each http request
Mobile Server Level
Mobile Performance Logging
Make sure Statistics are turned on and in
Screen Mode
Choose logging level based on level
Mobile Server Level
Mobile Server Level
Mobile Performance Logging
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
7
-
1
Tip #10
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)
7
-
1
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