GreenGoblin

Defragging Ntfs Under Xp?

Recommended Posts

I'm getting a new laptop for home and work with a 40Gb 5400 IDE disk and Windows XP. I'll load a couple of games, many MP3s, utility applications, MS Office and associated documents and PDFs. No databases or huge files. I've always used FAT32, but my research shows I should use NTFS and have a single 40Gb partition.

Questions:

1. Should I go with the default 4kb cluster size or 8kb for better performance?

2. I currently use PerfectDisk 2000 5.0 on FAT32 under Win2K - will running this on NTFS under XP cause more harm than good (see details below)?

Windows XP: Kernel Improvements Create a More Robust, Powerful, and Scalable OS -- MSDN

1/4 of the way down, "Prefetch"

"How does this scheme provide a performance benefit? The answer lies in the fact that during typical system boot or application startup, the order of faults is such that some pages are brought in from one part of a file, then from another part of the same file, then pages are read from a different file, then perhaps from a directory, and so on. This jumping around results in moving the heads around on the disk. Microsoft has learned through analysis that this slows boot and application startup times. By prefetching data from a file or directory all at once before accessing another one, this scattered seeking for data on the disk is greatly reduced or eliminated, thus improving the overall time for system and application startup.

To minimize seeking even further, every three days or so, during system idle periods, the Task Scheduler organizes a list of files and directories in the order that they are referenced during a boot or application start, and stores the list in a file named \Windows\Prefech\Layout.ini. Figure 1 shows the contents of a prefetch directory, highlighting the layout file. Then it launches the system defragmenter with a command-line option that tells the defragmenter to defragment based on the contents of the file instead of performing a full defrag. The defragmenter finds a contiguous area on each volume large enough to hold all the listed files and directories that reside on that volume and then moves them in their entirety into that area so that they are stored one after the other. Thus, future prefetch operations will even be more efficient because all the data to be read in is now stored physically on the disk in the order it will be read. Since the number of files defragmented for prefetching is usually only in the hundreds, this defragmentation is much faster than full defragmentations."

3/4 of the way down, "Defragmentation Improvements"

"Microsoft virtually rewrote file system defrag support for Windows XP to remove the dependency on compressed-file routines and the Cache Manager. This means that data movement works at granularity of a single cluster for uncompressed files and that defragmentation works on NTFS volumes with cluster sizes larger than 4KB. Also, defragmentation is now supported on encrypted files.

The other big enhancement is support for online defragmentation of the MFT and most directory and file metadata. Finally, there are a number of odd special cases in the Windows 2000 defragmentation interface that made writing a defragmenter especially challenging. In Windows XP, while the defragmentation API interface has remained unchanged, the way you can use it has improved enormously, which means better defragmentation that will result in better system performance"

I believe that defragmenters, e.g. PerfectDisk and O&O use a different scheme for file arranging to this, so they undo the defrag benefits XP's defragger provides. Should I use PerfectDisk (or alternate) or just use XP's defragger along with the SysInternals utils (Contig and Page...)?

Share this post


Link to post
Share on other sites

1. How would performance be better with 8k clusters?

2. I don't know if PerfectDisk 5 is XP compatible, but I can't imagine that it would hurt you greatly. Version 6.0 (which I use) has Windows XP-specific options and integrates well. That said, the defragmenter that comes with Windows is perfectly serviceable, if a bit inconvenient.

Share this post


Link to post
Share on other sites

Thanks for the reply, sechs.

1. Performance would be better with 8k clusters because the disk head would read more data per cluster, i.e. only needing to read 128 8k clusters for a 1Gb file instead of 256 4k clusters.

Yes? No?

2. I've quoted the MSDN article because I'm trying to find out whether any defragger would cause more harm than good specifically with XP's prefetch defrag optimisation. Does anyone know of any defraggers that work in conjunction with XP's defragger rather than against it's file layout pattern?

Thanks...

Share this post


Link to post
Share on other sites
Thanks for the reply, sechs.

1. Performance would be better with 8k clusters because the disk head would read more data per cluster, i.e. only needing to read 128 8k clusters for a 1Gb file instead of 256 4k clusters.

Yes?  No?

2. I've quoted the MSDN article because I'm trying to find out whether any defragger would cause more harm than good specifically with XP's prefetch defrag optimisation.  Does anyone know of any defraggers that work in conjunction with XP's defragger rather than against it's file layout pattern?

Thanks...

ad 1) NO. afaik win2k/XP read/write data in 64kB blocks no matter how large the clusters are.

8kB cluster size may slightly improve performance (very slightly and maybe only hypotheticaly) because there will be only 1/2 of clusters (vs 4kB) and thus MFT will be about 1/2 smaller.

Share this post


Link to post
Share on other sites

If your worried about defragging and WinXP, then get Diskkeeper8

Given they made the version in WinXP......

I'd suggest save your money and use the built in defragger and see if it does what you want for now.

Then try the trial deskeeper and see if it does anything worth the money.

Use the default cluster size. It the default as that what MS think are best for general WinXP Home/Pro usage.

You could always alter it later with a program like PartitionMagic8

Share this post


Link to post
Share on other sites

Perfect Disk 6 gives you the option of letting Microsoft manage the layout.ini files, but they recommend that you let Perfect Disk manage them. Upgrade!

-- Rick

Share this post


Link to post
Share on other sites

i simply run a scheduled xp-native defrag nightly, and i don't feel i'm missing out on anything. unless you're a defrag-several-times-per-day-because-i'm-working-on-massive-crap type of guy, i don't really see the value in spending money on defrag apps anymore.

Share this post


Link to post
Share on other sites

The cluster is just the allocation unit. It has nothing to do with how much is written or read. Changing the cluster size is only going to change the slack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now