Will hard-linking be the best method for creating RAM drives?

Started by PrestonLMcClain

Will hard-linking be the best method for creating RAM drives?   02 September 2020, 05:41

I know it's true that if I have complicated programs like Microsoft Office, it's better to hard-link their folders to the RAM drive. This is due to the fact that other files that interact with the Microsoft Office folders will know where to look.

For the same reason, wouldn't it be best to just hard-link all programs and files that I am going to place on the RAM drive? I just might have an occasion to put a note or change something and I forgot that I saved in on my local drive rather than my RAM drive. It just makes everything neat and orderly so it's easier to remember and use the computer.
SoftPerfect Support forum - Andrew avatar image

Re: Will hard-linking be the best method for creating RAM drives?   02 September 2020, 12:55

Well, it's up to you. If you have enough RAM you can place all your applications on a RAM disk, bearing in mind that:
  • Data loss is possible if for some reason the RAM disk image gets corrupted, so all the applications will be gone.
  • Some applications may break or not work properly, especially those that use their own drivers and system services.
  • You are taking away the free RAM that those applications would otherwise be able to use.

Re: Will hard-linking be the best method for creating RAM drives?   07 September 2020, 15:08

I'm sorry. What I wrote in the initial post was too vague so you misunderstood what I was asking. When I wrote that wouldn't it be better to hardlink "all" the programs, I meant "all" to mean the all the programs I intend to install on the RAM drive. In other words, the 5 programs I'm installing on the RAM drive.

So, my question is "Is hardlinking always the best way to install programs on RAM drives out of the 2 methods?" The 2 methods are the following:

1. Install a program directly onto the RAM drive so that the computer sees the install drive's path to start with the RAM drive such as in R:\Program Files\Microsoft Word\Word.exe.

2. Create a hard link from the Program Files folder from the C: drive to the R: drive. Then, the computer will always see the installation folder to be something like C:\Program Files\Microsoft Word\Word.exe.

Hardlinking seems to be the best way, so why not just hardlink every single folder and file that I intend to put on the RAM drive? Is there any disadvantage to hardlinking rather than copying a folder directly to the R: drive?
SoftPerfect Support forum - Andrew avatar image

Re: Will hard-linking be the best method for creating RAM drives?   07 September 2020, 21:03

There may be a slightly better performance when an application is installed directly on the RAM disk rather than when it's hard-linked.

The reason for that is that a redirect from HDD/SSD to a RAM disk requires a couple more operations. Say you open C:\Program Files\Microsoft Word\Word.exe which is a hard link to R:\Microsoft Word\Word.exe. Windows will need to read the file system metadata from C:\ only to find that it's a link to another drive and then follow that link. In comparison, opening R:\Microsoft Word\Word.exe directly doesn't require accessing C:\ at all.

Re: Will hard-linking be the best method for creating RAM drives?   08 September 2020, 05:50

Ahhh...that totally makes sense. Would you happen to know the approximate percentage decrease in performance? It might be slightly significant since every time the computer accesses the hard link, it goes to the C drive and then to the R drive every single time. But, can I assume that it's probably low because it's probably nothing compared I bet to actually the time to write and reade a RAM drive.
SoftPerfect Support forum - Andrew avatar image

Re: Will hard-linking be the best method for creating RAM drives?   08 September 2020, 10:25

It sort of depends on what you have in that folder. If you have thousands of small files in the folder you are hard-linking, there may be noticeable performance decrease. In this case Windows may have to look-up the link for each and every file. Otherwise the difference in performance should be negligible.

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

  *******   **     **  ********   **    **  ******** 
 **     **  **     **  **     **   **  **      **    
 **         **     **  **     **    ****       **    
 ********   **     **  **     **     **        **    
 **     **  **     **  **     **     **        **    
 **     **  **     **  **     **     **        **    
  *******    *******   ********      **        **    

Message: