View Full Version : Is there a mac defrag like on a pc?
hania
5th of March 2009 (Thu), 06:16
Ive been trying to find out if its necessary to 'defrag' a mac- as I used to do in a pc. A friend said use optimize in utilities - but I cant find it. I have an imac.
cory1848
5th of March 2009 (Thu), 12:15
Ive been trying to find out if its necessary to 'defrag' a mac- as I used to do in a pc. A friend said use optimize in utilities - but I cant find it. I have an imac.
Short answer is no. But if you inclined to do so, there are third party apps that will do it. Just use disk utility to repair permissions and you should be all set.
MaxxuM
5th of March 2009 (Thu), 12:30
Ive been trying to find out if its necessary to 'defrag' a mac- as I used to do in a pc. A friend said use optimize in utilities - but I cant find it. I have an imac.
Yes, there are programs that defrag Mac OS X, but tests have concluded that there is no real benefit. In some cases access times actually got worse! OS X 10.5 defrags on the fly and smarter hard drives delay writes as long as possible to keep data nicely packed together. The one time that I can think of that defraging OS X would likely benefit you is if you have a lot (hundreds) of 20MB+ files on your boot drive. OS X does not optimize files larger than 20MB, the reason being those files would take too long to defrag and the benefits of defragging large files are small.
hania
5th of March 2009 (Thu), 14:24
Many thanks . Will leave well alone then. :)
interlock
5th of March 2009 (Thu), 15:01
The one thing oyu must do on a regular basis is clear the logs. There are programs out there that can help you with this, however you can do it in terminal with a few commands.
The logs are standard Unix stuff and they need cleared from time to time.
R
cory1848
5th of March 2009 (Thu), 15:14
The one thing oyu must do on a regular basis is clear the logs. There are programs out there that can help you with this, however you can do it in terminal with a few commands.
The logs are standard Unix stuff and they need cleared from time to time.
R
Can you elaborate on this? I have had my mac for 7 years, three OS's installed and never once cleared logs... I have not run into any issues at all with my system. What is the benefit?
Anke
5th of March 2009 (Thu), 15:15
Can you elaborate on this? I have had my mac for 7 years, three OS's installed and never once cleared logs... I have not run into any issues at all with my system. What is the benefit?
I'm intrigued too, I've used macs for years and never heard of it. Any links for more info?
MaxxuM
5th of March 2009 (Thu), 15:37
The one thing oyu must do on a regular basis is clear the logs. There are programs out there that can help you with this, however you can do it in terminal with a few commands.
The logs are standard Unix stuff and they need cleared from time to time.
R
No real need to do this either. There are daily, weekly, monthly and per-usage scripts that run in OS X that clear these logs. Now, if you are determined to do cleanup then download OnyX and start cleaning up. I run the maintenance tools every so often.
Oops, forgot the link to the program. You can find it HERE (http://www.macupdate.com/info.php/id/11582) and may other Mac programs.
neil_r
5th of March 2009 (Thu), 15:41
Can you elaborate on this? I have had my mac for 7 years, three OS's installed and never once cleared logs... I have not run into any issues at all with my system. What is the benefit?
I'm intrigued too, I've used macs for years and never heard of it. Any links for more info?
Just run
sudo periodic daily weekly monthly
(you will be prompted for your password)
in terminal
Anke
5th of March 2009 (Thu), 15:45
Just run
sudo periodic daily weekly monthly
(you will be prompted for your password)
in terminal
Well its chugging away doing something. Thanks for the info. I don't think I've had my macs on between 03:15 and 05:30 for years.
ptbarnum
5th of March 2009 (Thu), 15:46
Use Onyx it's a great program for cleaning logs, cache and over all maintenance. I've used it for years.
http://www.apple.com/downloads/macosx/system_disk_utilities/onyx.html
interlock
5th of March 2009 (Thu), 15:47
As Maxxum and neil_r have said there is a few ways to do this. I have seen a improvement when things started to slow down. BUt I was running out of diskspace at the time.
Can take ages to clear the weekly logs. As far as I am aware this is a throw back to the early days of BSD/Unix. the logs are set to autoclear every week on a Wednesday at 1am say. Most of us the system is in sleep mode so it cant clear the logs.
eeeksNYC
5th of March 2009 (Thu), 16:08
At my job we defrag and repair disk permissions, clear logs, etc etc every month.
With the amount of audio being written and deleted from our local drives, its necessary for us. ProTools and other audio apps, are very picky about free continuous drive space.
We use Tech Tool Pro and a host of other programs to do this. Couldn't hurt for non-mission critical items.
Your mileage may vary.
René Damkot
5th of March 2009 (Thu), 17:28
Another vote for OnyX
FZ1
5th of March 2009 (Thu), 18:08
Just add this to your widgets:
http://www.giantmike.com/widgets/Maintidget.html
Thalagyrt
6th of March 2009 (Fri), 08:56
Just run
sudo periodic daily weekly monthly
(you will be prompted for your password)
in terminal
Those periodic jobs run automatically every day. There's no need to do that at all. Running the weekly jobs and monthly jobs when they shouldn't be run can actually be detrimental to any POSIX type OS.
Thalagyrt
6th of March 2009 (Fri), 09:00
As Maxxum and neil_r have said there is a few ways to do this. I have seen a improvement when things started to slow down. BUt I was running out of diskspace at the time.
Can take ages to clear the weekly logs. As far as I am aware this is a throw back to the early days of BSD/Unix. the logs are set to autoclear every week on a Wednesday at 1am say. Most of us the system is in sleep mode so it cant clear the logs.
The job scheduler (cron) will run missed jobs as soon as possible, so when it next wakes up or even cold boots up it'll run.
Bobster
6th of March 2009 (Fri), 09:00
because OS10 is based on Unix, all the maintenance jobs run at stupid O'clock in the morning, so leaving your Mac on 24/7 the clean up will be done when you're asleep..
i found OnyX a couple of years ago for a friend and she says its great.. so another +1 for OnyX
René Damkot
6th of March 2009 (Fri), 09:29
because OS10 is based on Unix, all the maintenance jobs run at stupid O'clock in the morning, so leaving your Mac on 24/7 the clean up will be done when you're asleep..
Curious: What if the Mac is in deep sleep?
Will it execute on wake? I don't think it does.
Thalagyrt
6th of March 2009 (Fri), 09:35
Curious: What if the Mac is in deep sleep?
Will it execute on wake? I don't think it does.
I answered that a few posts up. Cron runs missed jobs as soon as possible after the time specified, not right on the time specified, so yes, they will run on wake or a cold boot.
René Damkot
6th of March 2009 (Fri), 11:40
Hmmm. Never noticed that, so I guess I have to pay better attention ;)
hania
6th of March 2009 (Fri), 13:01
Tried Onyx- but then found I need to back up the system first .....and then found I don't have enough room to back up the system.............looks like another external drive is on the way................
Anke
6th of March 2009 (Fri), 14:04
I ran it on all my macs and they churned and chugged away for about 10 minutes. I'm sure they felt faster afterwards but obviously we all know they weren't :D
interlock
7th of March 2009 (Sat), 12:06
I answered that a few posts up. Cron runs missed jobs as soon as possible after the time specified, not right on the time specified, so yes, they will run on wake or a cold boot.
Seems 10.5 runs on next startup, thanks for the tip-off Thalagryt, 10.4 and below does not run them on next boot.
Thalagyrt
7th of March 2009 (Sat), 13:14
Seems 10.5 runs on next startup, thanks for the tip-off Thalagryt, 10.4 and below does not run them on next boot.
No problem. It's strange that 10.4 and below don't do that as they use the same software for scheduled jobs. :shock:
René Damkot
7th of March 2009 (Sat), 14:17
That might explain why I never noticed :lol:
10.4.11 here :)
gary88
7th of March 2009 (Sat), 14:32
because OS10 is based on Unix, all the maintenance jobs run at stupid O'clock in the morning, so leaving your Mac on 24/7 the clean up will be done when you're asleep..
i found OnyX a couple of years ago for a friend and she says its great.. so another +1 for OnyX
so is it a bad idea to shut down the computer every night then?
MaxxuM
7th of March 2009 (Sat), 19:29
so is it a bad idea to shut down the computer every night then?
No, once the 'clock' runs down it will perform the cleanup during the next boot up if you have OS 10.5+. Other versions (Jaguar, Panther, Tiger) you'll either have to leave your machine on overnight one day of the week or manually do the jobs. OS 10.5 no longer uses CRON (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/cron.8.html) to do maintenance, it's now up to Launchd (http://developer.apple.com/MacOsX/launchd.html). CRON (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/cron.8.html) is very precise and for this reason if things are not done exactly the way they should CRON (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/cron.8.html) would halt. Launchd (http://developer.apple.com/MacOsX/launchd.html) is a little more forgiving. For more detailed information on daemons go HERE (http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/Daemons.html).
gary88
7th of March 2009 (Sat), 19:45
Good to hear, I'm running 10.5.6. I know there are people who could argue against this, but I shut down my computer every night instead of leaving it in sleep mode.
MaxxuM
7th of March 2009 (Sat), 21:18
Good to hear, I'm running 10.5.6. I know there are people who could argue against this, but I shut down my computer every night instead of leaving it in sleep mode.
You're not the only one. I take my laptop with me to work then bag it. It almost never gets left on overnight. I checked the maintenance files and they were all cleaned up Friday morning at first boot.
Thalagyrt
7th of March 2009 (Sat), 21:32
No, once the 'clock' runs down it will perform the cleanup during the next boot up if you have OS 10.5+. Other versions (Jaguar, Panther, Tiger) you'll either have to leave your machine on overnight one day of the week or manually do the jobs. OS 10.5 no longer uses CRON (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/cron.8.html) to do maintenance, it's now up to Launchd (http://developer.apple.com/MacOsX/launchd.html). CRON (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/cron.8.html) is very precise and for this reason if things are not done exactly the way they should CRON (http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/cron.8.html) would halt. Launchd (http://developer.apple.com/MacOsX/launchd.html) is a little more forgiving. For more detailed information on daemons go HERE (http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/Daemons.html).
Kinda surprising. I knew they migrated everything over to launchd, however I've never had cron be picky in any environment. I manage over 50 UNIX/BSD/Linux systems and never have had a cronjob get missed, even if the machine was down at the time, cron would just fire it up at the next possible slot. Maybe Apple was using a strange release of cron?
Either way launchd is much nicer. :)
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.