# Prefetch + superfetch + sysmain + ready boost + levels of cache



## Gorstak (Dec 23, 2018)

Some of you may have noticed these services are missing in new windows build, and I've done some digging, so let me clarify.

What is prefetch?

Basically, prefetch is windows idea of a RAM disk. It stores frequently used stuff in a specific folder on a disk. The idea is to monitor the stuff you run often and speed them up.

What is Ready boost?

Ready boost is basically the same as prefetch, except it uses an external drive for storage, like your usb pendrive.

What is superfetch?

Superfetch is windows idea of RAM cache. It is supposed to use all available RAM for caching and try to anticipate what the user will do next. The idea is to be smart and release the used memory for caching when you run an app.

What is sysmain?

this is, amongst other things, a new name for prefetch and superfetch. It's a single service that is supposed to figure out on which kind of drive superfetch and prefetch will run. If user has an ssd, it wont run, and if user has hdd, it will. Superfetch portion of it no longer takes up all of RAM and, I'm guessing here, but I think that instead of large short term improvement in performance, they opted for small increase with time. Prefetch and superfetch registry keys are set to 3, which brings me to second part:

What DWORD values mean?

0 = zero means disabled. It wont start with pc
1 = one means automatic start. It will boot asap.
2 = two means automatic delayed start. It will start after bootup process is finished
3 = three means manual start. You start it yourself when you feel like it.

Now, who ever tells you something else, is either lying through their teeth or uneducated or an idiot!

This basically means, if you want to run superfetch and prefetch regardless of what drive you use, you set their dword values to 1.

Now let's get to caches. I have noticed recently that there is some unused caching in registry portion of windows memory management, and done some digging. I came across some articles as first google results, that should really be burried somewhere very, very deep:


What is first level cache?

first level cache is cpu cache. It speeds up cpu specific tasks. This value does not exist in my registry, meaning windows doesn't manage it. It's not enabling nor disabling it. Simply doesn't manage it.

What is second level cache?

second level cache is kernel cache. This is basically the windows core, and in my registry, managing caching of windows core is disabled, meaning bios will do it.

What is large cache?

large cache is used on workstations and servers if second level cache is enabled. It basically increases the size of RAM available to kernel and loads it all up.

What is third level cache?

This is database cache. Slowest of all caches, but shared amongst them all. It does not exist in my registry.

What is fourth level cache?

this is basically integrated gpu cache.

What is fifth level cache?

this is all other devices cache, like for example your network card. speeds up stuff like dns queries. It does not exist in my registry.

So what does all of this mean? Basically, cpu is already fast, it uses cache to speed up the rest of your system. It can use 1st level cache to speed up cpu tasks, which will show in cpu benches. Or, if the cpu has a igpu, it will use 4th level cache to speed it up. It will use 2nd level cpu to speed up your OS, and it will use 3rd level cache to help all other caches work as a unit. Basically, you can control who manages these caches, windows, bios or nobody. 

That's about it. Subscribe to techpowerup and like it on social media


----------



## Bill_Bright (Dec 23, 2018)

There is some great information above. I would like to add a little to it. 

ReadyBoost uses Superfetch, but is not the same as Prefetch. Prefetch will actually re-arrange data on a hard disk so it loads faster. It is not a cache. ReadyBoost behaves more like a cache in that the data is "preloaded" into a flash drive (or similar device) much like priority data is stuffed into a page file.

Superfetch and Prefetch are two separate features. SysMain has nothing to do with Prefetch. It is, however, the new name for Superfetch. Superfetch/SysMain is a "strategic" tool - that is, it works "over time" to learn how a user uses his or her computer throughout the day to improve performance based on how that user uses the computer - to include the time of day they typically do specific tasks. Pretty cool, actually. Because it needs to see and learn a user's computing habits and daily routines in order to determine and learn how a user uses their computer, it can take a few days before it becomes most effective.

Prefetch, on the other hand, is more a "tactical" tool for "immediate" impact. It is used to optimize the loading time of an application the very next time you run it. This would be great for large applications like Microsoft Word or your security programs where multiple large files are loaded each time Word or Windows starts. 

SysMain and Prefetch, while separate features, can work together. So, for example, if you regularly fire up Chrome every morning around 9 AM, SysMain, having predicted your next step will begin preloading some of Chrome's files and Prefetch will determine which files to load first once you click on Chrome's icon. 

As Gorstak correctly noted, these services are automatically disabled for SSDs. That is not because SSDs are so much faster. It is simply because of how SSDs extract data. And because all SSDs report to the BIOS and, in turn, the OS that they are SSDs instead of HDs, no action is required by the user. 

If you have a hard drive, there really is no reason to disable these features. Some users have reported SuperFetch/SysMain is eating up their CPU resources and to remedy that, they disable (or worse, are advised to disable ) SuperFetch. That is unwise! The problem in those rare cases is something else is causing SuperFetch to misbehave. The correct solution is to find out and fix what is causing that, rather than disabling SuperFetch/SysMain. 

So my advice is to leave the settings alone! It is highly unlikely anybody on this site is smarter than _the teams_ of highly trained and educated professional Microsoft developers with their advanced expertise in "Windows Storage Technologies", their years and years and exabytes of empirical references and evidential data, or their super computers and other tools they use to the develop the code used to dynamically optimize Windows for each user!


----------



## Gorstak (Dec 23, 2018)

anyway, I noticed that enabling cache management had impact on my single core cpu score. It went from 354 to 371 in cpuz with cache management enabled. My windows 10 also seemed kinda smoother with 4th level management enabled. If you intend to write that registry key yourself, don't forget to reboot prior to testing.


----------



## Bill_Bright (Dec 23, 2018)

The problem there is test scores seen in benchmark programs are synthetic and often are not reflected in the same way during real-world use. I think it important to note CPU makers, motherboard/chipset makers, and OS developers have no desire to cripple the performance of our computers - with the only exceptions being to enhance security (rare) or to prevent overheating conditions (smart). 

And of course, the results we see on our monitors are the culminations of the task as it has been processed through the entire computer - that is from source (disk or network), through the various motherboard circuits, RAM, CPU, the graphics solution - any and all of which affect the final results. And of course, most users perform a wide variety of tasks with their computers. That is, they don't play just one game, or just process email, or just create Word documents, or just pay their bills, or just update their Facebook page. They do all sorts of things with  their computers. 

So if one is going to change the defaults, (and that's fine if you really know what you are doing), my recommendation is "don't" go by test scores. Go by how the program looks and feels according to your own senses for all the tasks you normally perform on your computer. And for sure, keep an open mind and your biases at bay. As humans, it is easy to see things that are not really there when we want to see them.


----------



## jboydgolfer (Dec 23, 2018)

Are some of these older "gimmick" technologies, that were used to optimize or give a little edge to really low end systems? Readyboost for instance. I believe they were removed due to obsolescence


----------



## eidairaman1 (Dec 23, 2018)

jboydgolfer said:


> Are some of these older "gimmick" technologies, that were used to optimize or give a little edge to really low end systems? Readyboost for instance. I believe they were removed due to obsolescence



Only effective on low end machines, no difference on midrange/highend


----------



## Bill_Bright (Dec 23, 2018)

jboydgolfer said:


> I believe they were removed due to obsolescence


Not sure what you mean. Readyboost is still in there. 

It is not that these "gimmicks" were "removed". It is that (1), many were true gimmicks. That is a "trick" with no real or very little value. But the main reason is as eidairman1 notes, (2) they were really only useful on less powerful systems of years past. Note even budget systems today tend to have plenty of RAM and sufficient CPU and graphics speed and horsepower to meet demands, or can inexpensively upgraded to meet those demands.


----------



## eidairaman1 (Dec 23, 2018)

Bill_Bright said:


> Not sure what you mean. Readyboost is still in there.
> 
> It is not that these "gimmicks" were "removed". It is that (1), many were true gimmicks. That is a "trick" with no real or very little value. But the main reason is as eidairman1 notes, (2) they were really only useful on less powerful systems of years past. Note even budget systems today tend to have plenty of RAM and sufficient CPU and graphics speed and horsepower to meet demands, or can inexpensively upgraded to meet those demands.



Especially those Ryzen APUs


----------



## jboydgolfer (Dec 23, 2018)

Bill_Bright said:


> Not sure what you mean. Readyboost is still in there.
> 
> It is not that these "gimmicks" were "removed". It is that (1), many were true gimmicks. That is a "trick" with no real or very little value. But the main reason is as eidairman1 notes, (2) they were really only useful on less powerful systems of years past. Note even budget systems today tend to have plenty of RAM and sufficient CPU and graphics speed and horsepower to meet demands, or can inexpensively upgraded to meet those demands.


So they werent removed, i thought they were. Otherwise i was on the money


----------



## Bill_Bright (Dec 23, 2018)

Well, it should be noted they were "low-end" by today's standards - not necessarily by the standards of the day when those systems came out. For example, my first personal computer cost over $2300 and normally came with a whopping 16MB (megabyte!) of system RAM but I upgraded it to "_more than I would ever need_" 32MB of RAM. That was no "low-end" system at the time.


----------



## THEBOSS619 (Dec 23, 2018)

Gorstak said:


> anyway, I noticed that enabling cache management had impact on my single core cpu score. It went from 354 to 371 in cpuz with cache management enabled. My windows 10 also seemed kinda smoother with 4th level management enabled. If you intend to write that registry key yourself, don't forget to reboot prior to testing.


Thanks for providing those valuable information it is like you found a hidden treasure  but... Could you provide how did you do it at least?  specially the cache management on all levels...  it seems interesting and I want to test it


----------



## Gorstak (Dec 23, 2018)

THEBOSS619 said:


> Thanks for providing those valuable information it is like you found a hidden treasure  but... Could you provide how did you do it at least?  specially the cache management on all levels...  it seems interesting and I want to test it



well, type regedit into start menu, run it, and navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

You will find Dword key SecondLevelDataCache there with a value of 0. Change the value to 1, and create FirstLevelDataCache and then change it's value to 1, and so until you reach fifth. You can also change LargeSystemCache key value to 1, but I would advise against the latter if you only have 2GB of RAM


----------



## THEBOSS619 (Dec 23, 2018)

Gorstak said:


> well, type regedit into start menu, run it, and navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
> 
> You will find Dword key SecondLevelDataCache there with a value of 0. Change the value to 1, and create FirstLevelDataCache and then change it's value to 1, and so until you reach fifth. You can also change LargeSystemCache key value to 1, but I would advise against the latter if you only have 2GB of RAM


Thank you  but I already know about 1 to 3 cache level on those registry but... I never heard before about fourth level & fifth level... so.. creating a registry of FourthLevelDataCache and FifthLevelDataCache ... are those naming is correct?


----------



## Gorstak (Dec 23, 2018)

yes, correct, but 4th level will only help if you have integrated gpu running, not discrete graphics.


----------



## THEBOSS619 (Dec 23, 2018)

Gorstak said:


> yes, correct, but 4th level will only help if you have integrated gpu running, not discrete graphics.


In laptop world... Integrated GPU is always running and used  so I'm sure there will be benefit  testing now and then I will report


----------



## Gorstak (Dec 23, 2018)

integrated means built into cpu...some laptops have discrete gpus aswell

have fun!


----------



## Bill_Bright (Dec 23, 2018)

Gorstak said:


> laptops have discrete gpus aswell


Some do. But most use integrated because integrated tend to consume less power over all (better for battery run times) and a single processor tends to generate less heat - always a concerning factor with notebooks. And then there is motherboard real estate and weight factors too. Since, by far, most notebooks are used as mobile devices for personal business, work or school, that all makes sense.


----------



## R-T-B (Dec 23, 2018)

Where are you finding these registry keys?

As far as I can tell, the keys above second level are undocumented and likely do nothing at all.  The only reference to "FourthLevelDataCache" I can find for example is a fake key mocking the idea that it will work...  in french:

https://translate.googleusercontent...700248&usg=ALkJrhhUv0-fuDtpBY8_OyKLTrqnUFAeug

The other keys don't do anything unless you are running a Pentium Pro or something ancient.

Sorry but unless I ses docs from microsoft those keys are just snake oil...  minus the oil, even.

Also, the idea that windows can even "manage" cache at all (it can't, that's not how cache works.    it can only structure memory to work better with really strange kinds of it) is a misunderstanding of the difference between "cache" and "memory" and really how things work.


----------



## MrGenius (Dec 23, 2018)

Gorstak said:


> anyway, I noticed that enabling cache management had impact on my single core cpu score. It went from 354 to 371 in cpuz with cache management enabled.


Which you attribute to having first level "CPU cache management" enabled I presume? It's odd that you say that. Yet don't provide any "proof" of it. So allow me...

3 tests were performed with each configuration. Highest score recorded for each.

No first level data cache "management" enabled.





With first level data cache "management" enabled.







R-T-B said:


> ...those keys are just snake oil...


Dammit! You just stole my line!

*100% PURE UNADULTERATED SNAKE OIL!!!*


----------



## Bill_Bright (Dec 23, 2018)

R-T-B said:


> Also, the idea that windows can even "manage" cache at all (it can't, that's not how cache works. it can only structure memory to work better


Kinda, sorta, but not really. You really need to be very specific here because it all depends on what kinda cache you are talking about. The page file, for example is a cache and the OS manages that both in terms of size and what data is stuffed into it.

The buffer on a hard drive is a cache - but the OS does not really have much to do with that. And the cache built into CPUs is generally managed by the CPU (with help from the chipset (I think!)) itself.

In any case, regardless which cache you are talking about, unless you are a true expert in computer architecture and memory management, it typically is best to just let the real experts manage it and stick with the defaults set by the CPU makers, chipset makers, drive makers and OS developers. That's there job after all and they have "teams" of experts developing these protocols and very deep pockets to crunch the data, review the history and set up and run the test facilities to make sure they do it right. It is highly unlikely anybody here has such a unique scenario that they need to deviate from the defaults - or the knowledge to do it right under the dynamic (ever changing) demands of today's computing tasks.


----------



## Gorstak (Dec 23, 2018)

correct again bill...someone hires people for work, and someone hires a manager too


----------



## R-T-B (Dec 23, 2018)

Bill_Bright said:


> Kinda, sorta, but not really. You really need to be very specific here because it all depends on what kinda cache you are talking about.



on-die main memory caching was my line of thought, but thanks for clarifying.


----------



## Gorstak (Dec 24, 2018)

Anyway, I made a simple reg key with a few other speedup windows tweaks, so you just need to import it into your registry and restart your pc

This is, of course, completely optional, and at your own risk.


----------



## Bill_Bright (Dec 24, 2018)

Has that hack been tested on Windows 7, Windows 8 and Windows 10? Both 32-bit and 64-bit? I feel if a user does not know if the changes this hack makes will work with their version of Windows, they probably should not be dinking around with the Registry.

While I appreciate the desire to improve the performance of users' computers, and the work that went into developing that hack, I feel we, as advisors, would be remiss not to point out the dangers of dinking around inside the Registry. It is easy but a huge mistake to assume all TPU readers are advanced and experienced users. Everybody was a newbie once, and new newbies are coming on line every day. And just because a user may be highly advanced, very experienced and even a recognized expert in some areas within IT, that does not make them a Windows or Registry expert.

There is a reason Microsoft does not make calling up the Registry Editor or making changes to the Registry as simple as starting File Explorer or calling up Edge. Editing the Registry is dangerous. One simple typo and you may brick your computer. I feel simply warning to use at one's own risk is like telling a little kid to cross a busy highway at their own risk, then washing our hands of any responsibility.

Changes made to the Registry are done in real-time! That is, the changes are done immediately and often don't even need a reboot to take effect.
There is no confirmation process. That is, Windows does not prompt users with an "Are you sure?" warning before changes take effect.
There is no "undo" feature. So if you mean to change 11e1 to 11d1 and accidentally enter 11f1, the change is made! If you don't remember the original value, or what you meant to enter, it could be brick time.
There are no prompts or warnings to backup the Registry before making any changes! 
There are no automatic backups as Microsoft Word does by default.
Regedit does not even have a backup or restore feature. Only Export and Import and those features are not explained or very intuitive.
If you don't know how to backup your Registry, you probably should not be dinking around inside the Registry. 
If you don't know how to restore from a Registry backup (especially if your computer will not boot), you probably should not be dinking around inside the Registry. 

With all that in mind, use at your own risk.


----------



## THEBOSS619 (Dec 25, 2018)

Bill_Bright said:


> Has that hack been tested on Windows 7, Windows 8 and Windows 10? Both 32-bit and 64-bit? I feel if a user does not know if the changes this hack makes will work with their version of Windows, they probably should not be dinking around with the Registry.
> 
> While I appreciate the desire to improve the performance of users' computers, and the work that went into developing that hack, I feel we, as advisors, would be remiss not to point out the dangers of dinking around inside the Registry. It is easy but a huge mistake to assume all TPU readers are advanced and experienced users. Everybody was a newbie once, and new newbies are coming on line every day. And just because a user may be highly advanced, very experienced and even a recognized expert in some areas within IT, that does not make them a Windows or Registry expert.
> 
> ...


What about modding your BIOS? I am living between success and bricked laptop... like nearly everyday because I always try new things and tinkering with my BIOS... it is fun!!  Thanks to SPI BIOS Programmer... I revive my laptop (it is on my signature) for nearly everyday  so... registry things are really nothing at all to me but for others... yea sure 

All what I am trying to say that... people who know what they are doing are the ones who likes to try while he/she knows the risks but those who don't... just... save your time and all the others time and just skip the whole thing while you can !


----------



## Bill_Bright (Dec 25, 2018)

THEBOSS619 said:


> What about modding your BIOS?


Not sure your point. Modifying the BIOS is totally different from making changes to the OS via the Registry. Changes you make in the BIOS are not permanent until you "*Save* and Exit". And of course, every motherboard user guide/manual explains in detail how to reset the BIOS. Some motherboards even provide a simple rear panel BIOS reset button just for that purpose! And many motherboard makers provide easy methods to backup and restore the BIOS from backup. 

So making changes to the BIOS is not the same thing as dinking around inside the Registry.


----------



## THEBOSS619 (Dec 25, 2018)

Bill_Bright said:


> Not sure your point. Modifying the BIOS is totally different from making changes to the OS via the Registry. Changes you make in the BIOS are not permanent until you "*Save* and Exit". And of course, every motherboard user guide/manual explains in detail how to reset the BIOS. Some motherboards even provide a simple rear panel BIOS reset button just for that purpose! And many motherboard makers provide easy methods to backup and restore the BIOS from backup.
> 
> So making changes to the BIOS is not the same thing as dinking around inside the Registry.


I'm sorry if I didn't make it clear... what I meant by modifying BIOS is... by unlocking it  and unlocking settings and reappear the hidden settings that supposed not to be there for the consumers market because if it was there.... NO BODY WILL BUY A NEW LAPTOP AGAIN!!! see what I mean?? so... doing that will get my laptop bricked but thanks to SPI BIOS Programmer.. I do the impossible on a laptop  and what I mean bricked laptop.. I mean that you can't even turn on your laptop.. it is just dead..  so... yes... editing the registry is like drinking water to me... what is a real challenge is playing with the BIOS... a Windows without BIOS is nothing but a piece of junk...  remember I am using a laptop not a desktop... it is two different worlds... we don't have a rear panel BIOS reset button like desktops.. so... you now you see what I am talking about 

Sorry if I got out of topic but I guess techpowerup forums seems to be much more biased to desktops than laptops so... I fully understand when somebody doesn't know or have a very deep knowledge about laptops


----------



## Bill_Bright (Dec 25, 2018)

That is still a totally different scenario than editing the Registry. 

And sorry, but it is just wrong (if not a bit condescending) to assume less interest in modifying notebooks suggests a lack of understanding or knowledge about laptops. And IMO, the word "bias" suggests an "unfair" favoritism towards one party over another. That is not the case. Just because many of us "prefer" to build our own non-proprietary PCs (with full sized keyboards, mice, monitors and surround sound speaker), that does not mean we are "biased" against proprietary notebooks. 

And of course people will still buy laptops again. I am afraid you have a very narrow, tunnelvisioned view of the laptop market. First, by far, the vast majority of notebook buyers have no interest in modifying the BIOS. As I said above, "_most notebooks are used as mobile devices for personal business, work or school._" That is, NOT play. And the greatest demand for such devices in the future will continue to be by those users.

What is "unfair" is the lack of an ATX type form factor standard for laptops. That leads me to this point - laptops tend to be very proprietary with proprietary BIOS settings, that have already been heavily modified by the notebook makers. They also have proprietary hardware and often proprietary modifications to the OS and other installed programs. While some factory built PCs may have some proprietary modifications, most are minor and easy to overcome. And of course there is a HUGE self-build PC industry that allows us to put an ASUS motherboard inside a Fractal Design case today, then swap it out with a Gigabyte board tomorrow where we expect the same case and same power supply and even the same Windows will support it. 

So no, modifying the BIOS is for a different discussion/thread.


----------



## MrGenius (Dec 25, 2018)

It probably should be mentioned how exactly this is supposed to be done. As a measure of "harm reduction".

It basically started in this thread here. With a link to this article here. Which, in general, outlines the process of adding the "requisite" DWORD (32 bit) values to the registry. What's changed from that thread, and said article, is the supposed definitions of the DWORD (32 bit)  values(as in what they really do...supposedly...and the addition of a couple that weren't mentioned previously) and the value data that "should" be applied for each. The new hypothesis supposes that a value data of "0"=OFF and "1"=ON. Which may, or may not, be correct(I don't know).

In summation:

1. Open regedit.
2. Go to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
3. Add the following new DWORD (32 bit) values:

FirstLevelDataCache
ThirdLevelDataCache
FourthLevelDataCache
FifthLevelDataCache

4. Modify the value data in decimal base for each of the above to 1.
5. Also modify the value data in decimal base to 1 for the following DWORD (32 bit) values:

LargeSystemCache
SecondLevelDataCache

6. After which a system restart is recommended(not sure if it's required).

Then decide for yourself whether it was all just a waste of time, or not. I hadn't noticed any issues present themselves by editing my registry in this manner. But I'd definitely not seen any benefit to doing it either. So I went ahead and deleted what I'd added, and modified the values I'd changed back to their original states(as in back to "0"). No harm, no foul...I guess.


----------



## THEBOSS619 (Dec 26, 2018)

Bill_Bright said:


> That is still a totally different scenario than editing the Registry.
> 
> And sorry, but it is just wrong (if not a bit condescending) to assume less interest in modifying notebooks suggests a lack of understanding or knowledge about laptops. And IMO, the word "bias" suggests an "unfair" favoritism towards one party over another. That is not the case. Just because many of us "prefer" to build our own non-proprietary PCs (with full sized keyboards, mice, monitors and surround sound speaker), that does not mean we are "biased" against proprietary notebooks.
> 
> ...


Couldn't agree more...  thanks for your honesty


----------



## Gorstak (Dec 30, 2018)

I can't edit OP, so lemme update what DWORD values mean, as values in OP are incorrect:

0 = not system managed
1 = automatic delayed start
2 = automatic start 
3 = manual start
4 = disabled


----------



## chriscbd_19 (Jul 31, 2020)

SecondLevelDataCache value in the memory management section of windows the value is based on the size of your SecondLevelDataCache your cpu has installed.

I've read books where setting DisablePagingExecutive and LargeSystemCache to a value of 1 will improve performance.


----------

