Opened 11 years ago
Closed 11 years ago
#25833 closed defect (bug) (fixed)
Background Updates should be spread over the hour
Reported by: | dd32 | Owned by: | dd32 |
---|---|---|---|
Milestone: | 3.7.2 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Upgrade/Install | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
In 3.7 the background updates are scheduled for exactly 7am/7pm local-time, this causes many hundreds of thousands of sites to attempt performing updates on-the-hour.
This also means that we now have millions of sites running their update checks in 12 timeslots (or as close to it as they can get) rather than spread over all the minutes in the hour (12 * 60).
We should make Background Updates occur at a random minute of the hour instead to spread the load out, not only for WordPress.org, but for shared hosts whose disks suddenly receive a higher than normal amount of file writes.
Initially my thought is that we do 7am/7pm+ rand(0,59).
We could also do 6.30 + rand(0,59) to spread it from 6.30 -> 7.30 if we want to keep it around the 7 o'clock slot.
Attachments (2)
Change History (9)
#3
@
11 years ago
I'm thinking it might be better to attach the minutes after the loop to find the next 7 o'clock, that way the "not within the next 3 hours" line remains correct.
#4
@
11 years ago
I'm not sure it matters whether it's "not within the next 3 hours" or "not within the next 2-3 hours", but for the sake of making the diff 0.2KB smaller, let's go with it.
#5
@
11 years ago
- Owner set to dd32
- Resolution set to fixed
- Status changed from new to closed
In 26149:
I went with 7+rand(0,59), because it's neater, and we're not attached to exactly 7/7, per nacin:
https://twitter.com/nacin/status/397562460301172736