OS X directory fragmenting

Captain Code

Moderator
Staff member
Mod
Has anyone else noticed, that after using OS X for a while apps seem to get slower to open up? I booted into OS 9 to do a defrag & optimization with Norton and it said that the directories were severely fragmented.

Once I did the defrag and optimization, OS X is a whole lot faster when opening apps.

What's up with this?
 
Hi,

Since you have experience, perhaps you will know. I remember reading that disk defrag/optimization under OS9 was for some reason dangerous if you had an OSX on the same partition. This puzzled me, since I figured that if the whole thing is HFS+, then how could a file reorganization hurt anybody?

Is using Norton to defrag/optimize on a dual boot powerbook dangerous?

-ZeroAltitude
 
Earlier versions of Norton speeddisk and possibly Techtools, didn't know about OS X files, like hidden files beginning with a period (.), and would sometimes screw things up.

So far, I haven't had any problems with using Norton to defrag and optimize my disks, and also to repair them.

As long as you have the latest version of Norton, I think you should be OK.
 
actually optimizing with norton is always dangerous due to the method they use. if you suffer a power outage you could lose some or all your data. on the other hand it is the quickest so you might be less likely to have a power outage. quite frankly i have come to distrust norton in general for a variety of reasons.

It is important to regularly defrag & optimize if you want to keep any system up to speed. osx gets really slow after an update if you haven't done one recently. it is very important to use the latest versions of any app you use for this to make sure stuff that goes together stays together.

so far the only way to defrag is while running 9. no one has gone x native for this task. :(
 
I don't presume to speak for Ed, but I have had a fair amount of experience defragmenting my OS X partition.
Alternatives to Norton Utilities would be either Alsoft PlusOptimizer (included with DiskWarrior) or TechTool Pro 3.05. I personally have used both PlusOptimizer and Norton Speed Disk. Norton completes the defrag faster, and as long as you use the correct profile (either Speed Disk 3.2 or a custom OS X profile), it does a decent job.
 
below is my run down on the three geghis mentioned. i prefer and recomend the plus optimizer/diskwarrior combobut i would ad that both are very simple itnerfaces. techtool pro is by far the most imformative and comprehensive tool, but i had at least one instance lately where only diskwarrior saved my disk.

so techtool pro, plus optimizer (partner to diskwarrior) and speed disk (norton utilities) are the three i have used.

1. techtool pro - also a good diagnostic and repair tool, includes a virus checker. is perhaps the best value of all. defrag is done seperately from optimization and will at times only defrag if certain conditions are not met. claims to be completely safe in preventing loss of data in case of interruption. drawback - slowest of the three.

2. optimizer plus - can be bought alone or with diskwarrior - i recommend getting the combo. diskwarrior saved my drive when all others failed recently. op is also interuption safe and does partials in case of obstacles. it is slightly faster than TTP.

3. speed disk - part of Norton utilities which also diagnoses and repairs. fastest of them all. can lose all your data if interrupted. defrags and optimizes in one sweep but will not circumvent obstacles. least recommended but the one most people have because they advertise and promote the most .

the latest version of all these work with osx but must be run from another disk using 9.
 
So, does anyone know why OS X fragments the directories, and by doing so, makes itself slower?

Defraging my drives significantly reduced the amount of time it took to open an application.
 
any system fragments the files after a while. I am not sure about my explanation, but this is my understanding of it -

your system will by default attempt to place files nearest to the begining of the drive. as files are deleted it opens up new space that may not be large enough for your next file to fit in, so part of it goes there and part of it goes to next open space. temp files and caches are constantly being added and deleted. of course you probably add and delete files as well. so over time your drive is jumping all over the place to find the info it needs to access whatever you want to do. obviously browsers will suffer from this quite a bit as their caches are moved around. so every so often you put things back together in an orderly fashion and it goes faster again.

just imagine you need to to a task - do you work faster if you have everthing you need in one pile in front of you, or when you have to go collect a little of it in every room of the house and it must remain in the room you found it?

hope this helps.:)
 
I know how fragmentation works, but I'm asking why does OS X fragment the directories, as OS9 doesn't. The directory fragmentation significantly impacts the launching of apps, as I've mentioned. I wouldn't think that it would be good to have this used as a server if it's doing that.
 
where do you get the idea that 9 doesn't? all the optimizers were developed long before nine and still only run in 9. an osx native optimizer has yet to be developed. so i really don't understand what you are asking?

I'm trying really hard though!!
 
Well, if I run OS 9 for a long time without optimizing, say a month, it won't say in Norton that the directories are severely fragmented, and if I do the same with OS X(which I've had running for about a month or so), and I just did an optimization the other day, it said in Norton that the directories were severely fragmented.

So, I say that OS X does it and OS 9 doesn't for that reason.
 
Well, lets compare os9 and os x system folders. OS 9 is darn right small compared to osx. OS X has thousands of directories in /system and /usr. Which os9 didn't have. Also, applications are technically .app directories on mac os x.

Here's a new question: Under the UFS file system, do files still fragment?

You may recall how ext2 and ext3 (linux) file systems create markers and indexes so that when files are created they are placed in specific areas of the drive.... so does UFS do this, too?
 
first let me say i defer kilowatt's question to anyone who would know. i don't know linux or ufs or any of that.

i think kilowatt makes valid points about the nature of classification and the shear number of files that are used. i would also think that while norton possibly differs in the way it reports the fragmentation, overall file fragmentation is likely about the same.

or maybe you're right and one variable that you might not be considering is your own use of the system. chances are that while using 9, which was not leaps and bounds away from previous systems, you had a pretty regular pattern of use. you used the same apps over and over, only occasionally trying something new. the amount you took on and off of your disk was minimal and predictable. updates were pretty close together and then nothing for quite a while. you weren't adding new programs every week or even monthly. you were pretty much the guy with all the resources sitting in front of him.
then you start using osx, you're upgrading your apps as often and as quickly as you can. you're searching the download sites regularly and trying and discarding new software that works with x. you may even be buying new software built for x. you are opening up and reusing disk space at a much more rapid pace. you can now run several apps at once without crashing so you are potentially creating more temp and cache files than ever before. and maybe you're even using the computer more just to learn more about how the new system works and how to make it better. I could go on, but i think you see where i am going. you are now the guy rushing all over to get resources, only now you are bringing them back and adding them to your first pile. and you're pulling them out and thowing them all over the desk and not putting them back in the pile in the same order. so you must reorganize the pile more often. the longer you let it go without organizing, the harder it is to organize. at least i know this description fits me and the difference in use between x and 9.

ok devonferns, i know you didn't need me to throw the analogy into this part - that was for others who read this. by now I know you know the advantages of optimizing, but so many people visiting this site don't. I have spent more time lately talking about defragmentation & optimization than i would have ever imagined. but thank goodness people are learning about it and starting to take it seriously. Your question is a great one for general discussion and is worth all of us considering all the possible contributions to it. I am sure my offerings are just a slice of this pie.
short story - last summer while using my stepdad's 4-5 yr old pc, i discovered he had never optimized or even run a diagnostic and repair program. he thought NAV was all he needed. his hd thrashed so loudly you could hear it in the next room. needless to say everything took forever. when i told him about it, his response was "i like that sound, it's how i know it's doing something." AAAAAAGH!!!!:eek: He did go buy systemworks the same week, though.

if this thread continues, it could be worthy of consideration in the faq's.:)
 
kilowatt and Ed,
You are probably both right with some of your points.

I suppose I have been installing quite a few programs lately, and that coupled with the number of files OS X and it's programs seem to use probably amounts to the greater fragmentation of the directory structure of my disk.

Now for another related point:
I seem to remember someone saying a while back that OS X was supposed to do background optimization of the disk. Is that true? Maybe that's only with the UFS format?

I also don't know about the UFS disk structure and fragmentation.
 
i wonder if the optimization that devonferns is talking about is a different type of optimization - like prebinding or something? I guess my related question is how many different ways/methods of optimizing a disk and the system are there with osx? We've been talking about physical optimization, but we know that the system installer and Xoptimizer do a kind of mapping type of optimization. and how do the two methods interact? is it necessary to do another prebinding optimization after a physical one?
 
One other reason OS X might fragment disks more than 9 is that OS X logs a fair amount of stuff. There are a lot of files in /var/log that is being written to constantly, then every day or so the old log files get compressed and the oldest backup ones get deleted... In OS 9, basically no logs were kept of day to day system operation, I think.
 
Back
Top