Why is my file copying slowly?

10

2

I am trying to duplicate a folder (around 1GB) in the same directory and the copy rate is quite slow (getting around 600kbps).

I can download large files from the Internet faster than that (2/3 MBps).

Any thoughts?

enter image description here

Note: I am using Windows 7 Professional.

Mahes

Posted 2011-01-25T20:08:32.660

Reputation: 221

2Please do not cross-post the same question on multiple sites. – Daniel Beck – 2011-01-25T20:14:07.533

@Mahes: are you duplicating the files into the same folder? or a differnet named folder under the same parent? are the filenames inside the folder pretty similar? – akira – 2011-01-26T14:43:55.773

@akira: i have tried copying into same folder and different drive as well but the speed is almost same (~600KB/S) – Mahes – 2011-01-26T17:32:51.200

@Mahes: only 1/3rd of my questions answered :) – akira – 2011-01-26T17:40:10.063

@akira: yes tried different named folder under the same parent. NO, the file names are not similar. – Mahes – 2011-01-26T20:36:20.310

Answers

16

This is normal, you are reading and writing to the same physical disk and it can be even worse if you have a lot of files in a single directory.

Otavio Decio

Posted 2011-01-25T20:08:32.660

Reputation: 374

2That's by no means normal, unless he has really a lot of small files. I just copied 600 MB (3000 files) under XP (single disk, enough RAM) in less then 1 minute; this makes 10 MB/s, i.e., 15x faster. – maaartinus – 2011-01-25T21:15:13.153

4600MB x 3000 files is a lot different than 1.1GB x 22,231 files; also we don't know how much disk space he has left or how fragmented his disk is. I had disks performing this bad before. – Otavio Decio – 2011-01-25T21:16:45.813

1Sure, it is different. But his files are about (600/3000)/(1100/22231) = 4 times smaller, so the speed per MB shouldn't be 15 times smaller. But yes, fragmentation may be the reason and actually the answer to this question. And NO, it's not really normal, he should consider defragmenting. – maaartinus – 2011-01-25T23:35:33.443

3@maaartinus: Don't forget the master file table, which needs to be updated for every single file. For 3,000 it won't be that noticeable but for 22,000 it very well may be. Also, you could simply have a faster hard drive than the OP does, so a direct comparison wouldn't be very reliable without more details. – Sasha Chedygov – 2011-01-25T23:59:36.383

12

Small files hurt performance. A big file that you download only needs a single file table entry and is only written. But copying 20.000 files; besides reading + writing, also need to modify 20.000 file table entries. And as commented, even the free space table and disk fragmentation also come into play. Your copy dialog seems completely normal to me, I would worry if it mentions hours for a prolonged time...

Tamara Wijsman

Posted 2011-01-25T20:08:32.660

Reputation: 54 163

5

if the OS has to call 'CreateFile()' a lot things can get a bit bloody and sometimes nasty. in any case, try to disable the 8.3 filename creation since the "make long names short" is kind of bad for the performance. if you have a lot of similar named files which are pretty pretty pretty similar when truncated to 8.3 then you will trigger the 8.3 algorithm very often:

  1. take the long version and truncate it to 8.3 chars
  2. is there any other file with that name already?
    1. nope? cool. insert it as an attribute in the MFT
    2. yes? darn, shorten it to 7chars and append a number. check again 2.

if that loop gets repeated often (there is a limit, but it runs several times for each NEW filename coming in) you will notice really bad speed when it comes to move / create a lot of new files.

read more at http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#short_vs._long_names

aside from that (just as the other answers already said): explorer has a lot do in the sense of creating icons and holding information about the files for that new directory.

akira

Posted 2011-01-25T20:08:32.660

Reputation: 52 754

4

  1. Open "My Computer" or "Computer" from your (Start) Menu or Button.
  2. Right-click the external Hard disk drive from the list and select "properties"
  3. Click the "Hardware" tab.
  4. Highlight the drive your having problems with from the drive list and click on "Properties".
  5. Click on the "Policies" tab.
  6. You will see two radio buttons - "Optimize for quick removal" and "optimize for performance".
  7. If not selected, select .."Optimize for performance" and click on "OK" (external.hard drive drive) If running Vista or Windows 7 also check "enable write caching on the disk"(Internal hard drives).
  8. Click on "OK" and exit.. make sure it's done on both hard drives

Zadett Rosslyn

Posted 2011-01-25T20:08:32.660

Reputation: 41

how do I do this on Windows 10? – Janus Troelsen – 2017-08-18T11:04:55.387