Tracker needs to throttle indexing on battery

Bug #130794 reported by Matthew Garrett on 2007-08-07
20
Affects Status Importance Assigned to Milestone
Tracker
Fix Released
Wishlist
tracker (Ubuntu)
Critical
Emilio Pozuelo Monfort

Bug Description

Binary package hint: tracker

On startup, tracker should call GetPowerSaveStatus and, if True, stop indexing. It also needs to listen for the PowerSaveStatusChange notification and adjust its state accordingly.

Related branches

Matthew Garrett (mjg59) wrote :

Flagging this as critical - there's no way we can ship tracker by default on laptops while it still behaves like this.

Changed in tracker:
importance: Undecided → Critical
Nic (ntetreau) wrote :

Very very important, indeed critical!

Sure I understand

I will get a fix for this today and a new version out with lots of bug fixes.

Changed in tracker:
status: New → Triaged

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http://bugzilla.gnome.org/show_bug.cgi?id=395803

Changed in tracker:
status: Unknown → New

Added initial support for this in svn

Changed in tracker:
status: Triaged → Fix Committed
Emilio Pozuelo Monfort (pochu) wrote :

Jamie is releasing 0.6.3 this week (possibly on 20th). I'll take care of packaging it.

Changed in tracker:
assignee: nobody → pochu
Emilio Pozuelo Monfort (pochu) wrote :

Retargeting as this won't make Beta release. We will upload a new tracker release with a fix for this right after beta release, when the freeze isn't in place anymore.

Martin Pitt (pitti) wrote :

tracker (0.6.3-0ubuntu1) gutsy; urgency=low

  [ Emilio Pozuelo Monfort ]
  * New upstream release (LP: #130794, #131983, #132320, #137352, #138331,
    #139173, #132505, #131559, #131735, #132710, #133246, #137873, #138778.
  * debian/patches/01-version_fix.patch,
    debian/patches/02-getenv.patch,
    - Removed, fixed upstream.
  * debian/patches/03-system_ioprio.patch: not needed anymore, as tracker
    now tries ioprio system syscalls if available.
  * debian/patches/01_from_upstream_fix_stemming.patch:
    - Added, fixes language selection.

  [ Martin Pitt ]
  * debian/control: Promote o3read to a dependency. That way, updates will get
    it, too, and we avoid making it a dependency of ubuntu-desktop. With the
    external dependency we can avoid installing the internal code copy.

 -- Martin Pitt <email address hidden> Fri, 28 Sep 2007 17:45:16 +0200

Changed in tracker:
status: Fix Committed → Fix Released

Is there an option to set indexing on while on battery? I find this bugfix _really_ annoying. What's the point of running tracker when it can't find the file I just saved somewhere? I mean how much power does one save? Does OS X's finder stop indexing on battery as well?

Please make this an option...
Thanks.

Matthew Garrett (mjg59) wrote :

The change simply halts the directory crawling on battery. New files will still be added to the index.

Not according to my observations. I even tried to restart trackerd. This is what I did:

>tracker-search asdfgh

returns nothing

>touch asdfgh in user home dir
> tracker-search asdfgh

returns nothing

Also, the log file is flooded with
"Now on battery power - suspending indexing"

That can't be good for battery saving?

I'll attach the log file in case that would be interesting. Tracker is started with "trackerd --verbosity=3"

OK; seems flooding of the log file only appears when trackerd is started in debug mode. So that's not a problem I guess :-)

But still, new files aren't added when I'm on battery.

Thanks for looking into this!

all indexing is suspended when on battery

we can add prefs to change this and/or limit it to initial index only

Emilio Pozuelo Monfort (pochu) wrote :

We could add an option in tracker preferences to enable indexing while on battery too.

Also, if indexing is disabled, t-s-t should warn that the search results may be incomplete, due to the fact that new files won't be added to the DB.

@Jamie: Yes, please do! Usability is really impaired the way it is now. I really rely on tracker in my daily use, e.g. I might download something to some obscure path and need it few minutes later. I have come to rely on tracker finding it for me. Could this option be added so that it's included in gutsy? Also, I really wonder how much power is saved by not indexing. Using powertop, trackerd is never amongst the top power drainers, even when indexing!

@Emilio: Indeed!

I love the quick response you guys give! I am indebted :-)

Matthew Garrett (mjg59) wrote :

Ok, in that case pausing indexing on battery isn't working for me. I can create files on battery and they appear in tracker-search instantly.

There's no need for a preference here. The desired behaviour is that tracker not crawl filesystems when on battery. Indexing newly created or modified files is fine - the file is either in cache or the disk is already spun up, and the instantaneous CPU load is small. There should never be a situation where creating a new file does not immediately add it to the index.

So what's the plan with this, Jamie? Will you be working on a fix? (I'm sorry to nag about it, it's just that it's pretty important for me to have this working and I'd want to know if I should revert to 0.6.2 or wait for an upgrade).

khashayar:

wait for 0.6.4

we will add prefs so you can choose to index fully on battery and only pause when doing the first initial index (default will be No for the first and Yes for the second option)

several people have requested this feature so we will definitely implement this

Thanks, Jamie. Will we see 0.6.4 in gutsy then? Or else, will there be a deb to download from the homepage?

Emilio Pozuelo Monfort (pochu) wrote :

If 0.6.4 can't go into Gutsy, I'll make some debs on my ppa.

Alright, but perhaps the patch that makes non-indexing on battery an option can be added to the 0.6.3?

I hate to be the guy who pops up everywhere and demands things, but here goes anyway: Has anyone built gutsy packages for the 0.6.4 release? I'm using it under archlinux (where I easily can build packages compared to debian/ubuntu) and see a lot of nice improvements.

Regards,
K.

Emilio Pozuelo Monfort (pochu) wrote :

I've just uploaded it to my PPA [1]

I'd appreciate if you could test it and give some feedback on [2], so we get it backported to gutsy-backports.

Thanks

[1] https://launchpad.net/~pochu/+archive
[2] https://bugs.launchpad.net/gutsy-backports/+bug/176102

Thanks! I'll do that as soon as the i386 build is done.

Regards.

This problem still persists in hardy heron, trackerd is using close to 100% CPU even when on battery, even when the "disable all indexing when on battery" checkbox is checked.

Changed in tracker:
status: New → Confirmed
Changed in tracker:
importance: Unknown → Wishlist
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.