CPU L2 Cache Memory setting in Vista

ByLine
How to Set Vista for the CPU L2 Cache Memory Size
Synopsis
This will show you how to set the Vista for the actual CPU L2 cache memory size incase Vista fails to get it from the Hardware Abstraction Layer (HAL) and uses a default L2 cache size of only 256 KB instead of the actual size.
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.

Decimal Value

Hexadecimal Value

256 KB

100 (hex)

512 KB

200 (hex)

1024 KB (1MB)

400 (hex)

2048 KB (2MB)

800 (hex)

3072 KB (3MB)

c00 (hex)

4096 KB (4MB)

1000 (hex)

6144 KB (6MB)

1800 (hex)

8192 KB (8MB)

2000 (hex)

12288 KB (12MB)

3000 (hex)

16384 KB (16MB)

4000 (hex)

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





 
Last edited by a moderator:
Shawn Brink

Comments

I did this and then ran speccy and it shows as follows, does that look right.
I have 2 gigs of ram running dual channel.
 
Last edited:
I did this and then ran speccy and it shows as follows, does that look right.
I have 2 gigs of ram running dual channel.
Intel Pentium T2080 @ 1.73GHz

Was just worried about the way L1 was listed as 2x32 KBytes and L2 as 1024 KBytes
Hello Roger,

Yes, that would correct. The spec sheet for your processor at the Intel link below shows a 1MB L2 cache for that processor. :)

Intel® Pentium® Processor T2080 (1M Cache, 1.73 GHz, 533 MHz FSB)with SPEC Code(s)SL9VY
 
Hi Brink

Pls help me how to set the CPU L2 Cache Memory Setting for Vista 64 Bit OS type.

Im providing my System configuration, infact it is Laptop.

Here the configuration goes:

Brand: Sony Vaio VGN Z46 GD/B

OS: Vista Business 64 Bit (SP2)
CPU: Intel Core2 Duo Processor P9700
(6M Cache, 2.80 GHz, 1066 MHz FSB)

Chipset: Mobile Intel 4Series Express Chipset Family

Graphic Dispaly: Card name: NVIDIA GeForce 9300M GS
Manufacturer: NVIDIA
Chip type: GeForce 9300M GS
DAC type: Integrated RAMDAC
Device Key: Enum\PCI\VEN_10DE&DEV_06E5&SUBSYS_9025104D&REV_A1
Display Memory: 2282 MB
Dedicated Memory: 236 MB
Shared Memory: 2046 MB
Current Mode: 1600 x 900 (32 bit) (60Hz)

Memory: 6074MB RAM

Disk Drive: Hitachi HTS723232L9SA60 (300 GB)

Pls help and also Im a new commer to this forum. Thank You
 
Hi Brink

Pls help me how to set the CPU L2 Cache Memory Setting for Vista 64 Bit OS type.

Im providing my System configuration, infact it is Laptop.

Here the configuration goes:

Brand: Sony Vaio VGN Z46 GD/B

OS: Vista Business 64 Bit (SP2)
CPU: Intel Core2 Duo Processor P9700
(6M Cache, 2.80 GHz, 1066 MHz FSB)

Chipset: Mobile Intel 4Series Express Chipset Family

Graphic Dispaly: Card name: NVIDIA GeForce 9300M GS
Manufacturer: NVIDIA
Chip type: GeForce 9300M GS
DAC type: Integrated RAMDAC
Device Key: Enum\PCI\VEN_10DE&DEV_06E5&SUBSYS_9025104D&REV_A1
Display Memory: 2282 MB
Dedicated Memory: 236 MB
Shared Memory: 2046 MB
Current Mode: 1600 x 900 (32 bit) (60Hz)

Memory: 6074MB RAM

Disk Drive: Hitachi HTS723232L9SA60 (300 GB)

Pls help and also Im a new commer to this forum. Thank You
Hello Hitin, and welcome to Vista Forums.

Since your CPU has a 6MB L2 cache, you would use either 6144 (Decimal) or 1800 (Hexadecimal). :)
 
Wow what a handy tool Shawn am so impressed one thing is I cannot work out the way to find out bout the CPU cache state as at the top of the tut.

Hiyya Shawn have got to SecondDataLevel Cache and the value is set at
0x00000000(0). Now the CPU is an Intel Core Duo T2450 @2.0Ghz with 2MB L2 and I am now wondering why the value is (0) and what to do next please?
 
Last edited by a moderator:
Hello John,

What trouble are you having with finding the L2CacheSize in the System Health Report?

The default value of the SecondLevelDataCache value is 0, so that is normal. The SecondLevelDataCache value is only used if HAL fails to detect the true L2 cache of the CPU. Normally this is not a problem though. If you like, you can set the SecondLevelDataCache value for 2MB at step 6 for your CPU. :)

http://ark.intel.com/products/29752/Intel-Core-Duo-Processor-T2450-(2M-Cache-2_00-GHz-533-MHz-FSB)
 
Hello John,

What trouble are you having with finding the L2CacheSize in the System Health Report?

The default value of the SecondLevelDataCache value is 0, so that is normal. The SecondLevelDataCache value is only used if HAL fails to detect the true L2 cache of the CPU. Normally this is not a problem though. If you like, you can set the SecondLevelDataCache value for 2MB at step 6 for your CPU. :)

Intel® Core)
Thanks Shawn I did have a tad trouble getting the the setting and then just wanted to make sure what I was doing in adjusting the level so if (0) is ok I'll leave it at that - am just going through your tut on speeding the thing up and came across this L2 ref:D
 
Yeah, the SecondLevelDataCache value is just a backup to be used instead in case HAL should ever fail to detect the true L2 cache. You really don't have to change the value unless you just wanted to. If you do, you just need to make sure that it's set correctly for your CPU. The value in the System Health Report is the value that HAL has detected for your CPU's L2 and what is currently being used. :)
 
Yeah, the SecondLevelDataCache value is just a backup to be used instead in case HAL should ever fail to detect the true L2 cache. You really don't have to change the value unless you just wanted to. If you do, you just need to make sure that it's set correctly for your CPU. The value in the System Health Report is the value that HAL has detected for your CPU's L2 and what is currently being used. :)
NO BS I just don't know how you pack all this in I reckon you have the brain the size of Texas!!

Thanks again for improving this dopey old codger:)
 
Setting L2 Caching

I saw one of the older threads and decided to try it. But, the Reliability and Performance Monitor can't generate a system health report.

Error:
An error occurred while attempting to generate the report.
The wait for the report generation tool to finish has timed out.

I have an Intel Pentium Dual Core T2370 processor.
 
Uh, I'm a little confused. What value do I enter for the SecondLevelDataCache and is it hexadecimal or decimal? Sorry, I just don't want to mess up. (Playing it safe...)
 
Top