New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 630450 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Revise extension update schedule

Project Member Reported by asargent@chromium.org, Jul 21 2016

Issue description

The way we schedule extension update checks today can cause more delay in update propagation than is ideal.

What we currently do:

I think we've long suspected we could tweak the policy around extension autoupdate checks to serve updates more quickly, but I'd love to have Omaha folks' input on the right way to do that. A brief summary of our current policy is that we try and do the checks about every 6 hours, with some special behavior around startup time depending on how long chrome hasn't been running. We might want to consider tweaking the 6 hours value, but first we should probably try a fix to the behavior around startup to see if that makes a difference. 

Here's an overview of what our code currently does:

While chrome is running:
-When timer fires, do the update check
-Record time as 'last check time' in prefs
-Calculate a 'next check time' of ~6 hours in the future, and schedule a timer for then plus write that time to prefs. (we add 6 hours +/- 10% random jitter to avoid thundering herds.)

At startup time we:
-Read the persisted last check time and scheduled next check time from preferences
-If next check time is still in future but at least 5 minutes away, just schedule a timer to run then
-If next check time is < 5 minutes away or already passed, do the following weird thing based on last check time I sort of made up years ago that tries (probably too hard) to avoid thundering herds:
 < 3 days ago, check in 5 minutes - 6 hours
 3-13 days ago, check in 20-40 minutes
 14-29 days ago, check in 10-20 minutes
 30+ days ago, check in 5-10 minutes

Note that one of the things that can drastically impact this though is sync - when the sync engine determines an extension to be out of date (which happens pretty early after startup, and then pretty fast whenever any changes happen on another concurrently running computer), we'll immediately do an update check for all extensions. 

Link to source:

ExtensionUpdater::ScheduleNextCheck
https://cs.chromium.org/chromium/src/chrome/browser/extensions/updater/extension_updater.cc?rcl=1465903141&l=169

ExtensionUpdater::DetermineFirstCheckDelay
https://cs.chromium.org/chromium/src/chrome/browser/extensions/updater/extension_updater.cc?rcl=1465903141&l=239


For people who tend to fire up their browser, do some work, and shut it down within a few minutes, we probably end up taking much longer than we should to deliver updates.


After some discussion with Omaha folks, it sounds like the following simplification might work well:

At startup:
-if next check time between 0 and 6 hours in the future, just use that
-else, schedule check to happen in 30-60 seconds

 

Comment 1 by sorin@chromium.org, Jul 21 2016

Cc: sorin@chromium.org
Cc: maxkirsch@chromium.org
Owner: asargent@chromium.org
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/15bb0b285183bbf4960573965b18d1e37b41d6f9

commit 15bb0b285183bbf4960573965b18d1e37b41d6f9
Author: asargent <asargent@chromium.org>
Date: Fri Aug 05 07:16:36 2016

Adjust scheduling of extension autoupdate checks

As described in more detail in the associated bug, our current strategy
doesn't work all that great for users who don't leave chrome open for
long periods of time. This CL tries to address that by changing the
function which determines when to run the first update check after
startup. In the case where our last scheduled check time has passed,
instead of waiting a random time from a few minutes up to several hours
(with some bias towards shorter values the longer it's been since a
successful check), we instead only wait 1-5 minutes.

BUG= 630450 

Review-Url: https://codereview.chromium.org/2216893002
Cr-Commit-Position: refs/heads/master@{#410011}

[modify] https://crrev.com/15bb0b285183bbf4960573965b18d1e37b41d6f9/chrome/browser/extensions/updater/extension_updater.cc

Status: Fixed (was: Started)
Cc: rdevlin....@chromium.org mkwst@chromium.org binjin@chromium.org mek@chromium.org treib@chromium.org gab@chromium.org yoz@chromium.org
 Issue 467923  has been merged into this issue.

Sign in to add a comment