Defrag -> Frag utility

Does anyone know of a utility (or way) to will FRAGMENT a HDD. I need to
test defrag. on my Scsi Port driver.

I’m currently running win2000 w/FAT32

Thanks,

Daniel

I would guess that you could write one my creating a large number of
files of length 512, close them, then open and extend then to 1024, etc. It probably
would not matter that they were all in the same directory.

-DH
----- Original Message -----
From: “Nemiroff, Daniel”
To: “NT Developers Interest List”
Sent: Monday, May 22, 2000 7:18 PM
Subject: [ntdev] Defrag -> Frag utility

> Does anyone know of a utility (or way) to will FRAGMENT a HDD. I need to
> test defrag. on my Scsi Port driver.
>
> I’m currently running win2000 w/FAT32
>
> Thanks,
>
> Daniel
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@syssoftsol.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>

NTFS seems to fragment much more readily than the FAT filesystems.

The easiest way to heavily fragment a volume is to concurrently run multiple
XCOPY sessions to the victim disk. Ideally use large (eg 100MB+) files for
the copy operations. What will tend to happen is that the destination files
get interleaved on the target disk as the lazy writer flushes the data to
the disk. Run another XCOPY sessions copying multiple small files to the
output disk as well.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Nemiroff, Daniel [mailto:xxxxx@intel.com]
Sent: Monday, May 22, 2000 4:18 PM
To: NT Developers Interest List
Subject: [ntdev] Defrag -> Frag utility

Does anyone know of a utility (or way) to will FRAGMENT a HDD. I need to
test defrag. on my Scsi Port driver.

I’m currently running win2000 w/FAT32

> Does anyone know of a utility (or way) to will FRAGMENT a

HDD. I need to
test defrag. on my Scsi Port driver.

Interesting! I’ve never heard of such a tool (but one would imagine that
the likes of Symantec would have them internally), so I think you’re going
to have to write your own.

I imagine a good algorithm might be to do something like:
– Open 1000 files for writing with appending.
– Write (append) a random number of bytes to a randomly chosen
file.
– Continue until you’ve written 5 GB or whatever.
– Close all your files.

You may want to flush to disk after the write so that the file system
caching doesn’t get in the way of your fragmentation.

I’m not a file systems person; that’s just my guess as to a quick-and-dirty
method.

----- Original Message -----
From: “Taed Nelson”
To: “NT Developers Interest List”
Sent: Monday, May 22, 2000 8:37 PM
Subject: [ntdev] RE: Defrag -> Frag utility

> > Does anyone know of a utility (or way) to will FRAGMENT a
> > HDD. I need to
> > test defrag. on my Scsi Port driver.
>
> Interesting! I’ve never heard of such a tool (but one would imagine that
> the likes of Symantec would have them internally), so I think you’re going
> to have to write your own.
>
> I imagine a good algorithm might be to do something like:
> – Open 1000 files for writing with appending.
> – Write (append) a random number of bytes to a randomly chosen
> file.
> – Continue until you’ve written 5 GB or whatever.
> – Close all your files.
>
> You may want to flush to disk after the write so that the file system
> caching doesn’t get in the way of your fragmentation.
Some filesystems may use the cache to cluster blocks, others may
try to prevent extents from being broken up while the file is open.
This is why I’d do the “flush” with a close/open.
-DH

PS. You’d get a significant speedup with ~10 threads.

>
> I’m not a file systems person; that’s just my guess as to a quick-and-dirty
> method.
>
> —
> You are currently subscribed to ntdev as: xxxxx@syssoftsol.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>