Windows – Best approach to utilize RamDisk for Chrome

cachegoogle-chromeramdiskwindows

I use a lot of tabs and after a while less recently opened tabs take some time to become responsive, which I guess is because they're being un-cached to HDD as they're not required.

So after creating a Ram-Disk I have two options, use

--disk-cache-dir="G:/"

switch to do what it does. Or what I'm currently doing: using a directory junction for

"[…]\AppData\Local\Google\Chrome\User Data\Default"

to move that entire folder over to Ram-Disk. I thought this would be better than just disk-cache but what do I know. Is it?

As one can guess it'll be a pain saving/loading the Ram-Disk image each time I start chrome but if it really is better than the former approach I'll write a script or something.

EDIT:
enter image description here

So the "Default\cache" is not the only folder which is being accessed frequently. I took this screenshot when there were 21 tabs open and was trying to access least used ones way in the background window.

From this I conclude that moving entire folder to Ram would be faster that just cache. Any insights are more than welcome.

Best Answer

  • In general, the virtual memory subsystem and filesystem of your OS are smarter than you about how to allocate and use physical memory (especially for filesystem buffer caching). By devoting a chunk of RAM to a ramdisk, you are reducing the amount of RAM available to your OS by dedicating it to one single purpose. If you take too much RAM away from your OS, you will experience general performance degradation caused by low availability of RAM, though the application(s) that use the ramdisk may perform better. This is a trade-off you have to make.