Unsolved

This post is more than 5 years old

10 Posts

34771

December 31st, 2003 06:00

How to maximize your level 2 cache.

Microsoft Knowledge Base Article - 183063

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager \Memory Management\ SecondLevelDataCache

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.

I will translate.
If the value of the Secondlevelcache is zero.
The system tries to access this registry key as though it were larger than zero first.
If the system finds that the registry key is zero, it will use that size for secondleveldatacache.

The zero used in this registry key is really 256 Bytes.

Now for the scarry part.

Microsoft makes this registry key zero (256 Bytes), on ALL nt kernel operating systems.
And in doing so limits the processor secondleveldatcache to 256 Bytes.

To use a secondleveldatacache larger than 256 Bytes.
You have to edit the nessessary registry key.

I have 512 Bytes secondleveldatacache.
So I put Decimal 512, Hexidecimal 200. Instead of zero, in that registry key.

If you have a pentium 4 extreme edition processor with 2 megaBytes secondleveldatacache.
You put Decimal 2048, Hexidecimal 800, instead of zero in this registry key.

Here is a calculator to see for yourself.
http://www.speedguide.net/conversion.php

To get to this registry key.
First press the start button.
Then press the run button.
Then type regedit and press ok.
Now go and follow this path
HKEY_LOCAL_MACHINE\
SYSTEM\
CurrentControlSet\
Control\
Session Manager \
Memory Management\
SecondLevelDataCache

I'll summarize with a quote from Microsoft Knowledge Base Article - 183063
"Setting SecondLevelDataCache to 256 KB(0) rather than 2 MB (when the computer has a 2 MB L2 cache) would probably have about a 0.4 (40%)percent performance penalty."

What this registry key is set at has real performance results.

2 Intern

 • 

2.5K Posts

December 31st, 2003 11:00

I strongly recommended that no one modify the registry until they read
the complete Microsoft Knowledge base articles.  This is a summary of
what I read.  Please read it, the article, yourself.

1. The information in this article applies to:
   * Microsoft Windows NT Server 4.0
   * Microsoft Windows NT Workstation 4.0
   * Microsoft Windows NT Server, Enterprise Edition 4.0

2.  It is only useful for computers with direct-mapped L2 caches.

3.  Pentium II and later processors do not have direct- mapped L2 caches.

4.  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.  Not 40 percent.

5.  Microsoft makes this registry key zero (256 KB), and in doing so
    limits the processor secondleveldatcache to 256 KB.  This statement
    is in conflict with the Knowledge base article, which states, "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. 
    Note the key phrase "If it fails".

 

Message Edited by msgale on 12-31-2003 07:37 AM

10 Posts

December 31st, 2003 13:00

I'll reply to your statement above in kindly fashion.

1) Yes. This applies to nt kernel operation systems.

2) 'It is only useful for computers with direct mapped L2 caches.'

Well, yes and no. Yes it's good to set it to zero for computers with direct mapped L2 caches.
No, it's a performance hit to set it to zero on modern processors.

3) .4 is 40 percent. Look at this link: http://members.tripod.com/MrMike888/percentChart.html

4) If it fails to use hal. It uses zero.

If you read the Microsoft article on hal.
" Microsoft Knowledge Base Article - 99588

The Windows NT hardware abstraction layer (HAL) refers to a layer of software that deals directly with your computer hardware.
Because the HAL operates at a level between the hardware and the Windows NT executive services,
applications and device drivers need not be aware of any hardware-specific information.
The HAL provides routines that enable a single device driver to support a device on different hardware platforms,
making device driver development much easier. It hides hardware dependent details such as I/O interfaces, interrupt controllers,
and multiprocessor communication mechanisms.
Applications and device drivers are no longer allowed to deal with hardware directly and must make calls to HAL
routines to determine hardware specific information. T
Thus, through the filter provided by the HAL, different hardware configurations can be accessed in the same manner."

Microsoft Knowledge Base Article - 183063

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.

Notice it said 'if it fails'.
It has a failure rate of 100 % if the registry key is zero.
Or, if it fails. The registry key is zero 100 % of the time.
100 / 100 = 1
So 100 % = 1
If the registry key is zero. The registry failure rate is 100 %. The rate at which the registry key that limits the secondleveldatacache to 256 Bytes is 100 % on all NT kernel operating systems.

On the other hand. If you say when the default of zero in this registry key is used. It's a 50 % change you might get 3 Megs level 2 cache. Then the chanches of that happening are not 100 % :-).

2 Intern

 • 

2.5K Posts

December 31st, 2003 14:00

Actually ths whole issue is moot since " it is only useful for computers with direct-mapped L2 caches. Pentium II and later processors do not have direct- mapped L2 caches."  Also this "This entry is designed as a secondary source of cache size information for computers on which the HAL cannot detect the L2 cache".

From Microsoft "when the computer has a 2 MB L2 cache) would probably have about a 0.4 percent performance penalty."  To me 0.4 percent is 0.4 percent, and 40 percent is 40 percent.   

Again from Microsoft "SecondLevelDataCache can increase performance by approximately 2 percent in certain cases for older computers with ample memory" Then does  2 percent becomes 200 percent?

I read the link http://members.tripod.com/MrMike888/percentChart.html and it don't say what you think its says.  Example if something goes from 3 to 6 (100 percent increase)  the formulat to compute increases is (6-3) / 3 = 3/3 = 1. Using the referenced chart in the column Decimal look for 1 and read over to 100 percent.  The chart is used to convert fractions to percentages, Microsoft specifically stated percentages.

Lets set up a little decision table:

Is SecondLevelDataCache not equal to zero

    Yes - use the value

    No - Attempt to get the SecondLevelDataCache Size

        Did we get a value - yes use the value

        No - use 256KB

I have absolutely no idea where this statement comes from - "No, it's a performance hit to set it to zero on modern processors".

10 Posts

December 31st, 2003 15:00

Setting this registry key to .......................ZERO ........................................is useful............................................................................................. ........ for older computers.

Your thinking the ms article is saying set the full cache value for older computers only. Not the newer ones. This is jibberish.

http://members.tripod.com/MrMike888/percentChart.html
This chart states .4 is equal to 40 percent. Please don't say stuff without even looking.

4/10=2/5 : Fraction

0.40 : Decimal

40 : Percent

You said:
Lets set up a little decision table:

Is SecondLevelDataCache not equal to zero

Yes - use the value

No - Attempt to get the SecondLevelDataCache Size

Did we get a value - yes use the value

No - use 256KB
End quote.

You did not read this enough times.
Microsoft Knowledge Base Article - 183063

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.

Notice it said 'if it fails'.
It has a failure rate of 100 % if the registry key is zero.
Or, if it fails. The registry key is zero 100 % of the time.
100 / 100 = 1
So 100 % = 1
If the registry key is zero. The registry failure rate is 100 %. The rate at which the registry key that limits the secondleveldatacache to 256 Bytes is 100 % on all NT kernel operating systems.

On the other hand. If you say when the default of zero in this registry key is used. It's a 50 % change you might get 3 Megs level 2 cache. Then the chanches of that happening are not 100 % :-).

You want me to say it more times and repeat myself. Why ?
Well I repeated myself.

10 Posts

December 31st, 2003 17:00

Look at my proof. In math speak.

.4 > .004 = 100 %

100 / 100 = 1

= .4 is used instead of .004 100 % of the time.
= .004 is used 0 %

Get your facts straight.

Edit.
It's funny that you can disagree so well. I must be wrong. But I can't convince myself of that here.

I like your attitude. :).

Message Edited by b11ng00 on 12-31-2003 01:37 PM

2 Intern

 • 

2.5K Posts

December 31st, 2003 17:00

I give up, one of us can not seem to read the english language and I know no way of deciding who.

2 Intern

 • 

2.5K Posts

December 31st, 2003 17:00

 Please read the words in bold, Italtic, underline, and very large "about a    0.4 percent performance penalty"

2 Intern

 • 

2.5K Posts

December 31st, 2003 17:00

.4 > .004 = 100 % in any speak what does this mean?

To me If something is forty percet better, cheaper, faster etc I would say Some is 40 percent better,cheaper/faster than something else.  If a clothing store is having a sale the say 40 Percent Off not 0.4 Percent Off

10 Posts

December 31st, 2003 22:00

.4 > .004 = 100%
= 100 / 100 = 1
= .4 is used 100 percent of the time when mentioned. And .004 is not used.

10 Posts

January 1st, 2004 01:00

I spoke to a computer processor manufacturer's cpu specialist by email.

He said after looking at the problem. They cannot offer a registry tweak. Because the responsibility to tweak MS products is not theirs.

So. Since Dell took over that responsibility from MS. Dell has to provide this MS operating system registry tweak.

You can email Dell support and provide this forum thread address or the link. And ask for Dell to please provide a registry tweak.

I already have. They said it will be brought to the higher up's to fix this problem. But you can Ask too.

2 Intern

 • 

2.5K Posts

January 1st, 2004 01:00

You mean you spoke to Intel, please post your e-mail and their reply

10 Posts

January 1st, 2004 02:00

I spoke to AMD.

I deleted the email. Don't be angry about that. I'm free to delete my email.

I also emailed Intel. I got no reply yet.

2 Intern

 • 

2.5K Posts

January 1st, 2004 02:00

I am now more confused, are you speaking tounge-in-cheek or not, in the first paragraph of your reply.  Clearly you are pulling-our-chain in the second paragraph.  Are you saying the improvement is less than one percent or forty percent.  P.S. Why should Microsoft apologize and for what?

Message Edited by msgale on 12-31-2003 10:36 PM

2 Intern

 • 

18.8K Posts

January 1st, 2004 02:00


@msgale wrote:
You mean you spoke to Intel, please post your e-mail and their reply



I'm more interested in the post from Microsoft apologizing for using the phrase "0.4 percent." The leading zero is clear indication that four-tenths of one percent is what was meant, clearly in agreement with the use of signficant figures in scientific terminology.

I can hardly wait for Dell to leap to the fore and offer a registry tweak for all their 286-based systems. Those su ckers are gonna FLY.

10 Posts

January 1st, 2004 02:00

No way.

Changing the cache to use 2 Megs instead of 256 Bytes has a effect. In this perticular instance 40 percent is definitly intended.

Message Edited by b11ng00 on 12-31-2003 10:51 PM

No Events found!

Top