Jump to content
Sign in to follow this  
Terry Kakavros

Initial Sync- Write Speed slows down during Sync

Recommended Posts

Posted (edited)

I am having an issue where one of the tables I am syncing goes from 70 writes per sec to 5 writes per second. This write speed decreases incrementally through out the initial sync for the specific table. All other tables I am syncing hover around 70 writes per second. It is taking the iOS devices to write 7500 total records in 15 minutes. The problem table has 3100 of those records. This table takes 13 of the 15 minutes. 

Details of my solution:

  • iOS Client to MirrorSync 5 Server sync.
  • Mobile file is a separate trimmed down version of the hosted file.
  • All fields on sync layouts are text or number
  • Primary key in the table is a UUID
  • The sync is setup to not merge records
  • JSON is stored in one of the fields

In the past the initial sync would take around 7 minutes to complete. Somehow it has doubled. Any help would be appreciated!

Edited by tkakavros

Share this post


Link to post
Share on other sites

Usually, slow write speeds are caused by:

large amounts of text in a single field, such as an audit log field or base64 encoded text (you should never try to sync container data by base64 encoding it, you should let MirrorSync deal directly with the container field). It sounds like the field with JSON data might be an issue, if it’s large. 

Stored calculation fields in the slow table, even if they are not on the sync layout: FileMaker must calculate all stored calcs when writing a record. If there are too many calcs, or if some of them are very complex (e.g. recursive custom function), this can significantly slow things down. 

Container fields: as mentioned above, it’s better to sync a container field than to convert it to base64 text, but container data still takes significantly longer to sync. 

I would recommend creating a temporary copy of your solution that you can use to experiment with. Try removing the json field and see if that helps. If it doesn’t, try removing stored calcs and see if that helps. Then try removing container fields. Then try removing any text fields that contain more than a few kilobytes of text. If you’ve removed all of those things and it’s still slow, contact us about reviewing your sync logs. 

Share this post


Link to post
Share on other sites

Thanks, Jesse. Thanks for the quick response!  I will go ahead and test in my DEV environment. I will update this thread once I have new information. Thanks again!

Share this post


Link to post
Share on other sites

Thanks again for the the information regarding slow write speeds. The issue was the JSON stored in the text field. I converted the payload to pipe delimited and it made a drastic improvement.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.