mobile app performance, 9 july · -use free apps like speedtest to monitor network conditions, as...
TRANSCRIPT
#mstrworld
#mstrworld
Mobile App Performance, 9 July
Tips & Tricks to Building
Lightning-fast Apps
Bram Kloth
Manager Mobile Solutions Europe
#mstrworld
Performance?
Mobile
#mstrworld 3
Devices
Network
Mobile Server
Intelligence Server
Database
MSTR stack (Mobile)
Reactive
Performance Tuning
Proactive
Incorporate Performance
tuning in design and
development
#mstrworld
CA
CH
E M
AN
AG
ER
Ide
ntifies F
aste
st W
ay to
Fu
lfill
Qu
erie
s
DB Connection
Cache
Element
Cache
Results
Cache
Object
Cache
Document
Cache
RDBMS
Accelerates attribute element requests for prompting..
Accelerates queries including dashboard datasets by
storing report results in-memory
Accelerates dashboard performance by storing the final
formatted output on server – Flash, HTML, PDF, Excel
Accelerates metadata object requests for rapid
assembly into queries for reports.
Accelerates connections to the database to ensure
fast query submissions
Device
Cache
Accelerates dashboard performance by storing the final
output in device memory
Caches
5
#mstrworld
17
6,1
4,9
4 4,7
4,1
3,2 3,0
0
2
4
6
8
10
12
14
16
18
Resp
on
se
Tim
e (
s)
Sample Customer Dashboards
No Server Cache
Server Cache
Caches: sample benchmarks server caches
#mstrworld
6,0
5,1
4,2 4,4
3,5
2,4 2,3 2,4
0
2
4
6
8
Response T
ime (
s)
Sample Customer Dashboards
Server Cache
Device Cache
Device Caches: sample benchmarks client caches
#mstrworld 8
Methods of Caching on Device
• Live Execution
• Subscription
• Precaching
• Background Execution
#mstrworld 9
Devices
Network
Mobile Server
Intelligence Server
Database
Device Caches: live execution
GUI
#mstrworld
Device Caches
Anything that can go wrong, will go wrong
• Clear on Close is set to ON at Mobile Configuration/Device Level
• Caching is not set up correctly
- Project Level Cache settings are turned OFF
- Document Level Cache settings are turned OFF
- Component Dataset Level Cache settings are turned OFF
• Correct type of Cache not turned ON at server level
• Adequate memory is not allocated to save caches
- Server side memory allocation
- Client Side memory allocation
• Documents where some component are not cached
• Cache Expiration settings are too low
• Data is being refreshed too frequently
• Caches become Dirty/Unusable for some reason or are not hit correctly
#mstrworld
Device Caches
Subscriptions
12
• Advantages 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
• Things to be careful about
- Subscriptions should be ready in History List inbox for optimal effect
- Number and size of downloads
- Good network availability during initial download
- Data change/refresh scenarios
#mstrworld
Device Caches
Pre Caching
13
Advantages include
- Can be preloaded at startup
- Can adapt intelligently to user behavior while downloading
- Cache Update subscription be used to keep the server caches current
- Can be used for offline scenarios, once downloaded
- Pre-loading bar shows progress of downloads (same as subscriptions)
Things to be careful about
- There have to be valid server caches for optimal use, else live execution happens
- Number and size of downloads
- Good network availability during initial download
- External links, Images on secure servers etc (same as subscriptions)
#mstrworld 1
4
Parent Dashboard
Linked Dashboard 1
Linked Dashboard 2
Linked Dashboard 3
Linked Dashboard 4
Supporting Objects
Folder
Adaptive Precaching: workflow
#mstrworld 1
5
Parent Dashboard
Linked Dashboard 1
Linked Dashboard 2
Linked Dashboard 3
Linked Dashboard 4
Adaptive Precaching: workflow
#mstrworld
Device Caches
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
- Good Battery power
- “Treat project as confidential” needs to be disabled
- “Never persist credentials” needs to be disabled.
APNS
Background
Execution
I-Server: 9.4.1 HF4
Mobile-Server: 9.4.1 HF4
Mobile-Client: 9.4.1 U3
#mstrworld 17
Devices
Network
Mobile Server
Intelligence Server
Database
Devices
#mstrworld
Hardware Considerations
Size does matter!
Using the latest greatest device is always preferred.
Advantages may include
• Better internal hardware architecture
• Better Processor/CPU
• More RAM
• Bettor Network hardware
• Better Graphics Engine/GPU
• Specific Feature improvements: Camera, GPS, Video streaming etc
• Better OS
• New features and functions supported by MSTR
Devices
#mstrworld
Hardware Considerations (light rendering)
1,6
2,2
2,6 2,7
3
3,3
3,9
1,3
1,7
2,2
2 2
2,3
2,8
0
1
2
3
4R
esp
on
se T
ime
(s)
Sample Internal Dashboards (Light Rendering Cases)
iPad 4
iPad Air
#mstrworld
Hardware Considerations (heavy rendering)
12,5
16,6
18,1 18,2
25,6
7
9,4
10,4 10,9
14,5
0
5
10
15
20
25
Res
po
nse
Tim
e (s
)
Sample Internal Dashboards (Heavy Rendering Cases)
iPad 4
iPad Air
#mstrworld
Software Considerations
Always use the latest and greatest MSTR Release !
• 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
• Newer features and/or modified workflows for older ones, that might improve
performance
• Many other fixes which may impact Performance/Reliability directly or indirectly
• Device OS versions matter too
#mstrworld
MSTR 9.4 vs. 9.3
#mstrworld 23
Devices
Network
Mobile Server
Intelligence Server
Database
Network
#mstrworld
Network Considerations
Performance variation by network
2,2 2,7 2,3
5,6
3,1
6,2 6,5
21,6
3,8
6,6 7,2
28,5
4,3
8,4 9,7
38,9
0
5
10
15
20
25
30
35
40
45
Res
pn
se T
ime
(s)
Sample Internal Dashboards
Wifi
4Mbps, 50ms
3Mbps, 50ms
2Mbps, 50ms
#mstrworld
Network Considerations
“Trouble”- Shoot the Messenger
• Various factors play a role in performance over the network including: Bandwidth,
Latency, Packet Loss, Signal Strength, Distance from Cell Towers, Actual Data being
transferred etc
• For optimal network performance
- Choose Wifi over 3G/4G
- Choose LTE over 4G over 3G etc.
- Pay attention to the MicroStrategy Network error messages
- Avoid Network completely using caching, slicing selectors, offline usage etc
- Use free Apps like SpeedTest to monitor Network conditions, as necessary
- Try HTTP Compression if you are using MSTR versions without compressed binaries
- Use Best Practices in global deployment scenarios
• Other considerations
- VPN services may add significant overhead, sometimes up to 40-50% or worse
- Consider Performance vs. Security tradeoff for services like Good Dynamics integration
- Firewalls and other layers of security could add overheads too
#mstrworld
#mstrworld 27
Devices
Network
Mobile Server
Intelligence Server
Database
Server Side performance optimization
#mstrworld
CA
CH
E M
AN
AG
ER
Ide
ntifies F
aste
st W
ay to
Fu
lfill
Qu
erie
s
DB Connection
Cache
Element
Cache
Results
Cache
Object
Cache
Document
Cache
RDBMS
Accelerates attribute element requests for prompting..
Accelerates queries including dashboard datasets by
storing report results in-memory
Accelerates dashboard performance by storing the final
formatted output on server – Flash, HTML, PDF, Excel
Accelerates metadata object requests for rapid
assembly into queries for reports.
Accelerates connections to the database to ensure
fast query submissions
Device
Cache
Accelerates dashboard performance by storing the final
output in device memory
Caches: enable caching wherever you can
28
#mstrworld 29
Devices
Network
Mobile Server
Intelligence Server
Database
Full stack
#mstrworld
Data Considerations
You cannot beat physics!
• Mobile dashboards should be optimized for mobile consumption
• Make sure to download only as much data as needed - Especially for Landing Pages
• Split larger dashboards into smaller ones and link drill to them in real time
• Linked Dashboards can be subscribed/pre cached to optimize further
• Split dashboard into multiple layouts to benefit from incremental downloading
• Consider the Network being used by end user while designing the dashboards
• Consider network bottlenecks at Server/Wifi/Cellular level when batch downloading
#mstrworld
Design Considerations
Good Design and Workflow make all the difference
• GUI/Visual Elements
• Selectors
- Slicing vs. Filter Selectors
- Prompts vs. Selectors
• Images
- Image resolution and size
- Image properties like layers, gradients, transparency etc
- Image format
- Screen size and resolution of device being used
- Number and location of images
- Image Caching considerations
- Pre-baked images
#mstrworld
Product Sales
Product A 1M
Product B 1.3M ….
All slices loaded on client
Selector changes local & faster
More data adds to downloading time
Offline analysis possible
Product Sales
Product A 1M
Product B 1.3M ….
1 Million Rows 1 row
Slicing Selectors Filter Selectors
Initial Rendering 0.5s
Initial Rendering 0.5s
Data Warehouse
Thousands of rows
Data Warehouse
Thousands of rows
Only required slice is loaded
Selector changes require trip to the server
Single slice is fetched regardless
Offline analysis not possible
Total Loading
Time 3.5s
Total Loading Time
0.5s
Slicing vs Filtering
#mstrworld
Performance tools
You cannot improve what you do not measure
Various performance measuring tools available within MSTR
• Enterprise Manager
• Diagnostics Logs
• Web Statistics etc
• Specially for Mobile: Mobile Device Logs
Other tools in market
• Fiddler, WireShark, SpeedTest etc for Networks
• Xcode Instruments, DDMS etc for Devices
#mstrworld
Performance Tools
Enterprise Manager
You can now use Enterprise Manager to keep record of Mobile performance too
Enterprise Manager can be used to track Mobile Statistics including
• Execution Time
• Rendering Time
• App Version
• OS Version
• Cache Usage
• Network etc
Manipulation Tracking in the works
We hope to provide Enterprise Manager Dashboards for easier use
#mstrworld
#mstrworld
Network Considerations
Carrier Performance: The proof is in the pudding*
0
200
400
600
800
1000
1200
1400
1600
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
La
ten
cy (
ms)
Average Speed (Mbps)
*Data for major US Carriers (PC Magazine Report 2012)
#mstrworld
Other Factors to be considered
Analyze and Optimize the end-to-end workflow
Once you know device or network are not bottlenecks, you can look elsewhere
• Server hardware may need optimization, especially for concurrency scenarios
• Databases may need to be optimized
• Cubes may need to be optimized
• SQL queries may need to be optimized
• Third party services like Google Maps, YouTube etc may play a role
• Wherever possible, use cubes over warehouse; Caches over cubes
• Dashboards running against Cubes also typically give better performance than those
running against View Reports
… refer appropriate sessions for tips on these and much more
#mstrworld
QUESTIONS?
#mstrworld
THANK YOU!
#mstrworld
Intelligent Server Settings
#mstrworld
Mobile Server Settings
#mstrworld
Device Caches
Background App Refresh
#mstrworld
Device Side Settings