Poor MacBook Battery Life Caused by Time Machine?

My MacBook is my second computer, and I don’t use it much. I use it for testing, for taking screenshots, and for working outside my office from time to time. I’ve been using it a lot in the past week, and I’ve noticed that I’m getting perhaps 6 hours of battery life, without using a lot of apps.

One thing I notice is that two processes, mtmd and mtmfs, pop up frequently, using about 100% of CPU (of a core) and do so for a while. Here’s a screenshot from iStat Menus when that happens:

Processes

These two processes are related to Time Machine, and have something to do with creating local snapshots. But I’m only using the MacBook at my home office, so it’s on the network where my Time Machine backup device is located, and it shouldn’t make local snapshots. It should only do this when it can’t access your Time Machine disk; it then copies those snapshots the next time the Time Machine disk is available.

When I check Activity Monitor, and look at Energy, the app listed as having the highest impact is Time Machine, way above Safari which is the second. So it’s clearly Time Machine that’s killing my battery.

Activity monitor

I’ve contacted AppleCare, and spent a lot of time on this, sending them logs and other data, and I’m waiting to hear back. I reinstalled El Capitan, and nothing changed. Is anyone else seeing this?

Update: I found the following in system logs. I find these entries to be interesting.


12/7/15 18:32:47.000 kernel[0]: Sandbox: mtmfs(552) System Policy: deny(1) forbidden-rootless-xattr
12/7/15 18:32:47.156 mtmfs[552]: could not set attributes com.apple.rootless on destination file descriptor: Operation not permitted: Operation not permitted

12/7/15 19:33:33.810 com.apple.xpc.launchd[1]: (com.apple.mtmfs) Unknown key for Boolean: ForceEnableHack
12/7/15 19:33:33.810 com.apple.xpc.launchd[1]: (com.apple.mtmfs) This service is defined to be constantly running and is inherently inefficient.

46 thoughts on “Poor MacBook Battery Life Caused by Time Machine?

  1. No, but I’ll check it out tomorrow Australia time and get back if I see that it’s so. What I had to do today was disconnect my 2 external drives and shut down, wait a bit and restart my Mac Book Pro. Why! Because I noticed that Time Machine was ‘stuck/halted’ when trying to perform a backup to these drives, and had been so for days! No warning of this, naturally. Just lucky I looked at the menu bar icon and clicked it to see the stall. I’ve no idea why this occurred, but the disconnect drives>restart>reconnect> manually initiate backup seems to have worked. Please Apple, show Time Machine some love!

  2. No, but I’ll check it out tomorrow Australia time and get back if I see that it’s so. What I had to do today was disconnect my 2 external drives and shut down, wait a bit and restart my Mac Book Pro. Why! Because I noticed that Time Machine was ‘stuck/halted’ when trying to perform a backup to these drives, and had been so for days! No warning of this, naturally. Just lucky I looked at the menu bar icon and clicked it to see the stall. I’ve no idea why this occurred, but the disconnect drives>restart>reconnect> manually initiate backup seems to have worked. Please Apple, show Time Machine some love!

  3. Given that Apple no longer cares a whit about OS X quality control, perhaps using the excellent TimeMachineEditor would be a viable workaround. Doing backups only a few times a day instead of every hour would dramatically reduce battery consumption, no?

    • I do want the hourly backups though. These processes are triggered several times an hour, and that is simply wrong.

  4. Given that Apple no longer cares a whit about OS X quality control, perhaps using the excellent TimeMachineEditor would be a viable workaround. Doing backups only a few times a day instead of every hour would dramatically reduce battery consumption, no?

    • I do want the hourly backups though. These processes are triggered several times an hour, and that is simply wrong.

  5. “I do want the hourly backups though. These processes are triggered several times an hour, and that is simply wrong.”

    Well, then you could *still* use the excellent TimeMachineEditor and set it for one hour intervals as your workaround. At least that’d solve the ‘several times an hour’ bug.

    Given Apple’s current quality control on OS X, you might end up waiting a looooong time for a proper fix…

    • It’s not backing up several times an hour. There are processes related to TM that are triggering several times an hour. I’ll try it anyway and see if anything different happens.

  6. “I do want the hourly backups though. These processes are triggered several times an hour, and that is simply wrong.”

    Well, then you could *still* use the excellent TimeMachineEditor and set it for one hour intervals as your workaround. At least that’d solve the ‘several times an hour’ bug.

    Given Apple’s current quality control on OS X, you might end up waiting a looooong time for a proper fix…

    • It’s not backing up several times an hour. There are processes related to TM that are triggering several times an hour. I’ll try it anyway and see if anything different happens.

  7. “It’s not backing up several times an hour. There are processes related to TM that are triggering several times an hour.”

    It theoretically *should* fix that. It turns off Time Machine, and triggers the TM process on whatever schedule you set via something like launchd.

    • Nope, it didn’t prevent those processes from running. They just started up again, after I set up TimeMachineEditor, and about 10 minutes after a full TM backup. Sigh.

  8. “It’s not backing up several times an hour. There are processes related to TM that are triggering several times an hour.”

    It theoretically *should* fix that. It turns off Time Machine, and triggers the TM process on whatever schedule you set via something like launchd.

    • Nope, it didn’t prevent those processes from running. They just started up again, after I set up TimeMachineEditor, and about 10 minutes after a full TM backup. Sigh.

  9. “Sigh.”

    Huh. You could try simply turning off TM, rebooting, and not backing up for a couple of hours to troubleshoot. If you’re still getting the mess even with it turned off, I guess the local snapshot functionality is enabled even with TM disabled. Which is a weird design decision.

    If turning off TM, rebooting, and not backing up for a bit to troubleshoot *does* end the local snapshot nightmare, it just means that those processes never properly quit after a backup is done. And that would explain why the TimeMachineEditor workaround fails, since after it does the backup, even though TM is disabled, the local snapshot processes stick around.

    And it probably won’t work, but you should at least try turning off TM, *rebooting* to make sure the local snapshot processes are quit, and *then* doing a manual backup. Again, probably won’t work, but it’s quick enough to be worth a try. And if it does work, the TimeMachineEditor workaround would actually work around the bug.

    Well, maybe Apple will get around to you in 10.12 or 10.13…

    (Of course, if you can happily live without local snapshots, you could google around and/or muck around to see if there is some way to disable the local snapshot processes. Perhaps there is something in a launchd plist you could disable. Or perhaps there is some way to make the local snapshot processes non-executable. Or maybe there is way to set up a script to forcibly terminate the local snapshot processes after a TM backup is complete.)

    • I found, on the web, a number of articles saying that you can run a command with tmutil that turns off local snapshots. I found it turned off TM entirely, so that’s not a solution either. I’ll try what you suggested: turning off TM, rebooting, etc. But since reinstalling El Capitan didn’t fix it, I doubt that will change anything.

  10. “Sigh.”

    Huh. You could try simply turning off TM, rebooting, and not backing up for a couple of hours to troubleshoot. If you’re still getting the mess even with it turned off, I guess the local snapshot functionality is enabled even with TM disabled. Which is a weird design decision.

    If turning off TM, rebooting, and not backing up for a bit to troubleshoot *does* end the local snapshot nightmare, it just means that those processes never properly quit after a backup is done. And that would explain why the TimeMachineEditor workaround fails, since after it does the backup, even though TM is disabled, the local snapshot processes stick around.

    And it probably won’t work, but you should at least try turning off TM, *rebooting* to make sure the local snapshot processes are quit, and *then* doing a manual backup. Again, probably won’t work, but it’s quick enough to be worth a try. And if it does work, the TimeMachineEditor workaround would actually work around the bug.

    Well, maybe Apple will get around to you in 10.12 or 10.13…

    (Of course, if you can happily live without local snapshots, you could google around and/or muck around to see if there is some way to disable the local snapshot processes. Perhaps there is something in a launchd plist you could disable. Or perhaps there is some way to make the local snapshot processes non-executable. Or maybe there is way to set up a script to forcibly terminate the local snapshot processes after a TM backup is complete.)

    • I found, on the web, a number of articles saying that you can run a command with tmutil that turns off local snapshots. I found it turned off TM entirely, so that’s not a solution either. I’ll try what you suggested: turning off TM, rebooting, etc. But since reinstalling El Capitan didn’t fix it, I doubt that will change anything.

  11. mtmd and mtmfs are using less than 1% CPU even when Time Machine is backing up on my 13” MacBook Pro (late 2013) running El Capitan 10.11.1. My backup device is connected directly to the computer through the USB port.

    BTW, I’ve found that Time Machine sometimes loses contact with a NAS-based backup device after I reboot my Airport Extreme router.

    • For me, those two processes are not active when the backup takes place, but in between backups. backupd is the process that runs the actual backup.

  12. mtmd and mtmfs are using less than 1% CPU even when Time Machine is backing up on my 13” MacBook Pro (late 2013) running El Capitan 10.11.1. My backup device is connected directly to the computer through the USB port.

    BTW, I’ve found that Time Machine sometimes loses contact with a NAS-based backup device after I reboot my Airport Extreme router.

    • For me, those two processes are not active when the backup takes place, but in between backups. backupd is the process that runs the actual backup.

  13. “I found, on the web, a number of articles saying that you can run a command with tmutil that turns off local snapshots. I found it turned off TM entirely, so that’s not a solution either.”

    I strongly assume you mean by ‘turned off TM entirely’ that it also disables a manual TM backup. If my assumption is wrong, then TimeMachineEditor would work.

    Also, here’s a good use for a restart. Try turning off TM, then restarting, then running sudo tmutil disablelocal, then turning TM back on. The theory being that those rogue local backup processes are still running until restart, and thus interfering somehow.

    • I did what you suggested. Once I turn Time Machine back on, those two processes start up immediately, at around 100% CPU each. Even though when I ran the disablelocal command previously, it totally shut down TM. Odd.

  14. “I found, on the web, a number of articles saying that you can run a command with tmutil that turns off local snapshots. I found it turned off TM entirely, so that’s not a solution either.”

    I strongly assume you mean by ‘turned off TM entirely’ that it also disables a manual TM backup. If my assumption is wrong, then TimeMachineEditor would work.

    Also, here’s a good use for a restart. Try turning off TM, then restarting, then running sudo tmutil disablelocal, then turning TM back on. The theory being that those rogue local backup processes are still running until restart, and thus interfering somehow.

    • I did what you suggested. Once I turn Time Machine back on, those two processes start up immediately, at around 100% CPU each. Even though when I ran the disablelocal command previously, it totally shut down TM. Odd.

  15. “But since reinstalling El Capitan didn’t fix it…”

    Assuming none of my simpler solutions work, AND assuming you’re pretty certain you’re relatively alone in experiencing this, you might want to consider a ‘cleaner’ reinstall.

    Aka – wipe the disk, reinstall, and Migration Assistant over from a TM backup, with a clone in place for insurance.

    If that doesn’t work, OBVIOUSLY you’ll need to Rebuild the Desktop, zap the PRAM, and consider defragging your disk. Perhaps you should purchase Conflict Catcher too.

    (Apple has managed to degrade OS X quality control enough over the past 5 years that we’re back to the good old voodoo troubleshooting days. Whoopee!)

  16. “But since reinstalling El Capitan didn’t fix it…”

    Assuming none of my simpler solutions work, AND assuming you’re pretty certain you’re relatively alone in experiencing this, you might want to consider a ‘cleaner’ reinstall.

    Aka – wipe the disk, reinstall, and Migration Assistant over from a TM backup, with a clone in place for insurance.

    If that doesn’t work, OBVIOUSLY you’ll need to Rebuild the Desktop, zap the PRAM, and consider defragging your disk. Perhaps you should purchase Conflict Catcher too.

    (Apple has managed to degrade OS X quality control enough over the past 5 years that we’re back to the good old voodoo troubleshooting days. Whoopee!)

  17. Do you have a hard drive or a SSD? If it’s a spinny drive, check it out for problems. Since drive errors are no longer routinely communicated to operating systems, all sorts of weird stuff can start to happen when a drive starts to fail. Slow downs are the most common, but not the only thing. That SMART Verified thingie? It has nothing to do with the health of the drive, it only means that the drive controller is still alive.

    If you don’t have it, Volitans Smart Utility has a full featured 30 day demo. It can do the full SMART communication with drive, show you what errors the drive is producing, and run short and long tests. Smart Utility can also do regular drive scans and send you email if it detects a problem, which has saved my bacon more than once over the years. It can always talk to internal hard drives, but can’t talk to all external drives; I’ve had good luck with OWC enclosures passing the data, but my Rosewills (newegg house brand) mostly don’t.

    I assume that Time Machine backs up to your NAS? You might want to see if your NAS can show you the full smart info for it’s drives. Quality control on hard drives is so bad these days that they’ve become my prime suspect for many issues. If one of those drives is having periodic trouble, that might trigger TM to do the local backup. If your NAS can send you mail for drive and other problems, it’s worth turning that on.

    • This problem is on my MacBook, which has an SSD. I can’t see how a problem on the NAS would cause Time Machine processes to spawn incorrectly on the MacBook. Backups are taking place every hour as they should. That’s not the problem. The problem is processes that keep running every 10 minutes.

  18. Do you have a hard drive or a SSD? If it’s a spinny drive, check it out for problems. Since drive errors are no longer routinely communicated to operating systems, all sorts of weird stuff can start to happen when a drive starts to fail. Slow downs are the most common, but not the only thing. That SMART Verified thingie? It has nothing to do with the health of the drive, it only means that the drive controller is still alive.

    If you don’t have it, Volitans Smart Utility has a full featured 30 day demo. It can do the full SMART communication with drive, show you what errors the drive is producing, and run short and long tests. Smart Utility can also do regular drive scans and send you email if it detects a problem, which has saved my bacon more than once over the years. It can always talk to internal hard drives, but can’t talk to all external drives; I’ve had good luck with OWC enclosures passing the data, but my Rosewills (newegg house brand) mostly don’t.

    I assume that Time Machine backs up to your NAS? You might want to see if your NAS can show you the full smart info for it’s drives. Quality control on hard drives is so bad these days that they’ve become my prime suspect for many issues. If one of those drives is having periodic trouble, that might trigger TM to do the local backup. If your NAS can send you mail for drive and other problems, it’s worth turning that on.

    • This problem is on my MacBook, which has an SSD. I can’t see how a problem on the NAS would cause Time Machine processes to spawn incorrectly on the MacBook. Backups are taking place every hour as they should. That’s not the problem. The problem is processes that keep running every 10 minutes.

  19. “com.apple.xpc.launchd[1]: (com.apple.mtmfs) This service is defined to be constantly running and is inherently inefficient.”

    Like I say, the first thing I’d try is *wipe* disk, reinstall OS, Migration Assistant back. (Assuming you already didn’t do that full a process when you reinstalled.)

    But also, you could consider messing with the com.apple.xpc.launchd (or some related launchd plist) to see if you can stop mtmfs from launching, Or more drastically, make mtmfs non-executable. If the OS simply can’t access the local snapshot file system, it likely wouldn’t use up CPU time trying to make local snapshots.

    Finally, dunno if you’ve noticed, but a simple Google search on “mtmfs” immediately pops up LOTS of folks who’ve run into similar issues. So at least you’re not alone in your misery. Unfortunately, this has been going on since Lion, so I wouldn’t expect a fix anytime before the Sun goes red giant and swallows the Earth…

    (But when we get down to brass tacks, if you ‘just don’t hold it that way’, you won’t experience any of this. So isn’t this really all your fault, Kirk?)

  20. “com.apple.xpc.launchd[1]: (com.apple.mtmfs) This service is defined to be constantly running and is inherently inefficient.”

    Like I say, the first thing I’d try is *wipe* disk, reinstall OS, Migration Assistant back. (Assuming you already didn’t do that full a process when you reinstalled.)

    But also, you could consider messing with the com.apple.xpc.launchd (or some related launchd plist) to see if you can stop mtmfs from launching, Or more drastically, make mtmfs non-executable. If the OS simply can’t access the local snapshot file system, it likely wouldn’t use up CPU time trying to make local snapshots.

    Finally, dunno if you’ve noticed, but a simple Google search on “mtmfs” immediately pops up LOTS of folks who’ve run into similar issues. So at least you’re not alone in your misery. Unfortunately, this has been going on since Lion, so I wouldn’t expect a fix anytime before the Sun goes red giant and swallows the Earth…

    (But when we get down to brass tacks, if you ‘just don’t hold it that way’, you won’t experience any of this. So isn’t this really all your fault, Kirk?)

  21. You don’t say but I assume that you used the command: tmutil disablelocal
    According to the man page that shouldn’t turn off TM entirely:
    NAME
    tmutil — Time Machine utility

    SYNOPSIS
    tmutil verb [options]
    […]
    enablelocal
    Turn on local Time Machine snapshots. Requires root privileges.

    disablelocal
    Turn off local Time Machine snapshots and trigger automatic cleanup of accumulated local snapshot data.
    Requires root privileges.

    There are manpages, but very brief, for mtmd and mtmfs. Both are to deal with local snapshots – so it kind of looks like they wouldn’t need to run if you did a disablelocal.

    Do they run if you do disablelocal then reboot? Also tmutil has 3 options that may help you see what’s going on:
    tmutil latestbackup
    tmutil listbackups
    tmutil machinedirectory

    I think, though the manpage isn’t clear, that the last one will point to the local snapshot if you have one. I can’t try until I get home as this machine doesn’t have timemachine configured.

    • Yes, as I say above, I tried those commands. But the same two processes kept running every 10 minutes or so.

  22. You don’t say but I assume that you used the command: tmutil disablelocal
    According to the man page that shouldn’t turn off TM entirely:
    NAME
    tmutil — Time Machine utility

    SYNOPSIS
    tmutil verb [options]
    […]
    enablelocal
    Turn on local Time Machine snapshots. Requires root privileges.

    disablelocal
    Turn off local Time Machine snapshots and trigger automatic cleanup of accumulated local snapshot data.
    Requires root privileges.

    There are manpages, but very brief, for mtmd and mtmfs. Both are to deal with local snapshots – so it kind of looks like they wouldn’t need to run if you did a disablelocal.

    Do they run if you do disablelocal then reboot? Also tmutil has 3 options that may help you see what’s going on:
    tmutil latestbackup
    tmutil listbackups
    tmutil machinedirectory

    I think, though the manpage isn’t clear, that the last one will point to the local snapshot if you have one. I can’t try until I get home as this machine doesn’t have timemachine configured.

    • Yes, as I say above, I tried those commands. But the same two processes kept running every 10 minutes or so.

    • After several restarts, and turning off Time Machine, those processes are not launching anymore. Together with Time Mission Editor, as you suggested, things seem to be working OK right now. And aside: I know the developer of that utility, and he is giving me some advice as to things to look for and ways to diagnose the problem.

      I noticed that more than one volume was being mounted during backups. This makes me thinks that somehow the system is holding on to more than one file path, and this could be what has things confused.

    • After several restarts, and turning off Time Machine, those processes are not launching anymore. Together with Time Mission Editor, as you suggested, things seem to be working OK right now. And aside: I know the developer of that utility, and he is giving me some advice as to things to look for and ways to diagnose the problem.

      I noticed that more than one volume was being mounted during backups. This makes me thinks that somehow the system is holding on to more than one file path, and this could be what has things confused.

  23. Hoorah! Toldja TimeMachineEditor was the elixir of life.

    “I noticed that more than one volume was being mounted during backups.”

    I have no personal experience with this stuff, as I’ve got no reason to upgrade to unstable, poorly engineered OS’s just because I have to write about them.

    But my understanding is that mtmfs is all about mounting a Whole New File System just for local snapshots. Which could well be what you’re seeing.

    Let us know if you ever come to final conclusions about your Not So Excellent Adventure.

  24. Hoorah! Toldja TimeMachineEditor was the elixir of life.

    “I noticed that more than one volume was being mounted during backups.”

    I have no personal experience with this stuff, as I’ve got no reason to upgrade to unstable, poorly engineered OS’s just because I have to write about them.

    But my understanding is that mtmfs is all about mounting a Whole New File System just for local snapshots. Which could well be what you’re seeing.

    Let us know if you ever come to final conclusions about your Not So Excellent Adventure.

Leave a Reply to Kirk McElhearn Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.