Last Comment Bug 694149 - Tweak sync intervals to reduce server load
: Tweak sync intervals to reduce server load
Status: VERIFIED FIXED
[verified in services]
: verified-aurora, verified-beta
Product: Cloud Services
Classification: Client Software
Component: Firefox Sync: Backend (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla10
Assigned To: Philipp von Weitershausen [:philikon]
:
Mentors:
Depends on:
Blocks: 678588 692006
  Show dependency treegraph
 
Reported: 2011-10-12 14:31 PDT by Philipp von Weitershausen [:philikon]
Modified: 2011-11-03 10:20 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed
fixed


Attachments
v1 (1.63 KB, patch)
2011-10-12 14:40 PDT, Philipp von Weitershausen [:philikon]
rnewman: review+
rsoderberg: feedback+
Details | Diff | Splinter Review
v1.1 (3.47 KB, patch)
2011-10-12 17:55 PDT, Philipp von Weitershausen [:philikon]
asa: approval‑mozilla‑aurora+
asa: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Philipp von Weitershausen [:philikon] 2011-10-12 14:31:41 PDT
As discussed, we're going to make the following tweaks to the sync intervals to reduce the server load created by an individual client:

* Increase the singleDeviceInterval from 1 to 24 hours (reverting bug 678588)
* Increase activeInterval from 5 to 10 minutes.
* Increase immediateInterval from 60 to 90 seconds.

Flagging for tracking-firefox9 and firefox8 as a heads up to release-drivers. The risk of these changes is very small as they only involve tweaking default pref values.
Comment 1 Philipp von Weitershausen [:philikon] 2011-10-12 14:40:19 PDT
Created attachment 566638 [details] [diff] [review]
v1

Patch tweaking the default pref values as discussed in comment 0.

Requesting approval for Aurora and Beta so that this mitigation takes effect as soon as possible. As mentioned in comment 0, the risk is minimal as we're simply tweaking default pref values.
Comment 2 Philipp von Weitershausen [:philikon] 2011-10-12 17:55:24 PDT
Created attachment 566710 [details] [diff] [review]
v1.1

Of course tweaking the interval values made some SyncScheduler tests fail because they used some hardcoded dummy values for backoff. Fixed!

Please see comment 1 for Aurora/Beta approval justification. Thanks!
Comment 3 Philipp von Weitershausen [:philikon] 2011-10-15 15:40:14 PDT
https://hg.mozilla.org/services/services-central/rev/9a34387605ea

STRs for QA:

* Single device users should sync once every 24 hours instead of once per hour. With bug 692249 having landed alongside this bug, this should also carry over browser restarts.

* Multi-device users should sync every 10 minutes (instead of 5 minutes before) when their machine is under active use. When they're using two or more machines at the same time (two or machines are uploading records), the interval now drops to 90 seconds (instead of 60 before). The interval for idle machiens (1 hour) is unchanged.
Comment 4 Mihaela Velimiroviciu (:mihaelav) 2011-10-18 09:26:11 PDT
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0a1) Gecko/20111017 Firefox/10.0a1
Mozilla/5.0 (Android; Linux armv7l; rv:10.0a1) Gecko/20111017 Firefox/10.0a1 Fennec/10.0a1
Mozilla/5.0 (Windows NT 6.1; rv:10.0a1) Gecko/20111017 Firefox/10.0a1
Mozilla/5.0 (X11; Linux i686; rv:10.0a1) Gecko/20111017 Firefox/10.0a1

Verified on all OSs.
Single device per account users sync every 24 hours
Prerequisites:
1. Sync is set up on device
2. History items are available on device

STR:
1. Start Browser and make sure last sync was successfull
2. Close browser
3. Change device time to more than 1 hour since last sync
4. Start the browser and wait 1-2 minutes
   Result: Sync is not performed
5. Close browser
6. Change device time to 1-2 minutes before 24 hours since last sync
7. Wait for the time to pass until 24 hours since last sync
Result: Sync is performed after 24 hours since last sync

Multiple device per account users sync every 10 minutes (or 90 seconds if the last sync downloaded new item(s) from the server)
Prerequisites:
1. Sync is set up on device
2. History items are available on device

STR:
1. Start Browser and make sure last sync was successfull
2. Close browser
3. Change device time to less than 10 minutes since last sync
4. Wait for the time to pass until 10 minutes since last sync
Result: Sync is performed after 10 minutes since last sync

Note: On Mac, sync is performed after every 90 seconds, even if no items were retrieved at last sync. Is this expected?
Comment 5 Tracy Walker [:tracy] 2011-10-18 13:41:39 PDT
sync intervals are correctly well at new defaults seen on latest s-c builds.
Comment 6 Philipp von Weitershausen [:philikon] 2011-10-18 20:13:48 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/ef5f3c44d034
Comment 7 Philipp von Weitershausen [:philikon] 2011-10-18 20:37:28 PDT
https://hg.mozilla.org/releases/mozilla-beta/rev/ab251d661e5b
Comment 8 Richard Newman [:rnewman] 2011-10-21 11:51:13 PDT
https://hg.mozilla.org/mozilla-central/rev/9a34387605ea
Comment 9 Tracy Walker [:tracy] 2011-11-03 10:20:48 PDT
verified across channels

Note You need to log in before you can comment on or make changes to this bug.