Post by R.WieserHello all,
I've got a simple program using CopyFile (kernel32) on an XPsp3 machine to
copy a number of files to a 8GByte, FAT32 formatted USB stick, and notice
that the whole thing slows down to a crawl (about 5 GByte consisting of
50.000 files in over eight hours). I've also tried a another, different USB
stick and see the same thing happen.
Windows task-manager shows my programs procesor usage as zero percent.
Remark: I've used the same program to copy even larger quantities of files
to an USB harddisk, and have not experienced any kind of slowdown there.
I know that an USB stick is rather slow in comparision to a harddisk, but
the above is just ludicrous. :-(
Does anyone have an idea what is going on and how to speed the whole thing
up ?
Regards,
Rudy Wieser
P.s.
I remember having had similar problems while drag-and-dropping the source
folder onto the USB stick. IOW, not a problem with the program itself.
I don't have an answer, for what part of the system is screwing up.
As a workaround, try to package the files with 7-ZIP instead.
https://www.7-zip.org/
You can request 7-ZIP to tar the files, and it also has a
segmentation function, so can ensure that output files are less than
4GB to beat the FAT32 limitations on file size for the archive file.
There is a place in the GUI interface to set segment size.
some.zip \
some.zip1 \___ (Bad illustration of beating 4GB file size
some.zip2 / limit of FAT32... You probably know the file
extension for ZIP better than I do :-) )
Do the compression or packaging step on the hard drive. Then
copy across one or more of the large segment files to the USB stick.
That will give a better idea of the speed of the stick. Large
files will do the fewest directory updates and display more of
the sustained transfer rate of the device.
The reason you don't want to point 7-ZIP at the stick directly
for the output step, is to not give it any excuses this time.
7-ZIP can be used later, to do random access within the archive
on the stick, if so desired. If you need NOTE.txt from the 50,000
files, you can get it without unpacking the entire archive.
By preparing the archive file on the hard drive first, you'll be
doing the largest flash block copies possible that way.
You might also want to inspect the file system of the destination
device and make sure the cluster size is 32KB or whatever, rather
than just 512 bytes. An accidental too-small cluster size will
do stuff like that. Flash page sizes are pretty large, and asking
a USB stick to do things in 512 byte clusters, brings out the worst
(read-modify-write at the physical level) in it. That burns up
the flash write life, like crazy. The 32KB cluster size choice,
is getting closer in powers-of-2, to the true page size in the hardware.
This command, agrees with the value displayed when I select "format"
of the associated USB stick partition letter.
wmic volume get driveletter,blocksize
You can add EXFAT support to Windows XP, via an optional download
and install. EXFAT supports stuff like a 1MB cluster or so, and
EXFAT was designed with Flash storage devices in mind. But again,
there's really no excuse for the poor performance. EXFAT is native
to Windows 7, no installing it as an addon there.
I could use a Sandisk Extreme or Sandisk Extreme Pro and this transfer
would be finished in two minutes, tops.
You can put USB3 on a WinXP era machine, using a plugin card with
a NEC USB3 chip on it. They still sell PCIe versions of those
(a poster bought one a month ago). The NEC chip was one of the few
to include WinXP driver support.
The PCI card version of such things (100MB/sec limit) will be
very hard to find. The bridge chip company got bought up and crushed,
and bridge chips might cost 5x as much as they used to, which has
caused distortion of the computer industry products in response.
This is why they don't put bifurcation logic on motherboards any more.
One company made that happen, via piggish practice.
If you wanted USB3 on your Windows XP machine, and it only had PCI
slots, you needed to be upgrading around ten years ago. That
was back when the PCI to PCIe x1 bridge chip might have been
five bucks or so. And then the bridge chip feeds the NEC chip,
on the PCI card.
Paul