Re: file fragmentation project

From: Bart Nessux (bart_nessux_at_hotmail.com)
Date: 06/03/04


Date: Thu, 03 Jun 2004 08:13:28 -0400

Thanks for the advice Kirk, I appreciate it.

Kirk Strauser wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> At 2004-06-02T21:10:02Z, Bart Nessux <bart_nessux@hotmail.com> writes:
>
>
>>In particular, I'd like to write a file fragmentor in Python that will
>>randomly fragment x% of files on a NTFS filesystem into y number of
>>fragments.
>
>
> You may or may not be able to do so, depending on how smart your exact
> version of NTFS decides to be on that given day. Still, the standard
> algorithm to fragment a file m bytes long into n pieces is:
>
> 1) Create n * 2 files, each (m/n) bytes long.
> 2) Delete every other file.
> 3) Write the file to be fragmented, and hope that the filesystem naively
> shoves it into the empty holes.
> 4) Delete the remaining "pad" files.
>
> A similar algorithm is to replace step 1 with:
>
> 1) Fill the entire drive with files (m/n) bytes long.
>
> If the filesystem isn't smart enough to rearrange empty blocks, then that
> should to the trick.
>
>
>>Anyway, would Python be acceptable for this type of project? Speed is
>>somewhat important, but not extremely.
>
>
> You bet. Filesystem speed will be the limiting factor.
> - --
> Kirk Strauser
> The Strauser Group
> Open. Solutions. Simple.
> http://www.strausergroup.com/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
>
> iD8DBQFAvky35sRg+Y0CpvERAkm9AKCOeYJZ3aEbgcFERo8Iy5dxAKD6aQCeMWEO
> bnwx/bkTjkWo+JE/pCrMjvU=
> =CmhE
> -----END PGP SIGNATURE-----



Relevant Pages

  • Re: file fragmentation project
    ... > randomly fragment x% of files on a NTFS filesystem into y number of ... algorithm to fragment a file m bytes long into n pieces is: ... Write the file to be fragmented, and hope that the filesystem naively ... Kirk Strauser ...
    (comp.lang.python)
  • Re: atomicity of reads and writes in ntfs
    ... NTFS, it iis undocumented behavior,. ... If my target file is in one complete fragment then the ... A single physical i/o completes in an atomic fashion, ...
    (microsoft.public.win32.programmer.kernel)
  • UFS1 filesystem compatibility problem under Linux
    ... filesystems under Linux, but this failed. ... time to see why it failed, but I've since downloaded recent kernel ... filesystem blocksize was limited to a small selection of values, ... made regular use of fragment sizes up to and including the block ...
    (Linux-Kernel)
  • Re: Root FS corruption
    ... A subsequent reboot is needed for the ... A fragment ... allows for allocating a new block to the small file, ... Store the nextboot info "not in a filesystem". ...
    (freebsd-current)
  • Re: [PATCH 8/8] vm: Add an tuning knob for vm.max_writeback_mb
    ... Writepage is called on byte 0, and now the filesystem gets to decide how ... ext4 is doing). ... We may fragment the file or we may fragment the ... Which is another way of saying, we *know* the page writeback routines ...
    (Linux-Kernel)