Faster through multiple file requests
Posted: 02.01.2008, 02:16
Happy new year!
When processing many small files, for instance when copying directories or comparing directories, FC (like so many programs) gets less fast due to the hard disk's access time to each file.
However, modern disks (most Scsi, S-Ata 2, and some P-Ata like Hitachi) allow to optimize this access time by reorganizing the accesses out-of-order (called NCQ by S-Ata 2). Very efficient, provided that the program issues many file requests in a queue without waiting each one to be completed.
Could FC implement it ?
This needs to use ReadFile() with FILE_FLAG_OVERLAPPED. I believe it works on Win Nt4, 2k, Xp, 2k3 and their successors, but not on W95-98-98se-Me.
For instance in directory compare, FC would detect small files in the directories and issue read requests for up to 50 small files or up to 20MB from the left directory, then request corresponding files from right directory, and compare the files as they become available in Ram.
As each directory is often contiguous on the hard disk, reading many small files from it is very fast, especially if reordering is allowed, but hopping from one directory to the other is very slow.
File copying would benefit the same way and would be much faster than in Windows command.
I can email a Pdf that contains a short example.
Thanks!
When processing many small files, for instance when copying directories or comparing directories, FC (like so many programs) gets less fast due to the hard disk's access time to each file.
However, modern disks (most Scsi, S-Ata 2, and some P-Ata like Hitachi) allow to optimize this access time by reorganizing the accesses out-of-order (called NCQ by S-Ata 2). Very efficient, provided that the program issues many file requests in a queue without waiting each one to be completed.
Could FC implement it ?
This needs to use ReadFile() with FILE_FLAG_OVERLAPPED. I believe it works on Win Nt4, 2k, Xp, 2k3 and their successors, but not on W95-98-98se-Me.
For instance in directory compare, FC would detect small files in the directories and issue read requests for up to 50 small files or up to 20MB from the left directory, then request corresponding files from right directory, and compare the files as they become available in Ram.
As each directory is often contiguous on the hard disk, reading many small files from it is very fast, especially if reordering is allowed, but hopping from one directory to the other is very slow.
File copying would benefit the same way and would be much faster than in Windows command.
I can email a Pdf that contains a short example.
Thanks!