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:
Is there any way yet to change the L3 cache size? I have a 9850BE that has a 2MB L3 cache. Thanks.


To my understanding, there really isn't a need to do so. In fact, there really isn't a need to edit the L2 cache size for most (all?) modern CPU's. Windows should successfully auto-detect these values.

So, don't worry. ;)
 

My Computer

Is there any way yet to change the L3 cache size? I have a 9850BE that has a 2MB L3 cache. Thanks.


To my understanding, there really isn't a need to do so. In fact, there really isn't a need to edit the L2 cache size for most (all?) modern CPU's. Windows should successfully auto-detect these values.

So, don't worry. ;)

Actually, Vista 64 didn't detect my L2 cache correctly and has my L3 cache set at 0 even though I have a 2MB one. I have a AMD 9850BE so it is definitely a "modern CPU". :eek:
 

My Computer

Even still, your processor does not need the operating system to manage its cache; the processor does that for itself. This was only a concern for older processors.

As an aside, the SecondLevelDataCache field truely is a relic of older processors.

Read up on it here: Detailed Explanation of SecondLevelDataCache

Quote (emphasis added by me):
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.
 

My Computer

Well, then you mean doing this is futile with my using Q6600? I've already set the value to 1000(HEX).. if futile, should it be set to the default value, 0?
 

My Computer

Hi Lonige, and welcome to Vista Forums.

It's not futile. It's just that there is a very low chance that HAL will not detect the correct CPU L2 cache size for Vista. Setting this, just helps make sure that Vista uses the correct CPU L2 cache size, in case HAL fails for some reason, instead of only the default 256 KB size. That's all.

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
According to Microsoft, this setting is only of value on systems with a direct-mapped L2 cache. This is not the type of cache used on processors since, apparently, the Pentium II.

Unlike your system page-file, for instance, Windows (for the most) part has no say in what is in your processor cache. That is (almost) entirely up to the processor, itself.

For more information, check out the wikipedia entry.
 

My Computer

It makes you wonder why Microsoft would leave these registry settings in Vista then. I do not believe anyone uses a Pentium 2 or older with Vista.
 

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
The Windows NT code-base goes back roughly 20 years... it's riddled with leftovers like this. Personally, I keep hoping the Microsoft will have the guts to do an "OSX" and re-invent the wheel... but that is neither here nor there.
 

My Computer

Hi, You could just dot the Decimal option, enter the value given by performance monitor in step 5, E.G. 6144 then click Ok . Regedit will automatically enter both the Hex. value 0x00001800 for you, followed by the decimal value in brackets(6144) exactly as in step 8 .

SIW2 LONDON
 

My Computers

System One System Two

  • Operating System
    Vista
    CPU
    Intel E8400
    Motherboard
    ASRock1333-GLAN R2.0
    Memory
    4gb DDR2 800
    Graphics card(s)
    nvidia 9500GT 1gb
  • Operating System
    win7/vista
    CPU
    intel i5-8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    ballistix 2x8gb 3200
Hi. I'm also using a Core 2 Quad Q9450 CPU's 2x6144 (12MB), but as I can see, you're using a size of 6 MB for your cache. Shouldn't this be 12 MB (HEX = 3000)? (you're using HEX = 1800)
 

My Computer

Hi NicoVO, and welcome to Vista Forums.

The Core 2 Quad Q9450 has two Dual Cores in it. Each Dual core has 6144 (6MB) for a total of 12 MB. You would use the Decimal setting 12288 since the L2 cache is shared fully between the cores with this CPU model.

This diagram provided by Itwally can help show this:

Code:
                FSB
                 |
                 |
--------------PROCESSOR--------------  
|                |                  |
|                |                  |
|            12 meg L2              |
|                |                  |
|                |                  |
|   ------------------------------- |
|   |         |         |         | |
|  core0     core1     core2  core3 |
|                                   |
-------------------------------------


Hope this helps,
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
Hi NicoVO, and welcome to Vista Forums.

The Core 2 Quad Q9450 has two Dual Cores in it. Each Dual core has 6144 (6MB) for a total of 12 MB. You would use the Decimal setting 12288 since the L2 cache is shared fully between the cores with this CPU model.

Hope this helps,
Shawn


Actually: The Q9450 is a Yorkfield. The Yorkfield is the latest generation of Core2Quad cpu's, and has a single, unified L2 cache.

For these new processors, the following is a correct diagram:

Code:
                FSB
                 |
                 |
--------------PROCESSOR--------------  
|                |                  |
|                |                  |
|            12 meg L2              |
|                |                  |
|                |                  |
|   ------------------------------- |
|   |         |         |         | |
|  core0     core1     core2  core3 |
|                                   |
-------------------------------------

This has a couple major benefits:
1) The Yorkfields have larger cache's, across the board.
2) All four cores can have access to the same data. There is no need to copy it from CacheA to CacheB. Because threads routinely flop around from core to core, this can be a real benefit. Also, it is a benefit for multithreaded apps.
 

My Computer

Hi. I'm also using a Core 2 Quad Q9450 CPU's 2x6144 (12MB), but as I can see, you're using a size of 6 MB for your cache. Shouldn't this be 12 MB (HEX = 3000)? (you're using HEX = 1800)

NicoVO: You're quite lucky to have one of the new Core2Quads. I wish my board could handle one.

Yes, the correct L2 cache size for your CPU is, indeed, 0x3000.
 

My Computer

I see. Thank you Itwally. I have updated the tutorial for this.

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
Hi. I'm also using a Core 2 Quad Q9450 CPU's 2x6144 (12MB), but as I can see, you're using a size of 6 MB for your cache. Shouldn't this be 12 MB (HEX = 3000)? (you're using HEX = 1800)

NicoVO: You're quite lucky to have one of the new Core2Quads. I wish my board could handle one.

Yes, the correct L2 cache size for your CPU is, indeed, 0x3000.

Thank you for the correct answer. And yes, I'm lucky to be the owner of it. My mobo is a Striker II Extreme (790i SLI Ultra) which can handle this easily. :)
 

My Computer

Nice. I've got a 680i chipset in mine.. and while it should be able to handle the Yorkfield, for some reason it is listed as not-supported. :(
 

My Computer

Maybe in the next BIOS update, they will support it.
 

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
THis is a noob question. :o

I have an Intel® Core™2 Duo Mobile Processor T8100 with a L2 Cache size of 3 MB. I am unsure of the hex setting since I only see a setting for 2 MB and 4 MB. So what should I set mine for 3 MB? Thanks :)
 

My Computer

Hi Abovesecret, and welcome to Vista Forums.

I would dot Decimal and use 3072. :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
Back
Top