Existing users, log in.  New users, create a free account.  Lost password?


MacFixIt Logo
 
Contact Us | About MacFixIt | Who's Online  

Page 1 of 5 1 2 3 4 5 >
Topic Options
#207202 - 06/09/04 05:44 PM A disucussion on Why Defrag - By MMT3
Alex_6 Offline
New User

Registered: 06/09/04
Posts: 1
This thread is a discussion related to a thread entitled "Why Defrag" in the Mac OS X Tips & Hints forum by MicroMat Tech3. Moved to Tech Issues.

==================================

What precisely is the status of this post?
Is it the advice/opinion of MicroMat? If so, why doesn't it appear in MicroMat's forum or on its web site?

Is it the personal advice/opinion of someone who also happens to be a MicroMat employee? If so, it should be clearly indicated.

In my opinion, there are serious problems with it, which should be pointed out, because it has been repeatedly referred to on a couple of discussion lists.

(1) Clear factual errors. For instance,

"The first three pieces (extents) of a Macintosh file are
recorded in the Catalog B-Tree. Any additional pieces are
recorded in the Extents B-Tree.[...] "

Actually, according to Apple tech note TN 1150 (an overview of HFS+), the catalog B-tree may contain up to 16 extents per file.

(2) Dubious assumptions (unwarranted, or clearly in contradiction with TN1150). For instance,

"I do not know the relationship between allocation block size and
clump size [...] "

"[...] if the relationship is linear.) [...] "

"[...] the new piece of Catalog B-Tree or Extents B-Tree [...]
is required to be written to disk space that is not only free,
but contiguous [...] "

The latter statement is directly contradicted by TN 1150:

"The special files [...] can appear in any order and are not
necessarily contiguous. [...]"

But the crux of the matter is here:

"[...] If the amount of contiguous free disk space is less than the
clump size, and a new piece of Catalog B-Tree or (more
likely) Extents B-Tree must be added to the disk, an older
piece of Catalog B-Tree or Extents B-Tree is overwritten. [...]"

This statement is simply outrageous. It assumes a fundamental error in the design of HFS+ or of Mac OS X which would put to shame a 3rd year comp. sci. undergrad, and which certainly did not exist in HFS. Such an assumption can only be accepted on the basis of strong evidence, and no such evidence is provided.

Yet, even granting all these flawed assumptions, the conclusion (that 85% of the disk should be free), still doesn't follow! According to the poster's own logic, on a 100GB volume, this irretrievable damage to the catalogue should occur when there is less than 200MB contiguous space free. That is, 0.2%, not 15%!


Edited by Ockham (06/10/04 02:00 PM)

Top
#207203 - 06/10/04 06:02 AM Re: Why Defrag - By MMT3 [Re: Alex_6]
MacManiac Offline
Moderator

Registered: 09/18/01
Posts: 6017
Loc: San Diego, CA (that's my story...
Alex,

Welcome to the forums. From the look of your first post, you've been around the block with computers a few times now. I'd like to see this discussion continued, however, the Mac OS X Tips & Hints forum is not the right place -- but Tech Issues would be -- so, your post should move over there later today (mildly edited to include appropriate links back to this thread for continuity). Your points with reference to the technical docs are well taken and I look forward to seeing how this resolves.
_________________________
  • MacFixit Forums Moderator

Top
#207204 - 06/10/04 06:02 AM Re: Why Defrag - By MMT3 [Re: Alex_6]
MicroMat Tech3 Offline
MacGuru

Registered: 10/08/99
Posts: 16666
You are correct that the first eight, not the first three pieces of each fork of a file on an HFS+ volume are recorded in the Catalog B-Tree. In fact, having a fork in more than eight pieces (or, in other words, having at least one extent recorded in the Extents B-Tree) is one of the requirements that must be met before a file is considered for hot-file clustering.

I had intended to fix the error, and will fix it and see if any other revisions are required. Congratulations on being the first one to point it out. It shows that some people read carefully, even when on the Internet.

The article is based on research done by the developers of TechTool Pro, who have been studying the failure modes of HFS and HFS+ disks for over ten years. I have personal opinions about industrial design, but rarely have them about computing. I try to get the best information I can, from people in a position to know. If anyone at MicroMat objected to any of the content in my article, I would fix it.

If the Catalog B-Tree or Extents B-Tree needs to grow, its new extent must be written in disk space that is both free and contiguous (all in one piece), but I did not mean to suggest that the new piece must be added to the end of the preceeding piece. Thank you for pointing out the possible misinterpretation. In fact, we have now seen volumes in which the Catalog B-Tree has seven extents, with the last one far removed from the earlier ones. The first release of Drive 10 had to be revised in order to be able to handle such a disk directory properly. The heavily-fragmented disk was in the condition in which it left the factory.

It is simply an observable fact that if the Catalog B-Tree or Extents B-Tree needs to grow, and sufficient free contiguous disk space is not available, an earlier piece of this crucial file is overwritten. I know some people find it hard to believe, but the experiment is repeatable.

The guideline of keeping at least 15% of the disk free at all times is intended to ensure that enough free contiguous disk space exists for the proper growth of the Catalog B-Tree and Extents B-Tree. If the volume is heavily fragmented and has less than 15% free space, the chances that the largest piece of free contiguous disk space is less than the clump size increase to an extent that is unacceptable. The 15% of the disk that should be left as free space does not have to be both free and contiguous. What must be both free and contiguous is sufficient space for the growth of the disk directory, the amount of disk space called "clump size."

Keep in mind that swapfiles must be in a single extent. The journal file must also be in a single extent.
_________________________
MicroMat Inc
Makers of TechTool

Top
#207205 - 11/16/04 05:27 AM Re: Why Defrag - By MMT3 [Re: MacManiac]
RAngol Offline


Registered: 01/20/01
Posts: 166
Loc: US
Mac Maniac

So what happened to the discussion? You suggested it be moved to Tech Issues and I've already been at:

Why Defrag - By MMT3

which refers the reader to above link (original post in this thread)

If it wound up in Tech Issues I can't find it via search engine or any link in the two message threads (this one and the one referenced above). Do you recall that the thread simply died? I was under the impression it was extended somewhere.

Have also linked to the Apple Forum discussion and found no MacFixIt link there.

I originally linked to

Why Defrag - By MMT3

because I made a copy of it when it was first posted, along with the link. I have other information from MacFixIt related to this subject but which is not a part of these two topics. (I also have all the information from two main message threads from MacIntouch.) I have no interest in the UfS issues, on Mac HFS+. While there are a variety of other threads on various MacFixIt topics and on the Micromat forum, I do not find general commentaries on the issues of file location, matters relating to directories, etc., only incidental references. These two articles, the one above and the one referenced by the URL, are IMHO the best information Ive found as too many traditional Unix sers, for example, seem confused about Mac HFS+. Apple has no technical papers in Developer's that I find useful. There are some good discussions on the AppleCare forums, but again, I'd like to track more information from the knowledgeable Micromat techs as they seem to have a better handle on technical aspects and gleaning information piecemeal from individual replies on specific problems is doing it hte *very* hard way.

RAngol
MacFixIt Pro Member
(And actually a member of this forum the first day Ted Landau first set it up


Edited to replace long URLs with hyperlinks, to avoid browser window stretching.


Edited by cyn (11/16/04 01:10 PM)
_________________________
I was born not knowing and have only had a little time to change that here and there. - Richard P. Feynman

Top
#207206 - 11/16/04 07:21 AM Re: Why Defrag - By MMT3 [Re: RAngol]
MacManiac Offline
Moderator

Registered: 09/18/01
Posts: 6017
Loc: San Diego, CA (that's my story...
I think Douglas Adams would have had a good time with this one.....

This thread has been located in the Tech Issues forum since the 10th of June......and so also is your post therein.
_________________________
  • MacFixit Forums Moderator

Top
#207207 - 11/16/04 08:53 AM Re: Why Defrag - By MMT3 [Re: MacManiac]
RAngol Offline


Registered: 01/20/01
Posts: 166
Loc: US
Lee

Thanks for comment. Yes, Mr. Adams likely would have been pleased with the two non-threads.

But they would also have given him something to comtenplace. LOL

Jerry
_________________________
I was born not knowing and have only had a little time to change that here and there. - Richard P. Feynman

Top
#207208 - 11/16/04 04:59 PM Re: Why Defrag - By MMT3 [Re: MacManiac]
dianne Offline
Moderator

Registered: 06/30/01
Posts: 1954
After reading the title of the first post by Alex_6, I added the concept of a “Dis - u - cussion” to the unit on Small Group Communication this Fall semester.

Admiring your new animated gif.
_________________________
MacFixIt Forums Moderator

• Back up everything you can’t afford to lose — documents, mail, movies, music, photos, and other data and settings.

Top
#207209 - 11/16/04 04:59 PM Re: Why Defrag - By MMT3 [Re: MacManiac]
RAngol Offline


Registered: 01/20/01
Posts: 166
Loc: US
Very true, but I know how smart ex-Navy pilots are as I used to give them instructions on where to fly their birds and certain tasks for me so I just KNEW you'd find my message.

They made a *few* mistakes with loads of napalm or 500 pounders that happen to land a couple of miles away from the target, but usually the wrong place wasn't really harmed by the bombs, etc. (except possibly a few monkeys).

This made some of the gyrenes unhappy but there was usually a couple more aircraft piloted by guys who'd had enough sleep to hit the target when I called them for backup work.

Am certain from all your good work on MacFixIt that you belonged to the crowd who got enough sleep, although my war may have been earlier than yours.

Mr. Adams would have found my job rather boring as I was usually under tons and tons of sandbags on an ugly, red dirt hill and it was so hot in there that my guyrene liasion officer, his man and mine, and I sometimes wore only our skivvy shorts while working. No one else was dumb enough to visit us and we were always "summoned" if someone wanted to shoot the breeze or consult with us on matters they thought (wronngfully in most cases) needed our attention, but Marine Colonel types were not among my favorite people, essentially had no authority over me, but I tolerated them because of getting out into the nice, cool 100 degree temp, 100 deg humidity, and in the rain about half the year. Good way to get your clothes washed.

Please private message or email me if you wish to further discuss Douglas Adams.

PS I don't care where my post wound up since I got since an interesting and clarifying post from you that I had indeed done found both pieces of the semi-threads.

(I need more confusion in my life anyway.)
_________________________
I was born not knowing and have only had a little time to change that here and there. - Richard P. Feynman

Top
#207210 - 11/16/04 05:09 PM Re: Why Defrag - By MMT3 [Re: RAngol]
MicroMat Tech3 Offline
MacGuru

Registered: 10/08/99
Posts: 16666
But you must have been captivated by TechNote 1150: HFS Plus Volume Format.

While technically interesting, there is nothing in this document that suggests refining the way you manage your disks.
_________________________
MicroMat Inc
Makers of TechTool

Top
#207211 - 11/16/04 05:11 PM Re: Why Defrag - By MMT3 [Re: dianne]
RAngol Offline


Registered: 01/20/01
Posts: 166
Loc: US
Thanks. I shall go in search of it. Didn't turn up on MacFixIt search engine but I rarely use that correctly anyway.

Now with your name I may get lucky.


_________________________
I was born not knowing and have only had a little time to change that here and there. - Richard P. Feynman

Top
Page 1 of 5 1 2 3 4 5 >



VersionTracker: Software Updates and Downloads | iPhone Atlas: iPhone Help, News, Tutorials, and Tips