Microsoft KB Archive/259837

= You May Not Be Able to Copy Large Files on Computers That Are Running Windows NT 4.0 or Windows 2000 =

Article ID: 259837

Article Last Modified on 2/20/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows NT Server 4.0, Terminal Server Edition
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Workstation 4.0 Developer Edition
 * Microsoft Windows NT Server 4.0 Enterprise Edition

-



This article was previously published under Q259837



SYMPTOMS
When attempting to copy a large file, the copy process does not work and you may receive an error message.

When you try to copy / paste using Explorer GUI:

Cannot copy : Insufficient system resources exist to complete the requested service.

When you try to use xcopy or copy from a command prompt:

Insufficient system resources exist to complete the requested service.

-or-

When you try to send the file via FTP command, you receive the following misleading message which results in a zero byte file being created on the destination FTP server:

ftp> send

Local file f:\bigfile.bin

Remote file bigfile.bin

200 PORT command successful.

150 Opening BINARY mode data connection for bigfile.bin.

> f:\bigfile.bin:Invalid argument

226 Transfer complete.

NOTE: This article does not describe any issues that you may have after a file-copy operation successfully starts copying the source file to the destination file.



CAUSE
This problem can occur because the functions used by all of the copy utilities that are included with Windows NT 4.0 and Windows 2000 use buffered input/output (I/O) to transfer data from the source file to the destination file. Whenever buffered I/O is performed on a file, there is a paged pool memory overhead requirement that is proportional to the size of the file. Because paged pool memory is a limited resource, there is an upper limit on the size of file that can be copied.

Since all of the paged pool that is required to buffer an entire file is allocated when the first read or write procedure is performed on the file, the file copy operation fails immediately, instead of half way through the operation.



RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack



WORKAROUND
To work around this problem, you may be able to copy or move large files by using backup or restore tools because these tools use different functions to read and write data.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 2.

Software update 280790, which also addressed the problem that is described in this article, was integrated into Windows 2000 Service Pack 2 (SP2).

Note Because of the scope and complexity of the necessary changes, there are no plans to release a fix for this problem in Windows NT 4.0, either as a hotfix or as part of a service pack.



MORE INFORMATION
The CopyFileEx and CopyFile functions are used by all of the standard file-copy utilities that are included with Windows NT 4.0 and Windows 2000. These utilities include COPY, XCOPY, and Explorer. The resource kit utility, Robocopy.exe, also uses the CopyFileEx function; therefore, all of these tools have the same limitation.

Because these functions use buffered I/O, the maximum size of a file that you can copy depends on the amount of paged-pool memory that is available at the start of the copy procedure and on whether the Physical Address Extensions (PAE) kernel (which allows access to memory above 4 gigabytes [GB]) is in use.

With the standard kernel, 1 kilobyte (KB) of paged pool is required for each megabyte (MB) of file size that is opened for buffered I/O. Because there are two files involved in a copy procedure, 2 KB of paged pool are required for each MB in the source file. When the PAE kernel is used, the overhead is doubled and 4 KB of paged pool is required for each MB in the source file.

Service Pack 2 (SP2) for Windows 2000 contains a fix for this limitation. The kernel memory manager has been altered with respect to management of paged pool memory when files are opened for buffered I/O. This change permits buffered operations on arbitrarily large files and therefore permits arbitrarily large files to be copied by any utility that uses the CopyFileEx function.

Additional query words: mmst

Keywords: kbfile kbpending kbprb kbqfe KB259837

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.