Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Defraging with Journaling?

Defraging with Journaling?
Thread Tools
Liquidity X
Mac Elite
Join Date: Dec 2001
Location: Windham, ME
Status: Offline
Reply With Quote
Dec 5, 2003, 12:36 AM
 
Ok, i just got Tech Tool 4, and I wanna defrag but says I can't because journaling is enabled, would it be bad to simply disable journaling, defrag and then re-enable journaling? TiA.
     
Telusman
Dedicated MacNNer
Join Date: Jul 2002
Location: Calgary, Alberta
Status: Offline
Reply With Quote
Dec 5, 2003, 01:00 AM
 
I still don't understand peoples need to defrag a file system that doesn't need to be defragged. Unless your experiencing Severe performance degradation that i'd suggest you leave well alone. Defragging a journaled file system does not work because it corrupts the journal, i suggest you don't turn off Journaling and leave well enough alone.

-Telusman



Originally posted by Liquidity X:
Ok, i just got Tech Tool 4, and I wanna defrag but says I can't because journaling is enabled, would it be bad to simply disable journaling, defrag and then re-enable journaling? TiA.
"No ma'am i'm not angry at you, I'm angry at the cruel twist of fate that directed your call to my extension..."
     
Cadaver
Addicted to MacNN
Join Date: Jan 2003
Location: ~/
Status: Offline
Reply With Quote
Dec 5, 2003, 01:08 AM
 
...and, as I've read, Panther will auto-defragment files less than 20MB when they're accessed.
     
Liquidity X  (op)
Mac Elite
Join Date: Dec 2001
Location: Windham, ME
Status: Offline
Reply With Quote
Dec 5, 2003, 01:09 AM
 
yah well i push 20+ gig files around, and panther won't touch them. So is there a way to defrag and have it be safe?
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Dec 5, 2003, 01:42 AM
 
Just turn off journaling, do your defragging, and turn it back on.
     
pdot
Senior User
Join Date: Aug 2000
Location: CA
Status: Offline
Reply With Quote
Dec 5, 2003, 06:08 AM
 
Originally posted by Liquidity X:
yah well i push 20+ gig files around, and panther won't touch them. So is there a way to defrag and have it be safe?
If you're going to be moving around such large files, you may want to give OS X or your workspace its on partition. That way, you won't have to worry (not for a long time, anway) about journaling and defragmentation of your OS partition.
Current: XPC SB81P, 3GHz P4, 1GB RAM; Compaq Presario V2410US, Turion 64 ML-30, 512MB RAM
Previous: Sawtooth G4/400 448MB RAM
ATI Radeon 8500 64MB - flashed variant
OS X 10.3.141592653589793238462643383279502884197169399 37510
Future: 13" Widescreen Powerbook, Core Duo Intel
     
malvolio
Professional Poster
Join Date: Apr 2001
Location: Capital city of the Empire State.
Status: Offline
Reply With Quote
Dec 5, 2003, 01:39 PM
 
Originally posted by pdot:
If you're going to be moving around such large files, you may want to give OS X or your workspace its on partition. That way, you won't have to worry (not for a long time, anway) about journaling and defragmentation of your OS partition.
That's what I did. The system is on one partition, and all my major file-moving is done on a second partition.
BTW, I read somewhere that TTP 4 has a "Disable/enable journaling" tool. Do you see anything like that?
/mal
"I sentence you to be hanged by the neck until you cheer up."
MacBook Pro 15" w/ Mac OS 10.8.2, iPhone 4S & iPad 4th-gen. w/ iOS 6.1.2
     
Liquidity X  (op)
Mac Elite
Join Date: Dec 2001
Location: Windham, ME
Status: Offline
Reply With Quote
Dec 5, 2003, 01:58 PM
 
Yah i disabled it in TT and then defrages, which took 14 hours, and then reenabled it.
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Dec 5, 2003, 02:19 PM
 
Disable Journaling, run the defrag, and re-enable Journaling. You cannot harm the system by doing this.

The only time your system would be at risk for corruption would be during the defrag operation itself. Journaling, however, would not save you in that case, because defragging would invalidate the journal anyway.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
jasong
Mac Elite
Join Date: Mar 2000
Location: Allston, MA, USA
Status: Offline
Reply With Quote
Dec 5, 2003, 03:13 PM
 
Yah i disabled it in TT and then defrages, which took 14 hours, and then reenabled it.
So now that you spent 14 hours where you couldn't use your computer while the defragmenter ran, how much faster is it? How long do you think it will take to get those 14 hours back?

Never understood the point of defragging the file system . . .

-- Jason
     
Liquidity X  (op)
Mac Elite
Join Date: Dec 2001
Location: Windham, ME
Status: Offline
Reply With Quote
Dec 5, 2003, 04:22 PM
 
its deff faster, and I let it run all night while I slept, so I lost not time at all.
     
SMacTech
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status: Offline
Reply With Quote
Dec 5, 2003, 04:40 PM
 
Originally posted by jasong:
So now that you spent 14 hours where you couldn't use your computer while the defragmenter ran, how much faster is it? How long do you think it will take to get those 14 hours back?

Never understood the point of defragging the file system . . .

-- Jason
I guess you never have used a drive where the files are heavily fragmented. Especially one where you are writing large files, as Liquidity is. Maybe his computer de-fragged while he was sleeping, oh wait he did do it then.
If files didn't need to be de-fragmented, why would Panther have it built-in now, albeit for files <20mb?
The point is that it does add a level of performance increase, maybe in some cases it is only 1%, others may be substantially more, depending on many things.
     
jasong
Mac Elite
Join Date: Mar 2000
Location: Allston, MA, USA
Status: Offline
Reply With Quote
Dec 6, 2003, 09:50 AM
 
I am not arguing that defragging helps, I just question the value of it. A process that takes 14 hours to run and only delivers a 1 - 10% speed increase gives you very diminished returns (i.e. your Photoshop filter that takes 100 seconds to run, now runs in, at best, 90 seconds). The new HFS+ method for de-fragmentation takes no time to run, so anything that transparent with any speed gain is worth it - good move on Apple's part.

Anyway, you are right that I don't deal with large files so much anymore. I am a web developer and virtually everything I work with is tiny. I do a lot of iMovie work, but I tend to only work on one project at a time, and I have a separate disk that holds all my iMovie files for the current project. I reformat the disk prior to each project, so I doubt this gets very fragmented.

And, I apologize if my tone was derogatory in my original post, my intent was only to question the value of de-fragmentation, and I think it came out a little harsh.

-- Jason
     
SMacTech
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status: Offline
Reply With Quote
Dec 6, 2003, 10:06 AM
 
Originally posted by jasong:


And, I apologize if my tone was derogatory in my original post, my intent was only to question the value of de-fragmentation, and I think it came out a little harsh.

-- Jason
I didn't take it that way, but anything to improve the performance of my Mac is welcomed. TechTool's optimizer always took a very long time. I use Norton SpeedDisk infrequently, and it usually can do it's thing during lunch on my OS partition. My data drives are another story.
     
Dale Sorel
Mac Elite
Join Date: Aug 2002
Location: With my kitties!
Status: Offline
Reply With Quote
Dec 6, 2003, 05:23 PM
 
Originally posted by Liquidity X:
Yah i disabled it in TT and then defrages, which took 14 hours, and then reenabled it.
     
zigzag
Addicted to MacNN
Join Date: Aug 2000
Status: Offline
Reply With Quote
Dec 6, 2003, 10:17 PM
 
One perspective on defragging: http://db.tidbits.com/getbits.acgi?tbart=07254
     
davidb224
Forum Regular
Join Date: Dec 2001
Location: Sacramento, Calif.
Status: Offline
Reply With Quote
Dec 7, 2003, 01:49 AM
 
Originally posted by Cadaver:
...and, as I've read, Panther will auto-defragment files less than 20MB when they're accessed.
Actually there two separate file optimizations going on in Panther.

The first one, as you stated, is Automatic File Defragmentation. When a file is opened, if it is highly fragmented (ie. 8+ fragments) and it is under 20MB in size, it is defragmented. This works by just moving the file to a new location. This only happens on Journaled HFS+ volumes.

The second is called "Adaptive Hot File Clustering". Over a period of 60 hours, the File System keeps track of which files are read most frequently (to be a hot-file candidate, a file must be less than 10MB and never written to).

At the end of the period, the "hottest" files (ie. the files that have been read the most times) are moved to the "hotband" on the disk (which is that part of the disk which is particularly fast given the physical characteristics of the disk).

The size of the "hotband" depends on the size of the disk (ie. 5MB of hotband space for each GB of disk). "Cold" files that were in the hotband will be moved out of the hotband to make room for the hot files. As a side effect of being moved into the hotband, the hot files are also defragmented.

Currently, Adaptive Hot File Clustering only works on the boot volume, and only for Journaled HFS+ volumes that are more than 10GB.

So, AHFC optimizes the location on the hard drive of the files you read the most and in the process defrags those same files "on the fly".
davidb
     
OmniX
Dedicated MacNNer
Join Date: Jun 2000
Status: Offline
Reply With Quote
Dec 7, 2003, 12:43 PM
 
i have heard and read (and seen the Darwin source) about Panther's auto <20MB defragging, but Adaptive Hot File Clustering in Mac OS X is news to me.
Is this a new feature as of Panther? Can anyone else confirm its existence (preferably citing official Apple documents or source)?
     
mrmister
Mac Elite
Join Date: Aug 2000
Status: Offline
Reply With Quote
Dec 7, 2003, 01:05 PM
 
It is new in Panther, though I don't have any references for it handy. Note that defragging your whole drive undoes this, so in a way you'll be taking a step back while you take a step forward.

Defragging isn't worthless--it just isn't anywhere near as useful as it used to be.
     
tkmd
Grizzled Veteran
Join Date: Oct 2001
Location: Michigan
Status: Offline
Reply With Quote
Dec 7, 2003, 02:01 PM
 
I use cocktail to clean out sys/vm swap file /user cache's. Will deleting these caches erase the log kept on the most used files for AHFS?
Pismo 400 | Powerbook 1.5 GHz | MacPro 2.66/6GB/7300GT
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Dec 7, 2003, 02:41 PM
 
Originally posted by tkmd:
I use cocktail to clean out sys/vm swap file /user cache's. Will deleting these caches erase the log kept on the most used files for AHFS?
That information is probably well hidden. I don't think it's something you could delete even if you wanted to.
     
ngrundy
Dedicated MacNNer
Join Date: Nov 2002
Location: Hobart, Tasmania, Australia
Status: Offline
Reply With Quote
Dec 8, 2003, 12:09 AM
 
wouldn't it be somewhat easier and probably quicker to copy the data off onto a backup/external drive. Format your work drive and copy the data back?

As a formated drive has no data on it the 'fragmented' files would stream back onto the drive in one piece.
1Ghz Powerbook
40gb/1x512mb/combo/T68i
FireRAID 1 Host Independant Hotswap RAID 1 (80gb)
     
chabig
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Dec 8, 2003, 12:42 AM
 
That information is probably well hidden. I don't think it's something you could delete even if you wanted to.
It's not very hidden. It's at /.hotfiles.btree

So deleting cache files won't affect the hot file clustering.

Chris
     
digital_dreamer
Junior Member
Join Date: Jul 2003
Status: Offline
Reply With Quote
Dec 9, 2003, 05:13 AM
 
I could never stand defragging with Drive 10, and would stop it well before finishing because it�s way too slow. TTP 4 seems to use the same technique - S-L-O-W.

Although I use Diskwarrior for fixing directory problems, Norton�s Speed Disk is the tool to use for defragging.

I just used Speed Disk on a 80GB HD that was 90% full on OS X 10.1 Server last weekend. It defragged some 300,000 files in 4 hours. Some of the files were fragmented in over 1,000 pieces (one was >1,800).

I wouldn�t install any of the crap from Norton�s SystemWorks (it doesn�t even let you modify the installation ). But, Speed Disk is the bomb when it comes to physically reorganizing your files on the HD, IMHO.

regards,
MAJ
     
Arkham_c
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Dec 9, 2003, 11:26 AM
 
Another point on defragmenting -- if you have enough disk space, you will not get significant fragmentation to start with. When HFS+ allocates space, it attempts to minimize fragmentation by writing to the largest contiguous block. If you always have plenty of space, you won't get fragmented to start with.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
SMacTech
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status: Offline
Reply With Quote
Dec 9, 2003, 11:38 AM
 
One of my Macs with a 40gb drive that I used to install the Panther betas on had very little fragmentation as reported by speed disk. It wasn't optimized, as files were spread all over the disk. However, the number of non-contiguous files was something around 400 out of 200,000 files with 10gb of free space. This was after about 7 or 8 installs of panther. Not too shabby, I think.
So as Arkham_c pointed out, and I concur, a lot of this is impacted by free space on the drive.
     
orry_main
Forum Regular
Join Date: Jan 2000
Location: Portland, Maine
Status: Offline
Reply With Quote
Dec 9, 2003, 01:31 PM
 
Originally posted by SMacTech:
One of my Macs with a 40gb drive that I used to install the Panther betas on had very little fragmentation as reported by speed disk. It wasn't optimized, as files were spread all over the disk. However, the number of non-contiguous files was something around 400 out of 200,000 files with 10gb of free space. This was after about 7 or 8 installs of panther. Not too shabby, I think.
So as Arkham_c pointed out, and I concur, a lot of this is impacted by free space on the drive.
Is there any easy way to find out just how fragmented a drive is? How did you find out that ~400 files of 200k were fragmented, for example?
     
chabig
Addicted to MacNN
Join Date: Jun 1999
Location: Las Vegas, NV, USA
Status: Offline
Reply With Quote
Dec 9, 2003, 02:20 PM
 
Is there any easy way to find out just how fragmented a drive is?
He said the fragmentation was reported by Speed Disk. That's a Norton product.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:06 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,