MacOS – What are the differences between journaling HFS+ and non-journaling HFS+

disk-formatfilesystemhard drivemacosperformance

I'm about to format an external hard disk drive (HDD).

What are the key differences between journaling HFS+ and non-journaling HFS+? Apart from the fact that one has journaling and the other does not, how does it affect the drive's performance (with numbers)?

My gut-feeling is that in "normal" use journaling would be the way to go, but are there any situations where non-journaling HFS+ should be considered? Linux compatibility is one, since it seems that the kernel's hfsplus module supports read & write on non-journaled HFS+, but only read on journaled HFS+.

Anything else worth mentioning?

Best Answer

I don't have numbers to back up the statement, but using HFS+ non-journaled is a good idea in certain volumes that require absolute speed, without worrying (too much) about a possible "data loss" or "data corruption" in case of power failure or similar.

When is using HFS+ Non-journaled a BAD idea?

  • External (USB, FW, ESata) drives that are connected and reconnected often: It's usually a bad idea, since these drives tend to be accidentally disconnected very often and or their power sources unplugged.

  • Partitions where data integrity is important and protection from an unexpected power loss is a must. (Documents, Music, Videos, Backups, etc).

When is using HFS+ Non-journaled a GOOD idea?

  • Scratch, Temp, trivial storage and similar drives and partitions, where speed is > data integrity in case of power fail. You want your Final Cut scratch volume to be non-journaled (you do have an UPS anyway, don't you?). You want your Photoshop temp to be non-journaled. Drives to copy stuff around (a Pen drive for example if you take care of properly ejecting).

  • Any other drive that requires portability and compatibility like you correctly pointed out.

Remember, maintaining the journal adds a small overhead, but the benefit in case of improper volume dismount are important, no only to avoid a full disk "scan" at startup or re-mount, but also in terms of making sure that data is not corrupted in the first place.

Mounting a non-journaled drive that has been incorrectly unmounted, will cause a fsck scan, whereas the journaled drive will be able to be up and running in a shorter period of time (scanning the journal and applying uncommited transactions).

Regarding Speed and tests, I don't have much info to back up the above claim, however, as far as I know the speed difference not only is very small and even hard to notice, but in some case Journaled filesystem is faster than non-journaled.

Turn out that despite the overhead of the journal, some operations can be made asynchronously in the Journaled drive, whereas the non-journaled version has to perform things synchronously.

For reference I googled a little bit trying to find an old comparison (the numbers are probably valid since HFS+ hasn't really changed much since their first iterations in OSX, other than adding Inline Attribute Data records, and access control list file security and maybe something else.

Here's the website with the charts:

Comparison Between HFS+ Journaled vs HFS+ Non-journaled

TL;DR:

The file copy/duplicate/copy sequence was pretty much equally fast for both journaled/non-journaled HFS. The same sequence with the folder was again somewhat faster with the journaled HFS

(emphasis mine)

Conclusion

I am somewhat surprised to see the above results, as I was kind of convinced that using Non-Journaled was really faster for some operations, but apparently the little cases where it can make a difference, it's overweighted by the "safety" of Journaling.