Jump to content

Registry Myths #2 - Setting the L2 Cache Size


Recommended Posts

Registry Myths #2 - Setting the L2 Cache Size

Sample misinformation:

For users of Windows 2000 or XP you actually have to tell the OS what size L2 cache your processor has otherwise it won't be used properly! Luckily it's fairly easy to fix.

Once you're in the Memory Management folder look for the DWORD value

secondleveldatacache. Right click on that and go to modify. Very important you have to change the Base from Hexidecimal to Decimal before modifying the values. After that's done just punch in your L2 cache size so if you're using an AthlonXP since the CPU has 256KB L2 Cache you enter 256. For Duron's enter 64 and for P4 Northwood's enter 512.

After that's done you should notice your programs now have quite a bit more zip and the system is less sluggish because Windows now knows how to use your L2 cache properly.

[source: http://www.techzonez.com/forums/archive/in...php/t-5618.html]

Windows XP can't detect the proper amount of L2 cache on your CPU. you'll want to go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Managementand change the SecondLevelDataCache key to the L2 cache size of your CPU (in Kb). I've received a few questions about this one and I thought I'd clarify it. when you select to modify this file the default entry is in hexadecimal simply change the selection to decimal and THEN enter your number. Such as 256, 512. A value of 100 in Hexadecimal will result in 256Kb being shown since that is what it's decimal number is.

[source: http://www.tweakfactor.com/articles/tweaks/xptweak/7.html]

The Reality:

I don't know how this one even manages to survive. I guess it's another perfect example of the lasting power of rumor.

SecondLevelDataCache records the size of the processor cache, also known as the secondary or L2 cache. If the value of this entry is 0, the system attempts to retrieve the L2 cache size from the Hardware Abstraction Layer (HAL) for the platform. If it fails, it uses a default L2 cache size of 256 KB. If the value of this entry is not 0, it uses this value as the L2 cache size. This entry is designed as a secondary source of cache size information for computers on which the HAL cannot detect the L2 cache.

This is not related to the hardware; it is only useful for computers with direct-mapped L2 caches. Pentium II and later processors do not have direct- mapped L2 caches. SecondLevelDataCache can increase performance by approximately 2 percent in certain cases for older computers with ample memory (more than 64 MB) by scattering physical pages better in the address space so there are not so many L2 cache collisions. Setting SecondLevelDataCache to 256 KB rather than 2 MB (when the computer has a 2 MB L2 cache) would probably have about a 0.4 percent performance penalty.

[source: http://support.microsoft.com:80/support/kb...s/Q183/0/63.ASP]

One of the most infamous NT tweaks since the introduction of NT4 has got to be the "L2 cache" tweak, a lone registry entry which stipulates the amount of L2 cache (or secondary cache) that the OS will make use of. Well, as with many things in life, the effects of this tweak are not so black and white.  If you're using a processor that implements a direct-mapped L2 cache design (like Pentium I's), then this registry adjustment is indeed for you.  However, if you own any Intel processor post-PI, or any modern AMD processor (K6-2 and newer), then your processor is using a set-associative L2 cache design, and thus you need not specify your L2 cache size.  Let me explain.

If you choose not to futz with the registry key in question, the OS will call on the HAL (Hardware Abstraction Layer) for retrieval of the L2 cache size when you boot your computer.  If this happens to fail, a default value of 256KB is used for all logon sessions on that boot session. This is where the myth that NT can only use 256KB of L2 cache comes from.  But it's false.  See, the HAL is able to retrieve the processor (L2) cache from any processor using the set-associative cache design, it's only the relatively few processors out there with direct-mapped L2 caches that the HAL won't chat it up with.  Thus, this tweak only applies to a select number of people anymore (like people with Pentium I procs between 166-233MHz, as lower rated procs had only 256KB cache).

[source: http://arstechnica.com/tweak/nt/L2-cache-1.html]

There you have it. Unless you're reading this from a Pentium I, the L2 cache tweak is going to do you more harm then good.

Link to comment
Share on other sites

  • 4 weeks later...

Rigth now i am making a tool to enhance WinXP performance and doing research on the L2 cache isue in windows......

You wrote a duron should be set to 64.......i wonder why......because as far as i know a duron have 128 L2 cache so my opinion is that i should be set to 128 (hex 80)......

Can any explain why ?


Link to comment
Share on other sites


If you took the time to read the whole post above, dirtyepic says that the L2 cache tweak is of no use on newer processors (like duron). Do NOT set that tweak to 64 (or anything else, for that matter) on duron. The "why" is clearly explained above......

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...