On Linux, suppose I have an executable file. Let's look at two cases:
(A) A large portion of what the executable does is disk I/O;
(B) the executable doesn't do any disk I/O.
For each of the cases A and B, should I expect a significant difference in the running time of the executable between these two scenario?
(1) The executable and all the files involved are in a tmpfs folder (a RAM folder);
(2) The executable and all the files involved are in "regular" disk folders.
I'm also interested in whether I should expect a significant difference between these three scenarios, related to Docker:
(3) The executable is run from within a Docker container, and the executable and all files involved are in a tmpfs folder created from within the container under a disk drive which was mounted using docker run -v ...
(4) The executable is run from within a Docker container, and the executable and all files involved are in a tmpfs folder created from within the container, under an "internal" drive (that does not persist after the container is halted).
(5) The executable is run from within a Docker container, and the executable and all files involved are in "regular" disk folders.
My expectation is that in general, running from a tmpfs folder should be faster, mostly when there is a lot of disk I/O involved. But I don't see this in practice, so I would like to see if my expectations are correct.