Bug 445292

Summary: pk should wait a little after start-up or resume before chekcing for updates
Product: [Fedora] Fedora Reporter: Rodd Clarkson <rodd>
Component: PackageKitAssignee: Robin Norwood <robin.norwood>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: lmacken, richard, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-06 13:44:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
suggested patch none

Description Rodd Clarkson 2008-05-05 23:45:26 UTC
Description of problem:

Each time I start my computer or resume from suspend or hibernate, pk goes off
and checks for updates which is great, but it's timing could be a little better.

Let's sit down and think for a moment about a typical computer users behaviour.

If a user starts/resumes their computer it's very likely that they are about to
use it.  In many cases after a resume (and like just after start up) the email
client will hit the network to draw in traffic.  Open web browsers are trying to
update pages, or load new ones.

At start/resume, it's fair to assume that the internet connection will be fairly
active.  So having pk also trying to draw in what are becoming increasingly
large amounts of information about updates is very often an unwelcome extra
traffic that just makes it longer to get mail and load web pages (amount other
internet related activities).

If pk waited for 15 minutes before looking for updates, this would help to
alleviate a lot of the over demand on the network (particularly for users with
slower connections) and would in general make fedora look more snappy when the
users is most keen to get something done.

Comment 1 Richard Hughes 2008-05-06 09:05:56 UTC
We use the same method for "yum has changed something" as we do for "we have
resumed, something might have changed" - which for the former we want to update
things like the icon straight away, and the other we might want to wait a few
minutes like you suggest. Maybe we can add a flag to the method to signify
importance, or maybe just use another method altogether.

Do you see any other interactions here?

Comment 2 Richard Hughes 2008-05-06 09:29:20 UTC
Created attachment 304612 [details]
suggested patch

What about this?

Comment 3 Rodd Clarkson 2008-05-06 10:31:34 UTC
Ah, as a non-coder doing my bit for Fedora by testing stuff and filing bugs
that's all greek to me. ;-]

What I know is that when I resume my laptop, my email client, yum/pk and
probably a couple of other applications (like Firefox) all jump onto the network
and start downloading stuff.

I want to get to my email as quick as I can and having pk chewing up bandwidth
in the first few minutes of resume (or startup) isn't going to make that happen.
 I'm also pretty sure that I'm not alone in this (my wife complains about this
too - except she just says to me, why do my emails take so long to download when
I resume?).

If that patch stops pk (or yum) from grabbing updates for 5 minutes, leaving a
little time for other apps to get settled  then it sounds like a fine patch to
me and something that is good. 8-]

Comment 4 Richard Hughes 2008-05-06 13:44:20 UTC
I've merged that patch into master, but I'll be some time before it gets in F9
as it's in extream lockdown mode right now.