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?"
Try turning off the pr0n. you're welcome.
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...
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
The same trick works with people!
Drag the volume you don't want indexed into the Privacy pane in Spotlight preferences.
No, I've experienced this too with a quite new iBook. Before Tiger I'd get battery life of just under 6 hours. Afterwards I'm lucky to get 5.
I believe it's correctly attributed to Spotlight, as every now and again, even when the machine is sitting plugged in and resting on my kitchen counter, I can hear it whirl it's harddisk as if it's indexing.
I would like a control panel applet to tune Spotlight, but I can wait. I already did my part in the deal (gave them an email and a submission on their website).
And for the trolls of the world, Apple's not perfect either. This is the first time this kind of tool has been included in an operating system, and it's something that will take quite a bit of time to tune and work out correctly. To be honest, in all of my works to do something similar, I've came out with the same results to a much lower quality, and any tool I've seen to do the same will probably harm my battery's life even more.
"Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
Well, half a gig is what I'd call the bare minimum for an operating system like OS X anyways. People might cry foul, but Windows XP isn't really usable at under that notch either, as I can currently tell you, running Windows XP on a box with 192 megs of ram and crying every time I try to close winamp.
Widgets really aren't that big a harm, unless you install and use a hundred of them. Frankly, on my iBook, I use 3 widgets, and could live without 2 of them (the TV guide I won't give up).
Mail.app has never been that great, in my opinion, but I have a general problem with all mail utilities, so I'm not going to attest to anything here.
Tiger's still a kitten, in my opinion. A few service patches later I feel it'll start to come into its own, but right now, it's not the best. Keep in mind that Apple has this record of things not being exactly the best on release. It's a work in progress, and it's still better than it's competitors in my book.
"Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
DisableTigerFeatures 1.0.3 - FREE
http://software.filkifan.com/
Mighty Mouse dissected detailed pictures and 76 widgets at once
http://homepage.mac.com/hogfish/PhotoAlbum2.html
Watching my DotMac bandwidth get Slashmelted - PRICELESS
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.
I've noticed that lithium batteries sometimes degrade so rapidly (after 18 months or more of reliable service) that people sometimes associate the battery performance problem with some event -- a software upgrade or application install -- which was coincident with the battery demise. Sometimes they are so certain of the causality of the association that they won't buy a new battery.
... *not* ... *open* ... *nuclear cannister* ...
Once they finally do, they are thrilled to discover that it's like having a new laptop again, with nice long battery life. Well, long by today's standards. I'd like a battery that could last a year, but I'm concerned by my own temptation to disassemble things to see how they are made...
*must*
Things should be made as simple as possible, but not any simpler. -- Albert Einstein
#!/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
It seems like ever since I switched to Tiger my PB has been much more prone to long swapping sessions like I've seen Windows boxes do. Plus, moving large files around seems far slower. I have 1GB Ram and 1.67Ghz processor and the system feels quite slow compared to Panther at times. It is very frustrating to say the least. I upgraded from a 1Ghz TiBook which ran Panther and it feels like I downgraded a lot of the time. Anyone know if there's a solution to this? And why the hell does flash take 100% CPU even for small banner ads? That drives me crazy.
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.
All it does now is respond to new files being created or files being changed. It doesn't need to scan for these as it is told directly by the operating system when the changes take place.
The constant disk access must be some other process.
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.
laptop:/# cat /proc/acpi/battery/BAT1/info
present: yes
design capacity: 6600 mAh
last full capacity: 5312 mAh
battery technology: rechargeable
design voltage: 14800 mV
design capacity warning: 300 mAh
design capacity low: 200 mAh
capacity granularity 1: 32 mAh
capacity granularity 2: 32 mAh
model number: 01NT
serial number: 16412
battery type: LION
OEM info: LGC-LGC
I haven't yet used a meter to see how much the power comsumption is going up, but through use of the menubar utility Menu Meters, I've caught CPU use being unexpectedly high at times. Even without meausuring the power I'm certain that it increases, as my old TiBook fires up the fan after these periods of high CPU activity.
The primary source of unexpected CPU load for me turned out to be certain animated banner/skyscraper animated ads. I haven't looked at page source to figure out just what they were, but I suspect Flash. Reloading pages and getting the ads to change has brought the CPU use back to very low levels while sitting on a page. I've even seen these high-cpu ads on Slashdot at times.
Although I haven't seen a problem with any Apple-supplied Dashboard Widgets, some third-party widgets use more CPU than I'd expect when they're in the background.
The Options section of the Energy Saver control panel allows setting reduced processor performance. That helps too. Separate settings are available for battery and adaptor operation. I find myself using the "reduced" setting even for adaptor operation at times just because I don't like the computer to get so hot. It's fine on a glass desktop or coffee table, but really cooks on a bedspread!
Activity Monitor should help spot processes that are using the CPU heavily. It and Menu Meters can show disk activity also, but I haven't found a way to tell which processes are using the disk. I haven't noticed much activity I'd attribute to Spotlight, except when first connecting a Firewire drive.
It is very easy to see what's going on with power consumption if you measure the power going into the AC adaptor (best done when you've reached the fully charged state, but you can still see changes while charging).
I use a small meter I picked up at Radio Shack called the "Kill A Watt". It makes it very easy to see how much effect things like screen brightness settings have (a bunch).
I think many on Slashdot would find one of those meters useful. They're very handy for spotting things around the house that use power even when off. Using one was enough to get me to swap most of my generic AC adaptors with transformers for the variety with switching supplies (most easily identified by their lower weight).
Tests revealed that even my soldering stations had the transformer cores energized when "off". I rewired them to put the power switch before the transformer instead of after. Metering also easily showed the effects of over (and under) clocking PCs here. Watching power consumption everywhere not only helps laptop battery life, but the environment and the the budget. A fast and dirty rule of thumb I use for estimating cost is $1 a month for every 10 Watts that's consumed 24 hours a day. (Those AC adaptors, cable/satellite boxes, routers, VCRs, microwave ovens, doorbells, thermostats, amplified speakers, remote-control devices etc are probably all using some power all the time!)
try lowering the brightness level of the screen, and having your screen go to sleep quickly... power management
Sig Hansen?
Yeah powering a spotlight with my PowerBook really drains the battery.
"Well, half a gig is what I'd call the bare minimum for an operating system like OS X anyways. People might cry foul, but Windows XP isn't really usable at under that notch either"
False. Windows XP runs great in 512 MB RAM.
"as I can currently tell you, running Windows XP on a box with 192 megs of ram and crying every time I try to close winamp."
How about comparing apples to apples? You're comparing an 192 MB RAM machine with XP, to a 512 MB RAM machine with Tiger. We're talking more that 2.5 times difference in memory size. _If_ that's the kind of difference needed to make Windows XP swap like Tiger, then you're just telling me that Tiger is a horrible memory hog.
A polar bear is a cartesian bear after a coordinate transform.
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.