Filename>>copyTo: and 64-Bit Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Filename>>copyTo: and 64-Bit Windows

Holger Kleinsorgen-4
Hello,

a warning to those who use Filename>>copyTo: to copy large files ( >= 1
GB): On systems running 64-Bit Windows, this can cause a major
performance penalty caused by page thrashing. For instance, copying a
4GB file on a system with 8GB took 15 minutes, and during the copy the
entire system was almost non-responsive (it sometimes took 30 seconds
and longer until the system responded).

Further investigation showed:
- Microsoft changed the system cache size on 64-Bit versions (see
http://support.microsoft.com/kb/294418/EN-US/).

- For some reason, #copyTo: is not implemented as a single OS call, but
uses two IOAccessors and a buffer to copy the data. This does not only
increase the CPU load of the copy operation, but also seems to trigger
the page thrashing.

- 32-Bit versions of Windows and 64-Bit Linux systems don't suffer from
such effects

The solution is to implement an OS call for copying files, or to use a
shell command.

A performance comparsion:
- Filename>>copyTo: copied 4.5MB per second
- CopyFile (Windows API) copied 40MB per second.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc