This is a technical article dealing with performance considerations and possible issues during the synchronization process.
Evaluating synchronization performance in general is mainly relevant for full synchronization. Measuring performance during an incremental synchronization is not reliable.
One of the most important parameters to evaluate is
Time_spent_in_entities_download / #_of_records_downloaded
- 1 ms/rec = good
- Best times ~0.3 ms/rec
Identify problematic module (if any)
- Any module that takes too much time...
Possible performance problems:
- Slow connection
- Web latency
- Server performance - overloaded, large POA table; often only 1-2 entities cause the problem
- Client performance
- device quality (rare)
- large data
- database indexes (seldom a sync problem)
- SyncDownloader pauses
What does it mean large data?
- DB size Database_8_0.sdf
- Normal case: O(100) MB
- Possible problems: > 500 MB
- Huge table(s), i.e. tables with >> 100K records
- Table record counts can be found in FullSync detailed log
- Slow Reindex operation - may take >20 secs
- Cause downloader pauses
- Too much data in the Blobs
- Can be measured only when you have access to AppData folder
- SyncLog contains only indirect data - Attachment count & time
Did the synchronization complete?
What can happen:
- Aborted synchronization (Reported as UserAbort in the log)
- SyncEngine was not able to write sync log (SyncLog contains only SYNCSTART info and nothing else)
- User switches the app to background (during the synchronization process)
- The operating system needs more resources and kills the app.
- iOS warns the app that it will be terminated, but the SyncEngine is executing a long-running operation that cannot be interrupted (typically REINDEX)
The more you understand the sync process, the better you'll be able to identify the problem.
- Incomplete download (MaxSyncCount)
- Unneeded downloads: Records are downloaded & then deleted in cleanup: Check sync filters
- Slow upload, mainly in questionnaires: If there are too many upload records => Increase MaxExecuteMultiple
How to investigate problems
- SyncLog, especially <Analysis> node
- Switch on detailed sync logs
- Look for problems in other logs (Online log etc.; available from AboutForm)
- Try to collect info about the data size (FullSync detailed logs list record counts per table)
- Fiddler (Decreases the performance!)