title
Products            Buy            Support Forum            Professional            About            Codec Central
 
Results 1 to 6 of 6

Thread: pre-allocate files to avoid fragmentation

  1. #1

    pre-allocate files to avoid fragmentation

    I just converted a number of files from FLAC to MP3 for portable use. Because the converter runs in multithreaded mode it manages to fragment each file quite significantly - three Keith Jarret files (long, to be sure) are 234, 579, and 605 fragments. While Windows will get around to defragmenting them over time it would, in the meantime, improve the performance of the conversion if you pre-allocated then truncated the files based on a reasonable guess of the target size. If one is writing to a USB thumb-drive the performance improvement would be orders or magnitude; even writing to disk will be dramatic.

    I think this is the method for doing this:

    http://msdn.microsoft.com/en-us/libr...setlength.aspx

    It can extend the size (without actually writing data) or truncate (if you extended too far).

    Thanks.

  2. #2
    Administrator
    Join Date
    Apr 2002
    Posts
    41,695

    Re: pre-allocate files to avoid fragmentation

    Not a bad idea

  3. #3

    Join Date
    Jun 2011
    Posts
    10

    Re: pre-allocate files to avoid fragmentation

    Perhaps an option "encode to RAM"?

    I have been experimenting with a RAMdrive and [encode local]. My concern was the performance hit of thrashing 8 files (quad core w/hyperthreading). There is a HUGE performance boost if the output is written to the same HDD as the input files, not so much using different drives. I wasn't thinking of the resulting fragmentation.

    My idea for "encode to RAM" is it would work similar fashion, but without forcing the user to install RAMdrive software.

  4. #4
    dBpoweramp Enthusiast
    Join Date
    Jan 2009
    Location
    Lund Sweden Europe
    Posts
    61

    Re: pre-allocate files to avoid fragmentation

    Quote Originally Posted by Sardonyx View Post
    Perhaps an option "encode to RAM"?
    Well you already have the "encode to local disk" DSP why don't you check it out. When it is finished with your file (building file, adding tags, running user-specified external progs) it will move your file to another (network) location

  5. #5

    Re: pre-allocate files to avoid fragmentation

    I vote for this as well.

  6. #6
    dBpoweramp Enthusiast
    Join Date
    Dec 2009
    Posts
    126

    Re: pre-allocate files to avoid fragmentation

    Quote Originally Posted by smisk View Post
    Well you already have the "encode to local disk" DSP why don't you check it out. When it is finished with your file (building file, adding tags, running user-specified external progs) it will move your file to another (network) location
    I don't seem to see an "encode to local disk" DSP. Is there another name for it? Or does it needed to be downloaded separately? If so, would you mind sharing the URL?

    Thanks,
    Mike

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •