CPU L2 Cache Memory setting in Vista

How to Set Vista for the CPU L2 Cache Memory Size

information   Information
The SecondLevelDataCache records the size of the processor cache, also known as the secondary or L2 cache. If the value of this entry is 0, Vista will attempt to retrieve the L2 cache size from the Hardware Abstraction Layer (HAL) for the platform. If Vista fails for some reason to retrieve the L2 cache size from HAL, then it uses a default CPU L2 cache size of only 256 KB. If the default value of the SecondLevelDataCache value is not 0, Vista will use the value (amount of memory) you set instead of 0 (for 256 KB) as the L2 cache size of. This value is designed as a secondary source of cache size information for Vista when the HAL cannot detect the L2 cache from the CPU.
Note   Note
This sets the SecondLevelDataCache inside the registry.

From Microsoft KB183063:

Microsoft KB183063 said:
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 CPU L2 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 CPU has a 2 MB L2 cache) would probably have about a 0.4 percent performance penalty.
warning   Warning
Only set the value to what your processor actually has for the L2 cache size. Do not use a larger size than it actually has.




STEP ONE
Find Out the L2 Cache Size Reported by HAL

NOTE: This will show you how to see what the L2 cache size is for your CPU as it is reported to Vista by HAL. This value will be used in STEP TWO below to set the SecondLevelDataCache value for this as a backup in case HAL rarely could not detect the L2 cache from the CPU.
1. Generate a System Health Report.​
2. Click on the Hardware Configuration arrow on the far right to expand it. (See screenshot below step 3)​
3. Click on the Devices arrow on the far right to expand it. (See screenshot below)​
Arrows.jpg

4. Under Devices, scroll down to Motherboard Classes. (See screenshot below step 5)​
A) Click on the + sign to expand​
root\cimv2:SELECT * FROM Win32_Processor.​

B) Click on the + sign to expand​
Win32_Processor.DeviceID="CPU0".​


5. In that list, you will see L2CacheSize and the value beside it for it's size to use it in step 6 in STEP TWO below.​
NOTE: For this example you will see 6144 to be used for my CPU's 2x6144 (12MB) L2 size. Now, here's a kicker. The newer Yorkfield Core 2 Quads CPUs use the entire cache for both cores unlike the older CPUs that do not share. So a 2x6144 (12mb) L2 cache would use 12288 (2x6144) instead despite what is reported in Vista for HAL.​
System_Health_Report.jpg





STEP TWO
Set the L2 Cache Size

NOTE: This will set the SecondLevelDataCache value in the registry, from the value gotten in STEP ONE, as a backup in case HAL rarely could not detect the L2 cache from the CPU and prevent having only a default L2 cache size of 256 KB used as L2 cache size instead by Vista.
1. Open the Start Menu.​
2. In the white line (Start Search) area, type regedit and press Enter.​
3. Click on Continue in the UAC prompt.​
4. In regedit, go to: (See screenshot below)​
Code:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
5. In the right pane, right click SecondLevelDataCache and click on Modify.​
Before_Reg.jpg

6. Dot Decimal, and type in the value in bold (see table below) for your CPU L2 size from STEP ONE above. (See screenshot below table)​
NOTE: I have a CPU with a 2x6144 (12MB) L2 cache size, so I would use 6144 (Dec) or 1800 (Hex) since it is 2x. See STEP ONE above for how to get the L2 size for your CPU. Now, here's a kicker. The newer Yorkfield Core 2 Quads CPUs use the entire cache for both cores unlike the older CPUs that do not share. So a 2x6144 (12mb) L2 cache would use 122488 (Decimal) or 3000 (hex) instead despite what is reported in Vista for HAL.
[TABLE=class:-grid,-width:-400][TR][TD]
Decimal Value
[/TD]
[TD]
Hexadecimal Value
[/TD][/TR]
[TR][TD]
256 KB
[/TD]
[TD]
100 (hex)
[/TD][/TR]
[TR][TD]
512 KB
[/TD]
[TD]
200 (hex)
[/TD][/TR]
[TR][TD]
1024 KB (1MB)
[/TD]
[TD]
400 (hex)
[/TD][/TR]
[TR][TD]
2048 KB (2MB)
[/TD]
[TD]
800 (hex)
[/TD][/TR]
[TR][TD]
3072 KB (3MB)
[/TD]
[TD]
c00 (hex)
[/TD][/TR]
[TR][TD]
4096 KB (4MB)
[/TD]
[TD]
1000 (hex)
[/TD][/TR]
[TR][TD]
6144 KB (6MB)
[/TD]
[TD]
1800 (hex)
[/TD][/TR]
[TR][TD]
8192 KB (8MB)
[/TD]
[TD]
2000 (hex)
[/TD][/TR]
[TR][TD]
12288 KB (12MB)
[/TD]
[TD]
3000 (hex)
[/TD][/TR]
[TR][TD]
16384 KB (16MB)
[/TD]
[TD]
4000 (hex)
[/TD][/TR][/TABLE]

Modify.jpg

7. Click on OK to apply.​
8. Your registry will look like this below for a 2x6144 (12MB) L2 cache memory size.​
NOTE: See STEP ONE above to find out your CPU L2 cache size.​
After_Reg.jpg

9. Close regedit.​
10. Restart the computer to apply the change.​
That's it,
Shawn





 

Attachments

  • thumb_CPU.jpg
    thumb_CPU.jpg
    3 KB · Views: 560
Last edited by a moderator:
LOL, now that will be interesting.

Yeah. Again: this is off the top of my head... but I'm pretty sure my memory is accurate on this one.

The design is curious. The L2 cache latency is improved, but the L3 cache is nowhere near as fast as even the current generation's L2 cache... so it's not a clear win-win situation. In some scenarios, it will result in an application running faster. In others... maybe not so much.

Though, I expect with the on-die memory controller and other enhancements, no code will actually execute slower than on current processors.

One thing we'll all have to get ready for is buying new motherboards - as with the new design comes a new socket (which hasn't happened for Intel in, what, 3 years?)
 

My Computer

I have an Intel Pentium D 925 2 x 2mb L2, so would that be 1000 hex for a 4 meg cache?
I ask because the cores in pentium d's are just stuck together and the memory has to use the fsb to exchange data unlike the dou's.
 

My Computer

System One

  • Manufacturer/Model
    Self Build
    CPU
    Intel Pentium D 925
    Motherboard
    Asus P5Q-EM
    Memory
    Corsair PC2-8500
    Graphics card(s)
    Onboard Intel GMA X4500HD
    Sound Card
    On board crap!
    Monitor(s) Displays
    DGM 15" inch generic?
    Screen Resolution
    1280x 1024
    Hard Drives
    2
    PSU
    380W Antec Earth Watts
    Case
    Antec NSK 2480
    Cooling
    Scythe Mini ninja
    Mouse
    generic
    Keyboard
    generic
    Internet Speed
    Depends what time of the month it is? I have a uk isp.
Cheers Itwally I thought this might be the case but I was not quite 100%, I did set it 2 1000 hex with no problems but I have just put it down 2 800 hex.
 

My Computer

System One

  • Manufacturer/Model
    Self Build
    CPU
    Intel Pentium D 925
    Motherboard
    Asus P5Q-EM
    Memory
    Corsair PC2-8500
    Graphics card(s)
    Onboard Intel GMA X4500HD
    Sound Card
    On board crap!
    Monitor(s) Displays
    DGM 15" inch generic?
    Screen Resolution
    1280x 1024
    Hard Drives
    2
    PSU
    380W Antec Earth Watts
    Case
    Antec NSK 2480
    Cooling
    Scythe Mini ninja
    Mouse
    generic
    Keyboard
    generic
    Internet Speed
    Depends what time of the month it is? I have a uk isp.
No problem. Glad I could be of service.

As previously mentioned: Microsoft's own information on this setting indicates that it is a legacy item that will have no effect any CPU made in the past several years. Still, the correct value would be 0x800.

-ltwally
 

My Computer

My Computer

System One

  • Manufacturer/Model
    Dell Vostro 1700
    CPU
    Core2 Duo T9300 2.5GHz
    Motherboard
    Dell 0HX767
    Memory
    4 GB DDR2
    Graphics card(s)
    GeForce 8600M GT
    Sound Card
    SigmaTel STAC 92XX C HD
    Screen Resolution
    1920 x 1200
    Hard Drives
    2 x 250 GB Hitachi 5200 RPM
Hello,

This is my first time here and I was wondering why when I perform the system health report it reports that my L2 cache size as 0. I have a Q9650 cpu which has an L2 cache of 12mb. I did go into registry editor and changed the Secondleveldatacache to 12288 decimal. I am just wondering if there is a reason it is reporting it this way or if there could be a problem with my cpu or motherboard?

Any help would be appreciated as I have searched everywhere for an answer to this but have come up with nothing.
icon9.gif


Thanks so much for your help,
Riverswild
 

My Computer

I have no idea why Windows reports zero. What does CPU-Z say?

In the end, it doesn't matter what Windows thinks your L2 cache is. L2 cache is managed by the CPU, itself - not by your OS.

The "secondleveldatacahce" registry setting is an old legacy value, and has zero impact on any modern processor that I'm aware of. (The last CPU, to my knowledge, that it would have impacted was the Pentium II.)
 

My Computer

Hello,

This is my first time here and I was wondering why when I perform the system health report it reports that my L2 cache size as 0. I have a Q9650 cpu which has an L2 cache of 12mb. I did go into registry editor and changed the Secondleveldatacache to 12288 decimal. I am just wondering if there is a reason it is reporting it this way or if there could be a problem with my cpu or motherboard?

Any help would be appreciated as I have searched everywhere for an answer to this but have come up with nothing.
icon9.gif


Thanks so much for your help,
Riverswild

I've seen a few problems with the Yorkfield cores, like Windows reporting 3 of the 4 cores as Unknown Devices in Device Manager.

Have you tried upgrading your BIOS for the motherboard?
 

My Computer

System One

  • Manufacturer/Model
    Custom Built
    CPU
    Intel Core 2 Quad Q9550
    Motherboard
    XFX MB-750I-72P9 NF750i
    Memory
    4096MB Corsair XMS2 PC-5400
    Graphics card(s)
    ASUS Nvidia Geforce GTX470
    Sound Card
    ASUS Xonar DX
    Monitor(s) Displays
    Dell 24" S2409W & Dell 20" E207WFP
    Screen Resolution
    1920x1080 & 1680x1050
    Hard Drives
    750GB Western Digital Caviar Black & 500GB Samsung
    PSU
    750 watt Thermaltake Toughpower
    Case
    Coolermaster Dominator 690 Nvidia Edition
    Cooling
    Zalman CNPS9700-NT Cooler, 6x 120mm Chassis Fans
    Mouse
    Logitech G5 Laser Mouse (2007 edition)
    Keyboard
    Logitech G11 Keyboard
    Internet Speed
    100Mbps
    Other Info
    abit airpace 54mbps wireless PCI-E x1 card
Hello,

Thank you for the quick reply. CPU-Z reports 6144 x2 for L2 cache. I was just worried that maybe there is something wrong with my hardware as the system health report is reporting 0. I noticed this when I was doing a 3dmark06 and in my system details for my cpu it is also reporting L2 cache as 0. But if L2 cache is managed by the CPU and not by windows then I guess I have nothing to worry about. I am very new to this and this is my first computer build. It is very nerve racking for me.

Thank you so much for your reply and help!!
Riverswild
 

My Computer

Hello Everlong18,

Yes I did upgrade the BIOS for the motherboard. Is there a way to tell for sure what version Bios I am running. I have a evga 780i sli motherboard.

Thank you so much,
Riverswild
 

My Computer

Hello,

Thank you for the quick reply. CPU-Z reports 6144 x2 for L2 cache. I was just worried that maybe there is something wrong with my hardware as the system health report is reporting 0. I noticed this when I was doing a 3dmark06 and in my system details for my cpu it is also reporting L2 cache as 0. But if L2 cache is managed by the CPU and not by windows then I guess I have nothing to worry about. I am very new to this and this is my first computer build. It is very nerve racking for me.

Thank you so much for your reply and help!!
Riverswild

I wouldn't worry about what Windows think about your cache size, as long as it's seeing all your CPU's (cores), as noted above by Everlong18.

I do not know what kind of detect methods 3dmark06 uses for CPU / L2 cache. If it's just spitting back the data that Windows provides it... well...

You might try upgrading it. Downloads links: Futuremark - Benchmarks

Your BIOS probably has an option in it for detailed information on boot. If you enable that, it should print out the L2 cache size on bootup.
 

My Computer

It's worth pointing out that if you replaced your original CPU with a new one that is a different model Windows can become "confused."

Example: I "borrowed" the CPU from a new machine at work for my own workstation. My Pentium-D (dual core) was suddenly a Core2Quad. The BIOS saw the new CPU correctly. However, Vista's device manager thought I had a pair of Pentium-D cores and a pair of Core2Quad cores.

My solution was a fit of rage where I wiped the harddisk just to teach it a lesson. Things worked great after re-install!!

Probably better solutions out there.
 

My Computer

Sorry it took so long to reply. I was looking in my bios for the option you had mentioned but I couldn't find it. My devise manager does see all my cpu cores. I also built this computer with all new hardware and then installed windows. So, everything should be fresh. I have no idea. Seem weird to me.

Thank you for your help!!
Riverswild
 

My Computer

Hello, one more again.
This is very difficult but I will try to do a good question.
My memory cache have 4096 KB, and by default my memory cache only uses 256 KB of storage, right? (Says in the tutorial)
For I use the full potential of my memory cache i need to follow the tutorial, isn't it?(if i need)
So when i go to the second step(regedit) what i have to do, is replace the value 0 for 4096 (decimal) or 1000 (hex), this is right? :)

Thank you, for your help.​
 

My Computer

Hello Akuanauta,

Since your CPU has a 4 MB L2 cache, then yes that would be correct. :geek:

Shawn
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
You're welcome Akuanauta.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
Good evening everyone. My processor is a Intel Pentium Dual core T3200 @ 2.0GHZ and I was skeptical the settings required to utilize the tip. :)
 

My Computer

Back
Top