Tool to preload windows cache?

BD2003

Lifer
Oct 9, 1999
16,815
1
81
I've got 24GB of RAM, most of which sits idle. It'd be nice to just load a game entirely into RAM ahead of time. Of course there's always RAM disks, but they're inflexible and inefficient - they have to completely block off a predefined chunk of my memory, and anything I read off of it is redundantly cached in the standard windows file cache, since windows technically doesn't know it's a RAM disk.

What would be really neat is if I could just right click a folder, pick load to cache, and let it rip right into the file cache. Even though it's now liable to be bumped out of RAM by other processes, I've got enough RAM that it's not a major issue. I googled up and down and can't find anything of the sort, but it seems no more complicated that a script that simply reads the files and then quits.

Anyone got any ideas?
 

Elixer

Lifer
May 7, 2002
10,371
762
126
There is nothing that would do that, since that would be horribly inefficient.
Your best case would be to either make a script, or manually copy files to a RAM disk.
However, most things that you install will expect it to be run from where you installed it, and not the RAM disk.
 

BD2003

Lifer
Oct 9, 1999
16,815
1
81
The RAM disk works, but I've gotta build the image, copy the game, delete it, etc...and then it leaves a redundant version of all the data in cache - the source and the target. 24GB is a lot of ram but it's not infinite.

Well, I've got a bit of a dirty hack working.

I downloaded this tool, source code is there too:

http://www.arcgis.com/home/item.html?id=08a5a05ff82446bb8a8befad03b1bb86

Basically a tiny little java commandline program. Have to install the java SDK to get it to work. First, run the compile .bat. Then you need to make a tiny mod to the run batch file, and change the first %1 to %~1, otherwise it won't accept folders with a space in them. The batch and the .class file also need to be in the folder that contains the folder you want to cache. Then just drag and drop the folder (or file) onto the batch file, and watch it load everything. When it's done, hit enter and it drops from active memory right into the cache.

Works like a charm. Tested with path of exile, which normally takes over a minute to load off a HDD. Just dragged and dropped the folder, it took a while to preload everything. Fired it up.....16 seconds.

It's just a really clunky tool. If I knew how to make it into a script, I wouldn't be asking for help. :)
 
Last edited:

BD2003

Lifer
Oct 9, 1999
16,815
1
81
You could do this as well... http://www.howtogeek.com/howto/windows-vista/add-copy-to-move-to-on-windows-vista-right-click-menu/

Then, you can right click folder, then copy to the RAM disk...

Then I've also gotta make a symlink or remove the ram disk. I appreciate the help though, but the tool I posted works exactly how I want it to, it's just being a java commandline program run through a batch file is also a PITA in its own way at the moment, but that seems like a solvable problem.
 

BD2003

Lifer
Oct 9, 1999
16,815
1
81
Managed to figure it out by putting the batch file in the send to menu, works perfectly.

It's absolutely disgusting how fast stuff loads, even compared to a SSD.