Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Tool to preload windows cache?
New Posts  All Forums:Forum Nav:

Tool to preload windows cache? - Page 7

post #61 of 109
Quote:
Originally Posted by Techie007 View Post


    I never looked at it that way!  At least a RAM drive would still guarantee that those files are always cached.  You can use Sysinternals RAMMap to see a list of files that are in the system cache.

    Interestingly, you can see the effects of the caching by simply asking my program to cache a folder again.  The second time, caching will be very fast because when it reads the files, they will be supplied by the cache instead of read from the disk.  Glad to hear that my folder caching program has been helpful.  Suggestions are welcome. smile.gif
 
 
    The biggest difference I notice with Superfetch enabled is that my HDDs can sleep more, and I can open various files and they stay off since those files have already been cached by Superfetch.  Since my system drive is a SSD, and my main HDD is a fast one, I don't notice that much difference beyond that with it on or off either.
 

 

Oh, now I have a deeper understanding of why the SSD guides say that it's mostly for standard hard drives. Thank you!

It's a computer!
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500K @ 4.5GHz (1.368-1.384V fixed voltage) ASUS P8P67 EVO B3 (UEFI ver. 1850) GTX 780 ASUS DirectCU II (1228 / 6300, 1.180V) G.SKILL Ripjaws X 8GB (2 x 4GB) 1866MHz, CL9 
Hard DriveHard DriveHard DriveOptical Drive
250 GB Samsung 840 EVO (C:\) 250 GB Samsung 840 EVO (D:\) 150 GB WD VelociRaptor Samsung SH-S243N 24x DVD Burner 
Optical DriveCoolingOSMonitor
Samsung SH-S203N 20X DVD Burner Thermaltake Frio Win 7 Home Premium x64 SP1 Retail AOC G2460PG (24" 1920 x 1080 144Hz G-SYNC) 
KeyboardPowerCaseMouse
Filco Majestouch 104-key Cherry MX Blues w/NKRO Corsair HX650 (Bronze, ordered on 12-12-2009) CM 690 Intellimouse Optical (1.1A) 1000Hz polling rate 
Mouse PadAudioAudio
Basic, but premium round X-Fi Titanium HD Klipsch ProMedia 2.1 (with 16 AWG Monster Cable... 
  hide details  
Reply
It's a computer!
(19 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500K @ 4.5GHz (1.368-1.384V fixed voltage) ASUS P8P67 EVO B3 (UEFI ver. 1850) GTX 780 ASUS DirectCU II (1228 / 6300, 1.180V) G.SKILL Ripjaws X 8GB (2 x 4GB) 1866MHz, CL9 
Hard DriveHard DriveHard DriveOptical Drive
250 GB Samsung 840 EVO (C:\) 250 GB Samsung 840 EVO (D:\) 150 GB WD VelociRaptor Samsung SH-S243N 24x DVD Burner 
Optical DriveCoolingOSMonitor
Samsung SH-S203N 20X DVD Burner Thermaltake Frio Win 7 Home Premium x64 SP1 Retail AOC G2460PG (24" 1920 x 1080 144Hz G-SYNC) 
KeyboardPowerCaseMouse
Filco Majestouch 104-key Cherry MX Blues w/NKRO Corsair HX650 (Bronze, ordered on 12-12-2009) CM 690 Intellimouse Optical (1.1A) 1000Hz polling rate 
Mouse PadAudioAudio
Basic, but premium round X-Fi Titanium HD Klipsch ProMedia 2.1 (with 16 AWG Monster Cable... 
  hide details  
Reply
post #62 of 109
Thread Starter 
Quote:
Originally Posted by Techie007 View Post

    I never looked at it that way!  At least a RAM drive would still guarantee that those files are always cached.  You can use Sysinternals RAMMap to see a list of files that are in the system cache.

    Interestingly, you can see the effects of the caching by simply asking my program to cache a folder again.  The second time, caching will be very fast because when it reads the files, they will be supplied by the cache instead of read from the disk.  Glad to hear that my folder caching program has been helpful.  Suggestions are welcome. smile.gif
 
 
    The biggest difference I notice with Superfetch enabled is that my HDDs can sleep more, and I can open various files and they stay off since those files have already been cached by Superfetch.  Since my system drive is a SSD, and my main HDD is a fast one, I don't notice that much difference beyond that with it on or off either.  However, on computer where the system drive is a HDD, it can make a huge difference, especially if that HDD is slow.
 

Yep, if it's already cached, it takes a fraction of a second even if it's multiple gigs.

One suggestion I have, is would it be possible to make the thread use idle CPU priority and low priority I/O? This could make it feasible to start the caching and the game at the same time, basically just letting it fill in in the background while you play, without clashing with the game. That would prob help quite a bit with people using HDDs.

If you want to get even more advanced than that, perhaps you could set it on a timer (like say 30 seconds), to ensure it stays out of the way of a game's initial load. Then measure the amount of free/standby RAM, and instruct it to read only that much data and then quit.
Edited by Darius510 - 3/31/14 at 8:10am
post #63 of 109
    Yes, it is possible.  I know how to set idle process and thread priority, and I know how to set I/O priority by file handle; I will look into setting I/O priority by thread/process so I don't have to set it each time I open a file to cache.  Process Hacker has a "global" (per process) file I/O priority setting, so I'm sure it can be done.  And since Process Hacker is open source, I can look at the code and find out how they did it. smile.gif
My desktop PC
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-3770K Gigabyte P67A-D3-B3 NVIDIA GeForce 8400 GS  1x Corsair 8 GB 
Hard DriveHard DriveHard DriveOS
Kingston SV300S3 WesternDigital WD10EZEX Samsung HD154UI Windows 7 Ultimate SP1 x64 
MonitorMonitorKeyboardPower
Daewoo L947BK Gateway FPD1530 HTK-2001 Dynex DX-400WPS 
MouseAudio
Kensington K72400 Realtek ALC889 
  hide details  
Reply
My desktop PC
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-3770K Gigabyte P67A-D3-B3 NVIDIA GeForce 8400 GS  1x Corsair 8 GB 
Hard DriveHard DriveHard DriveOS
Kingston SV300S3 WesternDigital WD10EZEX Samsung HD154UI Windows 7 Ultimate SP1 x64 
MonitorMonitorKeyboardPower
Daewoo L947BK Gateway FPD1530 HTK-2001 Dynex DX-400WPS 
MouseAudio
Kensington K72400 Realtek ALC889 
  hide details  
Reply
post #64 of 109
Quote:
Originally Posted by Techie007 View Post

    I experimented with Sysinternals RAMMap and found that caching a file is indeed as simple as opening it and reading it from beginning to end.  The file is cached as it is read.

    Since it was so simple, I quickly wrote a simple program that will scan and cache all files/folders in the specified folder.  In addition, it can optionally create (and remove) a "Cache Folder to RAM" context entry in Windows Explorer's folder context menu.  It is a standalone program with no dependencies beyond what comes with Windows XP forward.  CacheFolder 1.0.0.zip.

Thanks for sharing, works like a charm! thumb.gifthumb.gifthumb.gif

What way would you suggest to make it always cache a specific list of folders automatically on every startup?
HAL-9011
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II 960T X6 4.1GHz ASUS M4A89GTD Pro Radeon HD 6870 16 GB DDR3 1600MHz 8·8·8·24 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Vertex 4 128GB OCZ Vertex 2 120GB WD Caviar Black 1TB LG DVD-RW 
CoolingCoolingOSOS
Noctua NH-D14 Accelero S1 R.2 + 2x NF-F12 Se7en x64 Se7en x32 
PowerCase
Antec TP-650W CM HAF 912 + 
  hide details  
Reply
HAL-9011
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II 960T X6 4.1GHz ASUS M4A89GTD Pro Radeon HD 6870 16 GB DDR3 1600MHz 8·8·8·24 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Vertex 4 128GB OCZ Vertex 2 120GB WD Caviar Black 1TB LG DVD-RW 
CoolingCoolingOSOS
Noctua NH-D14 Accelero S1 R.2 + 2x NF-F12 Se7en x64 Se7en x32 
PowerCase
Antec TP-650W CM HAF 912 + 
  hide details  
Reply
post #65 of 109
Thread Starter 
Quote:
Originally Posted by TELVM View Post

Thanks for sharing, works like a charm! thumb.gifthumb.gifthumb.gif

What way would you suggest to make it always cache a specific list of folders automatically on every startup?

It works properly with symbolic links, so one way would be to make a folder full of symlinks to everything you want cached, and just set it to run on the whole folder at startup using task scheduler.
post #66 of 109
Quote:
Originally Posted by TELVM View Post

Thanks for sharing, works like a charm! thumb.gifthumb.gifthumb.gif

What way would you suggest to make it always cache a specific list of folders automatically on every startup?

    Create a .bat (batch) file like this, and save it in the Startup folder:
Code:
"C:\Program Files (x86)\CacheFolder.exe" "C:\Program Files\Microsoft Games"
"C:\Program Files (x86)\CacheFolder.exe" "C:\Program Files\Microsoft Office"
"C:\Program Files (x86)\CacheFolder.exe" "D:\Big game to cache"

    Just replace the "C:\Program Files (x86)\" with the actual path to the CacheFolder.exe program, and change the path in the second pair of quotes to the folder that you want to cache. thumb.gif
My desktop PC
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-3770K Gigabyte P67A-D3-B3 NVIDIA GeForce 8400 GS  1x Corsair 8 GB 
Hard DriveHard DriveHard DriveOS
Kingston SV300S3 WesternDigital WD10EZEX Samsung HD154UI Windows 7 Ultimate SP1 x64 
MonitorMonitorKeyboardPower
Daewoo L947BK Gateway FPD1530 HTK-2001 Dynex DX-400WPS 
MouseAudio
Kensington K72400 Realtek ALC889 
  hide details  
Reply
My desktop PC
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-3770K Gigabyte P67A-D3-B3 NVIDIA GeForce 8400 GS  1x Corsair 8 GB 
Hard DriveHard DriveHard DriveOS
Kingston SV300S3 WesternDigital WD10EZEX Samsung HD154UI Windows 7 Ultimate SP1 x64 
MonitorMonitorKeyboardPower
Daewoo L947BK Gateway FPD1530 HTK-2001 Dynex DX-400WPS 
MouseAudio
Kensington K72400 Realtek ALC889 
  hide details  
Reply
post #67 of 109
Thread Starter 
Ya, good ol batch files will work too.

I tried it out with this tool: http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html

It makes it super easy to drag and drop symbolic links. So you can make a folder, and just drag and drop anything you want to precache into that folder as a symbolic link. It won't move any files, just create pointers to them. It's similar to creating a shortcut. Then you can just cache that folder, and it'll follow the links and pull the files from their actual locations on disk. So if you really want to get granular with it you can pick and choose exactly which files you want to cache.

So if your free memory is limited, instead of caching a whole game folder (which has a lot of huge stuff like movies that don't really need to be cached), you can just drop in the specific files that are worth caching, and simply delete the link when you don't want to cache it anymore.

Automating it on startup is then as simple as using a batch file in your startup folder to cache that one folder.
Edited by Darius510 - 4/1/14 at 9:47am
post #68 of 109
Quote:
Originally Posted by Techie007 View Post

    Create a .bat (batch) file like this, and save it in the Startup folder:
Code:
"C:\Program Files (x86)\CacheFolder.exe" "C:\Program Files\Microsoft Games"
"C:\Program Files (x86)\CacheFolder.exe" "C:\Program Files\Microsoft Office"
"C:\Program Files (x86)\CacheFolder.exe" "D:\Big game to cache"

    Just replace the "C:\Program Files (x86)\" with the actual path to the CacheFolder.exe program, and change the path in the second pair of quotes to the folder that you want to cache. thumb.gif

^ That's exactly what I had in mind, thanks a lot Techie thumb.gif .

An alternative to placing the batch file in the startup folder is adding a log-on script with gpedit.msc .
HAL-9011
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II 960T X6 4.1GHz ASUS M4A89GTD Pro Radeon HD 6870 16 GB DDR3 1600MHz 8·8·8·24 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Vertex 4 128GB OCZ Vertex 2 120GB WD Caviar Black 1TB LG DVD-RW 
CoolingCoolingOSOS
Noctua NH-D14 Accelero S1 R.2 + 2x NF-F12 Se7en x64 Se7en x32 
PowerCase
Antec TP-650W CM HAF 912 + 
  hide details  
Reply
HAL-9011
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II 960T X6 4.1GHz ASUS M4A89GTD Pro Radeon HD 6870 16 GB DDR3 1600MHz 8·8·8·24 
Hard DriveHard DriveHard DriveOptical Drive
OCZ Vertex 4 128GB OCZ Vertex 2 120GB WD Caviar Black 1TB LG DVD-RW 
CoolingCoolingOSOS
Noctua NH-D14 Accelero S1 R.2 + 2x NF-F12 Se7en x64 Se7en x32 
PowerCase
Antec TP-650W CM HAF 912 + 
  hide details  
Reply
post #69 of 109
This has quickly become an amazingly useful tool that'll I'll be using for a long time! REP++

What I would actually prefer is for Windows to write the cache to disk on shutdown and whack it back in RAM on boot, so that it would keep growing automatically over time naturally pushing out stuff that's least used rather than being managed manually.
I think they actually ruined this to improve boot times.
Edited by Bearybear - 4/1/14 at 2:50pm
post #70 of 109
Thread Starter 
Quote:
Originally Posted by Bearybear View Post

This has quickly become an amazingly useful tool that'll I'll be using for a long time! REP++

What I would actually prefer is for Windows to write the cache to disk on shutdown and whack it back in RAM on boot, so that it would keep growing automatically over time naturally pushing out stuff that's least used rather than being managed manually.
I think they actually ruined this to improve boot times.

Yeah, what's sad is that exactly what you want was the one thing Vista did right. It would even manage it based on what you used at a certain time of day. I think it'd be pretty difficult for a third party program to pull it off effectively.

Kinda makes you want to get more RAM though doesn't it? Not even my RAID SSDs can keep up with it.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Windows
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Windows › Tool to preload windows cache?