Networking – Where does the process occur when zipping a file on a network mapped drive

networkingzip

I want to copy a number of large files that will compress well from a mapped drive to my local hard drive. Will zipping the files make the overall processing time shorter?

What I am thinking is, can the zip program zip the files on the mapped drive or does it need to pull the files to memory (that is locally) to zip them? This will result in the files being copied across the network 3 times – once to get the raw file to zip, once to put the zipped file back on the mapped drive, and the once to copy the zipped file back again. If this is the case am I better off just copying the files across uncompressed?

My other option is to remote into a server which is geographically close to the drive I am mapping, and zip it from there, then come back to my local pc and copy the zipped files.

Best Answer

Any program that creates a ZIP file is basically reads some files and writes out a ZIP file. So, if you're zipping files that are located on a remote computer, these files will have to be read over the network, uncompressed. The ZIP program will write the ZIP file locally, so no further network activity will occur. But in terms of network traffic, it is no different than first copying the files to a local disk and zipping them afterwards.

This is true regardless of what program you use to create a ZIP archive.

If you can remote into that server and compress the files there, and copy the already-zipped files, then you'll save some network traffic if the files can be compressed effectively (e.g. some files do not compress well, like most video files, encrypted files, etc.).

If your network is not 100% reliable, and your data transfer will take considerable time, it is better to copy uncompressed files first, and ZIP them later, and not ZIP the files directly over the network. If some network error occurs while zipping, you'll have to start the process from the beginning. And there are file copy programs that can re-start aborted/failed copy without re-transmitting already copied data.

Related Question