Spotlight's Impact on PowerBook Battery Life?
Viltvodlian Deoderan asks: "So, Spotlight for Mac OS X Tiger is very cool. I can now let my innate ability to disorganize things shine through. However, when using my PowerBook unplugged, it seems that my battery lasts a noticeably less time. A close reading of Ars Technica's description of how spotlight works suggests that this is due to keeping the index file up-to-date on disk. Has anyone else noticed the same thing? Does someone have a better explanation for why my battery seems to drain out, prematurely? Is there some way real-time indexing can be turned off to conserve power?"
Depending on the time of day and what you are doing with your computer, power consumption varies a lot. It'd be difficult to even establish a reliable baseline usage time per charge.
After you install, files are indexed as they are written. It really takes very cpu time or other resources to do this. If you don't believe me do some performance profiling.
If you did an upgrade install, you are already working with a sorely fragmented disk. Additionally, batteries age. Maybe it's these two factors that are causing your batteries to seem like they are giving out early.
I actually noticed that my battery is lasting much, much less time, lately, but I've been attributing that to the fact that it's almost 3 years old and hasn't had the life that it used to when it was young.
I wish there was a way of disabling spotlight during certain times. especially when I'm running a script that's creating dozens of files only to trash them again later. I think it's taking a bit of a performance hit from spotlight.
...spike
Ewwwwww, coconut...
Spotlight doesn't do that much work that I would honestly expect it to significantly impact battery life.
Perhaps if you used spotlight to find all your files, as it would take some effort to search the index and list all the files. But I doubt you search for that many files in a session.
It is far more likely there is another process which is effecting battery life, or your battery is starting to show some wear and tear.
From here: /Volumes/Backup .
To turn indexing on or off for a volume, run sudo mdutil -i on volume name or sudo mdutil -i off volume name, respectively. For example, if you want to turn off indexing for a volume called Backup, the command would be sudo mdutil -i off
Now to give you some grief about it:
This is pretty basic stuff - the less the hardware is used, the less power it will consume. If Spotlight, or any other app, is accessing the disk, then it will need power to do so. Likewise, if Spotlight is doing a bunch of searching through it's index that has to be loaded into RAM from the disk and those queries must be computed by the OS, then the disk and OS and RAM are all getting a workout.
What I recommend is that you check out what it is you are doing. If you are copy and moving files all over the place, or mounting and unmounting CDs, those processes would cause HD/CD usage as well as Spotlight indexing on top of that. Likewise, if you are doing a lot of Spotlight searching, there will be more usage because you are querying a DBMS.
Perhaps your battery is just coincidentally needed a replacement and/or non-spotlight related OS tweeks are changing power consumption.
I only came here to do two things; kick some ass, and drink some beer...looks like we're almost out of beer.
I've got half a gig, but I'm swapping constantly and apps like Safari regularly swell to consume all available RAM.
Widgets that access the internet regularly consume a hundred megs of swap and mdimport will start eating processor at random moments. Mail.app regularly tries to index the hundreds of thousands of files on my company's Exchange server and comes to a screeching halt.
Frankly, Tiger's been a major disappointment.
Clear, Dark Skies
Drag the volume you don't want indexed into the Privacy pane in Spotlight preferences.
I'm not saying that it *isn't* Spotlight, but just about anything could be chewing up your battery. Widgets, indexing, screen savers, or even poor Engergy Saver settings. Have you checked to make sure that Spotlight is what's killing your battery?
0 808165343661
Several people have been complaining about a bug in Tiger and the 2005 Powerbooks that has to do with the trackpad:
http://www.macosxhints.com/article.php?story=2005
It seems that the new tracking features eat up a lot of processor time (and thus, a lot of battery as well).
Again, I'm not dissing the Spotlight issue: it's definitely something to look at. But if you're still having trouble, you might check on other factors that can kill your battery life.
#!/bin/bash
/usr/sbin/ioreg ] && \ /usr/sbin/ioreg -p IODeviceTree -n "battery" -w 0 | \ /^[{}]/!p
[ -x
sed -ne '/| *{/,/| *}/ {
s/^[ |]*//g
}' | \
awk '/IOBatteryInfo/ {
A=$3 $4
gsub("[{}()\"]","", A)
gsub(","," ",A)
print($1, $2, A)
}'
# EOF
Save that as a shell script, when you run it from terminal it will produce info like this:
"IOBatteryInfo" = Capacity=4046 Amperage=1157 CycleCount=483 Current=2837 Voltage=12187 Flags=838860807 AbsoluteMaxCapacity=4400
The difference between AbsoluteMaxCapacity and Capacity gives you an idea of how much my battery has faded since it was new...
Clear, Dark Skies
it's possible that it's still indexing your entire volume, which might take a long time if you have a PowerBook with a high capacity drive.
I know that performance on my dual 2ghz G5 with 5gb RAM took a huge hit for about the first 24 hours after I installed Tiger. I have a lot of disk space (almost 2TB) hung off my machine, thus the long indexing time.
Once that's over, the other replies are right - Spotlight doesn't take up much in the way of resources. But during the initial index, the hit's pretty big and it would not surprise me if it hurt battery life too.
D
Nope. And I don't use an encrypted disk image or anything like that, either.
Hexy - a strategy game for iPhone/iPod Touch
Don't some of the widgets run more or less all the time? I also recall seeing that some of the first versions had serious memory leaks, in which case you'd be swapping more frequently as well.
Read this:
0 808165343661
http://www.macosxhints.com/article.php?story=2005
It is actually a bug with the driver for the new USB scrolling trackpad. This has been noted in various forums and Apple are aware of this problem.
If you plug in an external mouse and disable the trackpad, or replace the driver with SideTrack, the problem goes away.
This only effects the 2005 Powerbooks, and causes much higher CPU and memory load.
Will
per mere, per terras
Open Terminal and type this command, followed by return:
defaults write com.apple.dashboard mcx-disabled -boolean YES
Restart the dock, dashboard is dead.
To get dashboard back type:
defaults write com.apple.dashboard mcx-disabled -boolean NO
Spotlight put the machine through hell for a few days while it indexed everything it could find -- then it went to sleep.
Dashboard was eating battery life by 20% and increasing wait times on certain apps significantly -- that is until I killed it. Battery life instantly jumped right back up.
Spotlight is a one off issue that lasts about a day -- Dashboard is the ongoing PITA.
Mod me up, mod me down, flame me, praise me -- whatever you do, you help prove I exist...
Use /sbin/kextunload to remove kernel extensions (what drivers in OS X tend to be) that are in memory, not kill.
you$ man kextunload
Mikey-San
Karma: +Eleventy billion (mostly affected by watching Celebrity Jeopardy)
I have 512MB in my iBook, and I never noticed issues when running Dashboard, Mail, Safari, Terminal, etc, at the same time. Hell even running Eclipse it wasn't too bad, except waking up from sleep.
What I have done though is turn off Dashboard, and I'm going to write an application to log the battery power using ioreg (from a post above) from a full charge, then compare it to running with Dashboard from a full charge.
I am TheRaven on Soylent News
Add this to /etc/hostconfig:
SPOTLIGHT=-NO-
Reboot, and you're done. The indexing service won't even load at boot. The spotlight icon will still be in the corner but will do absolutely nothing when you type in a string.
And by the way, a watched pot also never boils. I think you're just imagining that it's sucking up all your battery. But hey, it may use a few extra cycles and use up your battery a little quicker.
I just wasted your mod points! HA!
Unless you really want to write it... then nevermind.
seSales, Point of Sale software for OS X.
ACPI is part of IOKit on Mac OS X, so you have to use ioreg to access the data as far as I am aware.
try lowering the brightness level of the screen, and having your screen go to sleep quickly... power management
Sig Hansen?
Safeguarding your porn collection using encrypted disk images: "Hiding such things from Spotlight is a good idea. To do that, you can create an encrypted disk image that is password protected to keep nosy users out, and the contents of the image don't appear in Spotlight unless the image is mounted...."
Spotlight sees the Entourage database as one large file. Everytime you download a single piece of email spam, the entire database file changes and Spotlight tries to reindex the whole thing, over and over again. If you have Entourage open and set to check your mail every 20 minutes, you force Spotlight to reindex a ~1GB file containing every email message on your computer every 20 min.
Spotlight can't see into Entourage anyway, so you aren't loosing any functionality by telling Spotlight to ignore that file.