View Single Post
Old 07-25-2008, 11:58 AM  
Too much time...
Join Date: May 2005
Posts: 1,194

Well, there are lots of reasons copy a file and transferring a file through the FTP will operate at different speeds! The FTP has a lot more work to do!

Copying a file through explorer is done by reading in a huge 1M blocks of raw data from the file, then writing that 1M block of data back to disk. That's it.

Copying a file through an FTP requires reading in the data in smaller blocks (128k for the server, probably smaller for an FTP client), sending it back into the kernel over the TCP connection where it may be fragmented further (loopback can be optimized though), then re-assembling it and reading it all back in via TCP on the other side of the FTP, only to be finally written out. Oh, and if the FTP server is the recipient of the file then it must compute the CRC and run script processing on the file as well... And don't forget the overhead if you did this over SSL!

There is just no way any FTP client/server can ever match the performance of a file copy operation because of the extra kernel context switches and TCP overhead.
Yil is offline   Reply With Quote