Rebooting to fix Brutally slow Apple Time Machine backups

Hey all,

I’ve been experiencing brutally slow backup times over Time Machine. My 14GB backup has been going on for 24 hours.

I’ve tried some of the tweaks listed in this forum, but the only thing that seems to fix it (and temporarily only) is rebooting the MBLD. I’ll then be able to perform a backup in an hour or so. Further backups are back to being brutally slow.

I SSH’d into the box and it looks like the load average is 4+:

top - 16:57:07 up 4 days, 21:09, 1 user, load average: 4.17, 4.13, 3.92
Tasks: 96 total, 1 running, 95 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.6%us, 28.5%sy, 7.6%ni, 38.4%id, 23.2%wa, 0.1%hi, 0.5%si, 0.0%st
Mem: 253632k total, 245440k used, 8192k free, 36224k buffers
Swap: 500544k total, 61568k used, 438976k free, 88640k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17725 nobody 5 -15 14528 6528 2112 D 5.8 2.6 103:56.06 afpd

The biggest CPU hog seems to be this recursive ls that runs once a minute or so as root. I’m not sure if it’s related to afpd, or if it’s something else:

root 28229 12.2 2.4 8640 6336 ? RN 16:55 0:05 ls -s1NRA --block-size=1 /shares
root 28232 0.3 0.7 4480 1984 ? RN 16:55 0:00 awk ? {? if ($1 ~ /^[0-9]+$/) {?# printf("#4:%s:%s/%s\0\0\0\0",$1,current_dir,substr($0,index($0,$2)));? printf("#4:%s:%s/%s~~~~",$1,current_dir,substr($0,index($0,$2)));? }? else {? if ($1 != “total”) {? current_dir = (substr($0,1,length($0)-1));? }? }? }? END {? printf("#0:0:/tmp/TALLYEND.DONE~~~~");? }?

Any ideas? 

Hi, check if some of the suggestion on the link below help.

http://wdc.custhelp.com/app/answers/detail/a_id/5736

Unfortunately none of these tips seems to help. The backup basically crawls unless I reboot the MBLD. 

Nothing in the console either. Before the backup, where it was crawling unbelievably slow.

2013-01-31 11:08:42.095 AM com.apple.backupd[758]: Waiting for index to be ready (100)
2013-01-31 11:09:58.953 AM com.apple.backupd[758]: Deep event scan at path:/Volumes/Extended reason:must scan subdirs|new event db|
2013-01-31 11:10:03.830 AM com.apple.backupd[758]: Finished scan
2013-01-31 11:10:09.958 AM com.apple.backupd[758]: Deep event scan at path:/ reason:must scan subdirs|new event db|
2013-01-31 11:13:51.435 AM com.apple.backupd[758]: Finished scan
2013-01-31 11:15:37.859 AM com.apple.backupd[758]: Found 6973 files (12.03 GB) needing backup
2013-01-31 11:15:38.233 AM com.apple.backupd[758]: 16.56 GB required (including padding), 805.45 GB available
2013-01-31 11:27:13.393 AM com.apple.backupd[758]: Cancellation timed out - exiting
2013-01-31 11:34:42.128 AM com.apple.backupd[1422]: Starting manual backup
2013-01-31 11:34:42.177 AM com.apple.backupd[1422]: Backup failed with error: 19

And after the reboot, when things were backing up quickly again (6GB done in 15 mins so far):

2013-01-31 11:36:09.754 AM com.apple.backupd[1422]: Waiting for index to be ready (100)
2013-01-31 11:37:37.469 AM com.apple.backupd[1422]: Deep event scan at path:/Volumes/Extended reason:must scan subdirs|new event db|
2013-01-31 11:37:44.534 AM com.apple.backupd[1422]: Finished scan
2013-01-31 11:38:34.719 AM com.apple.backupd[1422]: Deep event scan at path:/ reason:must scan subdirs|new event db|
2013-01-31 11:41:28.880 AM com.apple.backupd[1422]: Finished scan
2013-01-31 11:43:06.526 AM com.apple.backupd[1422]: Found 7185 files (12.03 GB) needing backup
2013-01-31 11:43:06.842 AM com.apple.backupd[1422]: 16.57 GB required (including padding), 805.31 GB available

OK, I’ve noticed what seems to be a pattern. If my MacBook runs low on disk space on the system drive, it *may* trigger really slow Time Machine updates over the network after. Rebooting the MBLD is always required to make things run faster, although sometimes I may need to reboot the MacBook as well.

I think that the MacBook might be ditching the file event log when running low on space, and this tickles something, causing the ultra-slow backups.

Just a heads up - this problem is still occuring with the latest firmware. Rebooting the MBLD every time it starts getting slow when backing up still fixes it. I’m going to try recycling certain services over SSH going forward - maybe I can figure out exactly which of the services is causing the problem.

Alright, I tried the following this time when it got slow:

Stopped the netatalk services

Stopped the monitor.io service

Stopped apache2

I restarted afp, but it was just as slow as before - backing up 300MB in about 15 minutes. Rebooted and now I’m already at 1 GB, in just a couple of minutes.

I’m really puzzled here - nothing that should be affecting Time Machine backups is running. Could this be a hardware issue with one of the HDDs that’s fixed when rebooting the device?

Any other ideas?

Alright. I’ve given up diagnosing this myself and I’m going to try using the support channels.