Speedup hint: UFS Filesys is Sssssslloooooowwwwwwwwwwwww


<p>After f0rking around with MacOS X for the last week I've found that the UFS* filesystem seems to have VERY poor performance on my iMac 500 SE.

<p>(UFS = Unix File System, the 'other' type allowed under the Disk Setup Util during install)

<p>Under PB:
<p>I installed with UFS as the 'install-to' destination.
<p>1. Could never get Classic to run. (Turned out the trick was to copy the 'Classic' folder to the HFS+ partition on which I had 9.1, but anyhow..)
<p>2. File system performance was DOG SLOW! I just chalked this up to being a beta and figured there was a lot of debug code in place, but the disk sure was thrashing around a lot for even minor things.

<p>Under 10.0.0
<p>I wiped my entire HD clean and repartitioned with
everything on one great big 30GB HFS+ partition.
Also immediately installed the DevTools because I'm a developer.
<p>1. This was MUCH FASTER than PB! Almost as fast as 9.1.
<p>2. Noticed that file names are not case sensitive in HFS+. This offends my puritanical Unix hacker sensibilities, so I decide to reformat and try out UFS. (I do most of my work with Unix and java stuff)
<p>3. After reformatting with UFS, it was dog slow again. Even slower than PB. Started to consider that UFS sucks when it comes to performance.

<p>Under 10.0.1
<p>I added the 4L5 patch with no improvement in speed. This is not surprising since I use DevTools, which does the same prebinding optim. as 4L5.

<p>Finally I got tired of the slowness and reformatted my drive:
<p>Partition 1: 10GB HFS+
<p>Partition 2: 18GB UFS

<p>I then installed (fresh) MacOS 9.1 on P1, then installed OSX on P1 along with 9.1. P2 just gets mounted under /Volumes/Unix and I symlink my 'work' directories to it for doing Unix hacking that likes old style case sensitive filesystem semantics. Also, things like tar can get the resource fork on UFS, since it's hacked as ._<foo> and is thus visible, unlike with HFS+.

<p>This configuration is MUCH FASTER! Just like when I first installed on HFS+ only! With UFS, my system would take twice as long to boot as my P2/450 Peecee running Win2k Pro, and that's saying a LOT! Now it boots in half the time that Win2K does. That's roughly a 4x speedup! Logins used to take about a minute and now they come up in 5-10 seconds or so. MUCH BETTER!

<p>The moral of this story?
<p>Don't use a UFS filesystem as your install destination. It's too slow! Use HFS+ as the system/install partition, and maybe have a second UFS partition for doing Unix stuff if you're into that. If you don't give a hoot about Unix, you probably just want to use HFS+ for everything anyhow.

<p>Another advantage of installing on HFS+..
<p>Classic just works. You don't have to copy the Classic folder from (I think) 'Applications' to a folder on the HFS+ partition, since it's already ON the HFS+ part.

<p>To get an idea of the performance difference I'm seeing, I saw probably a 5x improvement in perceived speed by switching back to HFS+. YMMV of course. I'm probably also suffering because of a crappy 5400RPM disk, unless the iMac500's come with something faster, so every bit of disk performance improvement helps me.

<p>The question is, Why is UFS so slow? I don't know for sure, but I suspect it could be a number of things.
<p>1. The resource fork hack, requiring two separate inode (basically file) lookups for each file. The buffer cache should speed this up, though.
<p>2. Maybe UFS is doing anal-retentive synchronous write-throughs on writes.
<p>3. Maybe UFS is misconfigured and is not using the buffer cache at all?!?! This would be nasty and would explain the MS-DOS-like disk performance I'm seeing.
<p>4. UFS is decades-old crap anyhow. Give me a journalling file system any day. UFS performance is not exactly stellar under FreeBSD on my peecee.
<p>5. My disk I/O hardware is crap. They don't make iMacs with RAID5 and 15000 RPM disks, and for under $2K. hehe.

<p>I'll bet a good number of folks who are reporting no improvements with either DevToosl install or 4L5/4L7 are running UFS as their main 'install destination' for
Mac OS X.

<p>I dunno. I hope this helps. :)
I tried running the final on UFS and HFS+ just to test the speed difference. Running on HFS+ is roughly 2.5 times as fast as running on UFS on my computer.
Thanks guys. This is JUST the sort of information that I have been trying to find without success so far. I mean, WHY does Apple not mention this on their own site somewhere?;)
What about the scratch (VM). I know with UNIX you have a special UNIX Swap format for VM, but the Mac OS X does not seem to take advantage of it or even offer it as an option.

Have you tried putting the VM on both the HFS+ and the UFS drives?

You stated, "UFS is decades-old crap anyhow. Give me a journalling file system any day. UFS performance is not exactly stellar under FreeBSD on my peecee."

Using the 'tunefs' command you can enable softupdates on your UFS partition. This will speed up your disk considerably. Look here and here for more info. While this will enable faster disk writes/reads on your FreeBSD box, I'm not sure if OSX has this feature or not. I've seen the difference and it is much faster. Let me know how it goes...

I previously had OS X installed on my disk (exclusive HFS+) along side OS 9. Performance was pretty poor, and I was led to believe that a UNIX OS will work better on a UNIX partition. So I backed up, and reinstalled OS X and initialised the whole drive as UFS.

Well OS X worked but I had no means of installing or accessing Classic as OS 9 does not recognise a UFS pasrtition which I find odd as it will happily recognise DOS / Windows formatted disks. An oversight at some stage by Apple? And of course this arrangement is about as useful as a 5 1/4" floppy disk as there are a lack of native "work" apps available.

However... it was just as slow as before if not more so. A bit more R&D showed me that OS X is perfectly happy on an HFS+ partition and works faster too. So, this weekend, I have initialised my drive into 3 partitions:

1 - 6Gb HFS+ for OS X, apps, docs etc. (primary boot)
2 - 8Gb HFS+ for OS 9, classic apps etc.
3 - 3Gb UFS for UNIX specifics (e.g. MySQL), for me to learn UNIX etc.

OS X has clearly been built to cater for the average user incorporating as much of the easy personal system admin familiar to Classic OS users. However there are several functions that are not so easily accessed, and unless you are a minor UNIX deity have little chance in dealing with.

I have seen posts here talking about SWAP volumes for VM, but as I have 640Mb RAM I had turned VM off under OS 9 and things worked just fine. Naturally, the bottom line is performance - not only do us mere mortals have work to do and deadlines to meet, but also for peace of mind. I think I would go insane if things were as slow as they were before (I recently discovered a Quadra 700 in our basement storage area and fired it up - worked fine but as I am complacent with G3 500 performance, it really was at a snails pace!)

So a question I have is do I need a SWAP partition and if so, how do I configure the system take advantage of it?

What is frustrating is that there is no guidance in these matters in any of the documentation from Apple, or at the install stage when you can partition your disk and choose the format type. In fact, when I pressed the help button for the Disk Admin utility, I was clamly informed that no help was available!

So at the end of this weekend, I am still no clearer to understanding the optimum partition / format for the hard drive but what I DO know that this current arrangement works quicker than either of the previous two single partition/dedicated format arrangements.
Here's another advantage to UFS, at least under Solaris: virtually no fragmenting. It is constantly tuning itself to avoid it.
UFS performance seem highly dependent on configuration. On my beige g3 333, with UW/SCSI it was just as fast as HFS+, and it got never got corrupted. HFS+ kept getting key out of order problems.

UFS maybe old, but at least its proven, and readable by other OS's. HFS+ doesn't really have any of the advanced features that are buzzword's right now anyway (journaling, etc.) so the advantages between the two are pretty slim. It sure is nice though to be able to use other fs's to boot and run the computer off of if needed.