Creating a RAM Disk for Firefox and Chrome profile folders

Started by jose hidalgo

Creating a RAM Disk for Firefox and Chrome profile folders   24 December 2015, 23:50

Hi everybody,

I'd like to create a RAM Disk of about 500 MB, and copy my Firefox and Chrome profile folders (located in my bootable SSD) with a batch script run at every Windows startup, in order to speed up navigation. However this is not easy:

1. I need to make a PERFECT COPY of my profile folders (all the files, folders and subfolders, but also all file attributes, permissions, R/W, hidden files, system files, etc.).
What would be the right batch command with all the right flags? I have looked into XCOPY and ROBOCOPY, but I'm not an expert : which one is really able to make a PERFECT COPY of a folder and its subfolders and files (even hidden ones, etc.), using the right flags? Or is there a better solution?
FYI I have come up with this command line: XCOPY C:\Users\Jose\AppData\Roaming\Mozilla\Firefox\Profiles\kz5u35az.default\ S:\Firefox\Profiles\kz5u35az.default\ /I /E /K /Q /H /X
But I don't know if it will make a perfect copy or if I can do better. I'm no expert at this, I don't even know the difference between XCOPY and ROBOCOPY, so... sad

2. Let's call Folder 1 the original profile folder in my SSD, and Folder 2 the perfect copy on the RAM Disk. Folder 2 would need to be periodically saved to my SSD (every 5 min or so), so any changes made during my navigation (new tabs, new extensions, new bookmarks...) could be remembered. Is that the right strategy? How would you proceed? Wouldn't it be bad for the SSD to save hundreds of MB so frequently? Unless RAM Disk handles incremental backups of course. How does it work exactly?

3. How could I prevent the risk of file corruption in my RAM Drive? I can't afford the RAM Drive to corrupt my data in Folder 2 AND at the next backup (5 min max) to save the corrupted data into Folder 1. Again, how would you proceed?

Thanks in advance for your help.
Best regards.
SoftPerfect Support forum - Andrew avatar image

Re: Creating a RAM Disk for Firefox and Chrome profile folders   25 December 2015, 11:44

Are you sure you want move the actual profiles? It doesn't sound like a good idea to me.

It may be better to just have the cache on a RAM Disk. This article explains how to do it and possible options.

Re: Creating a RAM Disk for Firefox and Chrome profile folders   26 December 2015, 11:17

Hi Andrew smile Actually we already had this discussion here. But now I have received my SSD and I'm about to begin the install!

In our discussion I was thinking of having 3 RAM Disks :
- pagefile.sys : never saved
- Caches : saved on exit/reboot
- Profiles : saved often on SSD (incrementally since RAM Disk image writes are incremental)

I'm still undecided about the 3rd one (profiles), but Raymond says it's a good idea, and he's using your software! https://www.raymond.cc/blog/superspeed-firefox-by-putting-profile-and-sqlite-database-in-ramdisk

So what do you think ? wink
SoftPerfect Support forum - Andrew avatar image

Re: Creating a RAM Disk for Firefox and Chrome profile folders   26 December 2015, 11:51

I personally wouldn't place the pagefile on a RAM Disk. Here's an article why it's not a good idea.

I also don't see the point in saving caches. They can be wiped on reboot and will be re-created next time you start your browser.

Regarding profiles, there's usually little writing in them (e.g. just writing a small bunch of bytes when you go to a new URL or open a tab), so again I wouldn't store it in a RAM Disk. In addition, an extra later is likely to increase the chance to end up with a corrupted profile.

Having said this, you can do what you described above, but I think there would be little or no gain. I personally only move browser caches and Windows temporary folder to a volatile RAM Disk. This way all temporary stuff can be accessed quickly and disappears upon reboot.

Re: Creating a RAM Disk for Firefox and Chrome profile folders   27 December 2015, 02:15

Again, we have already discussed this before. laugh

Placing the pagefile on a RAM Disk is a good idea, because some of the premises on that article (that I've already read months ago) are simply false. Because all Microsoft systems don't work exactly the way they're supposed to, unfortunately. I won't be the first nor the last to place my pagefile on a RAM Disk. wink

The point in saving caches is having faster navigation after a reboot, if you often visit the same sites.

Regarding the profiles, honestly I don't know. It's true that it seems a lot of hassle for little benefit. That being said, why would have Raymond made such an article then ? I don't know.

I guess I will do some testing and see what happens. smile Thanks !
I want to extend my SSD's life so I redirect all my TEMP and TMP variable locations to the RAM disk (although I have 32GB RAM so...). I also redirect my swapfile to my RAM disk. This may sound counter intuitive, but the simple fact is that some programs, including Windows uses the swapfile from time to time. It's better to have the OS hitting the RAM disk than your SSD or regular hard drive, even if the impact is minimal.

As for redirecting browser profiles and temp locations, there are many sources online that talks about this. The Great Google is your friend.

Reply to this topic

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:

Email:

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: