Measuring Fragmentation in HFS+ 417
keyblob8K writes "Amit Singh takes a look at fragmentation in HFS+. The author provides numbers from his experiments on several HFS+ disks, and more interestingly he also provides the program he developed for this purpose. From his own limited testing, Apple's filesystem seems pretty solid in the fragmentation avoidance department. I gave hfsdebug a whirl on my 8-month-old iMac and the disk seems to be in good shape. I don't have much idea about ext2/3 or reiser, but I know that my NTFS disks are way more fragmented than this after similar amount of use."
Huh? (Score:5, Insightful)
Is this based off of instinct, actual data, or what?
Re:HFS+ defrag source (Score:3, Insightful)
That would seem to defeat the purpose to me. The main reason you want to avoid fragmentation of the data is that fragmented data takes longer to pull from the disk. So if by preventing fragmentation you slow down pulling data from the disk, you have just defeated your purpose.
Re:Give it a rest (Score:3, Insightful)
Re:HFS Filesystem vs. ReiserFS (Score:3, Insightful)
Re:Anonymous (Score:3, Insightful)
Disk Fragmentation (Score:5, Insightful)
sysinternals.com (Score:2, Insightful)
Re:NTFS is not so bad (Score:3, Insightful)
Analysis is complete for: (C:)
You should defragment this volume.
I then looked at the report and found the following:
Total fragmentation = 21%
File fragmentation = 42%
Free space fragmentation = 1%
Pretty bad especially considering I've only had the laptop for less than a month and that I still have over half the 40 gig drive free. Oh and HFS+ in panther is journaled so no loss of file system integrity there. So compared to HFS+ in panther, I'd say that NTFS in XP sucks! It would be interesting if someone has done similar research on ext3.
Re:NTFS is not so bad (Score:3, Insightful)
http://en.wikipedia.org/wiki/NTFS
NTFS has its strong points. It is reliable and has several extensions that make it quite flexible. On the other hand, it's not hard to "outdo NTFS" in some respects. There are many things that HFS+ and ReiserFS do better than NTFS. There are many things that NTFS does better.
I think that NTFS is pretty good when it comes to cataloging changes to the drive. NTFS' speed leaves something to be disired though, and the nature of its fragmentation (though better than FAT32) still presents even more performance problems.
Re:XP users don't defrag? (Score:1, Insightful)
windows install process is a frigging mess copying thing to the drive, uncompressing thenm, then deleteing them... plus other really stupid way's of installing and setting the whole system up.
if you want to increase your fragmentation to 50% install office 2003... that app will thrash the disks for a good 10 minutes during install...
Re:How to determine fragmentation... (Score:5, Insightful)
1. Right click on drive icon, select properties
2. Select Tools tab and click on "Defragment Now"
3. Click on "Analyze"
4. When analysis finishes, click on "View Report"
This shows two list windows, one containing general properties of the disk such as volume size, free space, total fragmentation, file fragmentation and free space fragmentation. The second list shows all fragmented files and how badly they are fragmented.
If you're not using the same tool to measure fragmentation on each OS, how do you know that they're using the same semantics to decide what a fragmented file is?
IIRC, the Linux tools use a different metric to calculate fragmentation than the NT ones.
Re:HFS+ defrag source (Score:5, Insightful)
http://developer.apple.com/documentation/Perfor
In theory, when you install anything (on any system) and have a reasonable amount of contiguous free space on your disk, the installed files should always be unfragmented since I believe that's what most file systems look for first to allocate: a large chunk of contiguous space.
Fragmentation typically occurs more when you open a file, increase its size, and write it back out. But operations that write large files to disk that do not know beforehand what the final size may also do this to some files that were only written once to your disk. For example, some of the largest fragmented files on my HFS+ volume are things snagged with BitTorrent. The fragments in these files are very regular chunks of blocks, which could be the typical 'buffer' size BT grabs when writing.
Re:File allocation Table (Score:5, Insightful)
Re:HFS+ defrag source (Score:5, Insightful)
Then you didn't check hard. Again, HFS+ is a specification of how to write data to media in order to organize another collection of data. The implementation is what handles the defragging. There are no drivers involved as drivers are the software component of a hardware/software union and there is no hardware involved at this level (just logical organization).
Oh please. (Score:2, Insightful)
It's a perfectly valid test -- it measures how much fragmentation can be observed after a certain amount of use. According to your logic we couldn't compare any properties of NTFS/ReiserFS/FAT32/HFS+ because they work differently.
Re:Huh? (Score:5, Insightful)
Why would anybody have a problem with you running Windows XP on your laptop? I'm a card-carrying Linux Zealot, and I don't have a problem with it.
Re:Defragging XP now... (Score:4, Insightful)
No, it's just that the defragger built-in to Win2K/XP is shite. Its runs like molasses in liquid helium, and it almost never does a complete job in a single run. You have to run it several times in a row before it's even close to doing a reasonable job. And if it's your system drive, then there are some files (including the swap file) that it simply won't touch no matter how badly the blocks are scattered. This can be a real pain in the posterior if you're trying to defrag a drive in preparation for a Linux install.
Schwab
Re:Measuring fragmentation in NTFS (Score:3, Insightful)
Re:Defrag = placebo? (Score:2, Insightful)
The problem really rears it's head once the space between the files isn't big enough for the new files, and then things start getting fragmented in a hurry.
And does it make a difference? In disk-intensive things like compiling (lots of small modules that get compiled into big binaries/debug symbol files), it really has an impact. The more the heads have to move around, the slower it all gets.
I also use lots of partitions to isolate things, so that even as it fragments, the fragments don't get too far apart. However, if you do a lot of swapping to disk, the partitions will kill you, unless the swap is on the same partition as where you're working. So I tend to foist the swap off on another drive entirely (all SCSI) so that the seeking is reduced as much as possible.
Placebo? probably is for most people that aren't continually writing/rewriting to disk. But if you're constantly reading/writing/erasing files, it is useful.
Now if I could just figure out a way to safely split up my root filesystem on linux to keep the heavily used trees separate from the not-so-heavily used ones (performance experiment). Mainly my
Re:NTFS is not so bad (Score:3, Insightful)
Youngster. Go back far enough in UNIX and it required PERFECT disk packs to function -- no handling of bad sectors. Of course, those were the days when disk "drives" were the size of a small washing machine, the top opened, and you loaded/unloaded the multi-platter disk pack that was the size of a hat box. Was always interesting to see one of the gurus arrive to troubleshoot your system carrying their own disk pack with their specialized utilities... :^)
Re:NTFS is not so bad (Score:3, Insightful)
Any new machine will have an image dumped onto the hard-drive by the manufacturer.
Most imaging apps don't bother with defragmenting so you probably started out with it fairly fragmented from the initial build of the image.
Re:Unsupported diss, unsupported support (Score:3, Insightful)
OK, I was being a bit snobbish in saying it is not a 'real filesystem', it does have its uses - small devices, floppies, etc. BUT, even when it was originally designed it was considered primitive it had many known flaws, among those: it is very easily fragmented (what we are all talking about, no redundancy to help recover from failure and wastes quite a bit of disk space.
My comparison between NTFS and FAT is valid because if you are running Windows, those are the only two filesystems you have to choose between. Comparing NTFS with, for instance, ReiserFS is not really interesting because they're not really alternatives to each other. Unless you choose your operating system based on what filesystems it supports...
The article was comparing HFS+ to NTFS, not windows filesystems. You your self said NTFS deals with fragmentation far better than many other file systems, most notably FAT (emphasis mine) which implies you were not only comparing NTFS to other windows file systems but to many other filesystems. It was the apparent straw man argument that I was pointing out. NTFS is leaps and bounds better than FAT, I 100% agree with you on that. It could be better, and I wish it was open source (last I checked it was not) but is still the best option window users have.
Re:HFS+ defrag source (Score:2, Insightful)
So glad Apple was the innovator here again... Geesh. (except they are still following in the footsteps of the NT team).
Do a performance anayalsis of files that are even fragmented on NTFS compared to files that are fragmented on HFS+ and you will get part of what I am talking about. Peformance degredation is not as much as an issue with NTFS as it is even with HFS+, read the NTFS whitepapaers.
Additional, critical speed files (like paging files, user hives, etc are always automatically defragged during login and logoff, in addtion to be processed during idle machine time.)
The irony is that NT has been doing this for years, and even Win98 had background defrag and file optimization techniques even with FAT32.
So tell me again about this great HFS+ innovation and how it works so much better at defragging files than NTFS.
I haven't defragged the laptop I am typing this on now for months, and yet, only a small about of large downloads are the files that are fragmented.
Apple geeks get a new feature that everyone has had for years, and they think Job invented the wheel.
Geesh..!!!
Bring on the browser stats! (Score:3, Insightful)
A word about browsers (and any thing else that requires change):
People, in general (more than 50% of them), prefer to resist change, and for that matter, extra work and/or thinking. It's just the way they are. It's what explains product loyalty. In this case, the product loyalty is browser based.
In my job, as a web server support admin, I find that 95%, or more, of the people I speak with in support situations are not even aware of the alternatives available to them. In fact, just last Sunday, a friend of mine was showing off his new Power Book to me (by the way, even though I am a complete Linux advocate, you have to give credit where credit is due: Mac has a great GUI). I had to laugh during his enthusiastic demo of Mac OS X's features when my friend opens up Safari and goes, "Check this out. It's a feature called 'tabbed browsing.'" He was a kid in a candy store and had just found new, profound flavor of buble-gum or something. But, how could I not laugh at this previously 100% Windows user's intron to me of something that I began using in Opera, back around 5.x-6.x (I really don't remember if 5.x had tabs or not. I really don't care since that browser drives me crazy. But that's just me.) Translation: it's be around for years. In my work day I begin with 12-13 of them opening in FireFOx (NT 2000 doesn't like that, even with 512MB RAM, but it gets by well enough). The number of tabs only increase from there, unless there's an accident of closing a tab. But no big deal there either, I just open another one and then drag it back between where I normally would have it in my list of tabs. You won't find any thing like that in a browser direct from MS.
Another example: my co-workers, particularly the NT techs. Most, certainly not all (thank God), of our NT techs still use IE for their work. I don't really know what they need for their work, but I've seen their desktops and their taskbars; WHAT A MESS! It's beyond me why they would waste their time with a browser (read: IE) that doesn't organize their open web pages into one taskbar entity, because they DO use other programs on the NT 2000 desktop, which we all must use at my job, regardless of the servers we admin for. (If you haven't guessed yet, I don't admin for NT servers, I get the please and ease of admining for Linux boxes. And a big THANK GOD for that!)
Back to my point: most people are not aware of features in other browsers AND if they are aware of new inovations (read: tab browsing, which is one reason I will never go back to IE) they are not in any hurry to change and think and evaluate something that, however troubling it can be at times: pop-ups, vulnerbilities, "________________" [fill in the blank], lack of inovation, etc.
So what if most of /. visitors are Windows based? There are plenty of better choices to MS products, even on their own OS platform. But, people the world over resist change; they get stuck in a rut, good or bad in it's results, and they either don't like to change, don't "need" to change, or cannot change. Thus, the end result is resistance to change; for the better or for the worst.
Re:Offtopic (Score:3, Insightful)
Ah, liberal tolerance rears its head again.
Bush lied, Bush continues to lie, and our country is far, FAR more in danger now than when we started this stupid fucking war.
I'd be interested in the metric you use to compute danger, seeing as how there have been exactly zero terrorist attacks on US soil since 9/11. (By the way, were you out protesting the "stupid fucking war" in Serbia, or are Democrats allowed to invade sovereign nations who pose no external threat?)
Bush said he was 100% certain that Saddam had massive stores of WMD and a nuclear program.
Is it just barely possible that maybe he really did believe that, and he was mistaken? Intelligence agencies have been known to make mistakes before. Never mind, I forgot he's from Texas and worked in the oil industry so he's obviously made a pact with Satan.
Oh, but of course, he never ACTUALLY said it. He just IMPLIED it, which makes it all ok, doesn't it? It was a failure of intelligence, which means it ain't his fault! Nothing is his fault! And I mean shit, who needs morals when you're having to deal with them dirty hippie commie faggot libruhls and that libruhl media?
It's amusing watching you guys get progressively more unhinged. Kerry should be leading Bush by a healthy margin given the Iraq situation and that the economic recovery isn't completely visible yet, but when your talking points are all variations on "Bush is a fascist", you can't expect much from the middle. I'm not a huge fan of Bush, but I'll be enjoying his victory on election night just envisioning the enragement of the left.
Re:HFS+ defrag source (Score:3, Insightful)
At some companies, a developer would go to his project manager, propose this feature, and get a head shake. Too much work to test and spec, not worth the gains. Let's devote our time to our core competencies.
Apple on the other hand was built on details like this. In fact, one of my favorite things about OS 10.3 is Expose...a feature nobody really asked for, and now I can't live without it (fuck virtual desktops...I want one desktop I can use!)