0

What is the difference between transferring an executable file to your local computer before running it vs directly running it from an SMB share. Does running it from the share transfer the whole file to a temporary location and then execute it, or does it "stream" the executable file from the share, causing the impact on bandwidth to stretch for a longer period of time?

Natecat
  • 103
  • 4

1 Answers1

2

Running an executable from a share works just like it would if it were on a local disk. The system will load the executable into memory and run it. This doesn't change whether the executable is remote or not.

Windows has a has a memory-based file cache. It pulls the executable into that cache, along with other components it needs while it's running (ie. libraries (DLLs), data files, etc). As those extra components are needed, they will be read in... locally or remote... and stored in the cache for a period of time.

It does not "copy" the file to a local disk location and then execute it. It reads it into memory and executes it immediately.

As for bandwidth use-over-time, this might not be quite what you think it is...

Let's say the executable is a small single-file executable, meaning it doesn't have any config files or custom libraries that it needs. In a case like that, the data transferred would roughly be the same whether you copy the file locally or run it from the share.

But, lets say it's a complex software application like Office, Photoshop, etc. where there are lots of smaller data files and libraries that it needs. While the program is executing, it will go read the specific data item that it needs when it needs it. So, over time, there will continue to be data reads across the wire for a share based application, but each read will typically be pretty small.

The file-cache I mentioned earlier comes into play when we talk about continued disk reads... local or remote. The cache helps to lower the number of repeat disk reads. For a share-based application with lots of libraries and config files that get pushed and pulled from memory, the cache can reduce the network traffic because it's held on to the data for a while just in case it's needed again.

Compare this to copying the file and then running it locally. If it were a large application, this wouldn't make much sense as you would have a very large file transfer (and installation) every time you needed to use it. For applications that you use on a regular basis, this would not be a fun experience.

In general, the network bandwidth problem isn't so much with an application being installed on a share as it is for the data the application uses. Take Photoshop as an example. Running photoshop from a share is effortless. Loading a 500MB image file to work on within photoshop from a share is a different story.

This is a simplistic view of how things work to try an answer your question. I hope it helps.

mikem
  • 418
  • 2
  • 7