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 5

post #41 of 109
If you open Resource Monitor, you'll see this graphic on the memory tab:



When you restart Windows, the "Free" part is large and "Standby" very small. After starting and closing a lot of programs and running the PC for days or something, Free ends up close to zero and nearly everything will be Standby. That's where the cached files are. They are never counted to the used memory.

What you could do as an experiment is run this .bat file on a folder that's very large, several gigabytes of stuff. Check how Standby and Free parts of that memory use graph look like before and after.
post #42 of 109
Thread Starter 
Quote:
Originally Posted by TwoCables View Post

Oh, this isn't as cool as I thought. For some reason, I'm just now realizing that I would have to use this before opening anything if I want it to open faster. It's a good start toward reaching the goal though.

I dunno what goal you're thinking of that hasn't already been reached?
post #43 of 109
Thread Starter 
Quote:
Originally Posted by deepor View Post

If you open Resource Monitor, you'll see this graphic on the memory tab:



When you restart Windows, the "Free" part is large and "Standby" very small. After starting and closing a lot of programs and running the PC for days or something, Free ends up close to zero and nearly everything will be Standby. That's where the cached files are. They are never counted to the used memory.

What you could do as an experiment is run this .bat file on a folder that's very large, several gigabytes of stuff. Check how Standby and Free parts of that memory use graph look like before and after.

As it loads the files, the memory is considered in use. Once you quit the loader, it drops from used right into the standby cache.

It's a far more elegant solution than a ramdisk IMO.
post #44 of 109
Quote:
Originally Posted by Darius510 View Post


I dunno what goal you're thinking of that hasn't already been reached?

 

Your goal.

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 #45 of 109
Thread Starter 
Quote:
Originally Posted by TwoCables View Post

Your goal.

I guess you're misunderstanding what I was trying to accomplish.
post #46 of 109
Quote:
Originally Posted by Darius510 View Post

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?

    This is an interesting concept.  It is also what Superfetch already does, unless you've disabled it.  Of course, Superfetch does it automatically, and not always with the files the user wishes to cache.

    If I understand correctly, simply reading a file from end to end should cache it to memory.  If that is the case, I should be able to write a simple program that can cache an entire folder without much difficulty at all.  In the next couple of days I'll experiment with this. thumb.gif
 
Edited by Techie007 - 3/29/14 at 4:17pm
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 #47 of 109
Thread Starter 
Quote:
Originally Posted by Techie007 View Post

    This is an interesting concept.  It is also what Superfetch already does, unless you've disabled it.  Of course, Superfetch does it automatically, and not always with the files the user wishes to cache.

    If I understand correctly, simply reading a file from end to end should cache it to memory.  If that is the case, I should be able to write a simple program that can cache an entire folder without much difficulty at all.  In the next couple of days I'll experiment with this. thumb.gif
 

It's sort of what superfetch used to do in vista. It would fill out every free byte of ram with what it predicted you'd use. Since win 7 it's been considerably more conservative and only accelerates the launch of an app. You never had any level of control over it, but at least in vista it wouldn't leave your ram sitting idle.

But yeah, implementation really is as dumb simple as reading the file and quitting the program to release it to cache. The source code is like 10 lines of code, but my programming skills basically stop and end with Autohotkey scripts.

Basic functionality wouldn't need to be any more than a shell extension for it to be super useful. I could certainly think of plenty of other ways to improve it, but that's the foundation.
post #48 of 109
    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.

    You can download the newest version here: CacheFolder.zip.
 
Edited by Techie007 - 8/1/16 at 11:51am
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 #49 of 109
Thread Starter 
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.

Absolutely perfect! I love it. Thanks!

Make you wonder why anyone would ever want to deal with a RAM disk for this kind of thing when there's a better solution that's so much simpler.
Edited by Darius510 - 3/29/14 at 7:37pm
post #50 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, going to try it out tomorrow!
The up/downgrade
(14 items)
 
  
CPUMotherboardGraphicsRAM
|Intel 6800K @ 4ghz 1.24v| |Asus ROG Strix X99| |Gainward GTX 1070 @ ~2ghz| |4x4gb Corsair XMS 3000mhz CL14| 
Hard DriveOSMonitorKeyboard
|840 Pro 256gb| |OCZ Vertex 2 120gb| |WD Red 2tb| |Windows 10 Pro x64| |27" QNIX QX2710 @ 2560x1440 120hz| |Logitech G810 Orion Spectrum RGB| 
PowerCaseMouseAudio
|EVGA SuperNOVA 1000 G2| |Corsair 750D| |Logitech G502 Proteus Spectrum RGB|  |JBL L890 speakers| 
AudioAudio
|Emotiva XDA-2 receiver| |2x Advanced Acoustic MAA-705 @ 200w 8ohm| 
  hide details  
Reply
The up/downgrade
(14 items)
 
  
CPUMotherboardGraphicsRAM
|Intel 6800K @ 4ghz 1.24v| |Asus ROG Strix X99| |Gainward GTX 1070 @ ~2ghz| |4x4gb Corsair XMS 3000mhz CL14| 
Hard DriveOSMonitorKeyboard
|840 Pro 256gb| |OCZ Vertex 2 120gb| |WD Red 2tb| |Windows 10 Pro x64| |27" QNIX QX2710 @ 2560x1440 120hz| |Logitech G810 Orion Spectrum RGB| 
PowerCaseMouseAudio
|EVGA SuperNOVA 1000 G2| |Corsair 750D| |Logitech G502 Proteus Spectrum RGB|  |JBL L890 speakers| 
AudioAudio
|Emotiva XDA-2 receiver| |2x Advanced Acoustic MAA-705 @ 200w 8ohm| 
  hide details  
Reply
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?