APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > News Posts > cpu cache explained ––>Re: 5.0.5 MP system running slowly with 1Gb RAM
Printer Friendly Version




News Group Posts

cpu cache explained


You might also be interested in Caches.

For detailed specifics on CPU caching and SMP design, see Curt Schimmel's Unix Systems for Modern Architecture.



Newsgroups: comp.unix.sco.misc
From: Bela Lubkin <filbo@deepthought.armory.com>
Subject: Re: 5.0.5 MP system running slowly with 1Gb RAM
Cc: Graham Nicholls <graham@rockcons.co.uk>
Date: Fri, 10 Dec 1999 23:28:57 GMT
Message-ID: <199912101528.aa13320@deepthought.armory.com> 
References: <384EACCE.5C69F28E@rockcons.co.uk>
<2RO34.93408$7I4.2356249@news5.giganews.com>
<384FCC47.5DA50F39@aplawrence.com>
<384FF323.4383@uq.net.au>
<38504BF5.B17ABAB2@rockcons.co.uk> <3850DB25.E3DAD90B@aplawrence.com> <385131EA.AC3EE945@rockcons.co.uk> Graham Nicholls wrote: > If it is a cache issue, then why have some respondants reported very > good performance with MP systems with 1Gb RAM and only 256k > cache chips ?



There is no linear relationship between size of cache and amount of RAM
it can cache.  This is a common misconception.

Cache designs vary greatly.  One of the design parameters is the width
of tag RAM entries.  Tag RAM entries identify, for each location in the
cache, which location in main memory is represented.

One common tag RAM width is 8 bits.  An 8-bit tag can specify one of 256
locations.  An 8-bit tag combined with a 512K direct-mapped cache could
cache 256 * 512K == 128MB of RAM.  However, most caches today are not
direct; 2-way and 4-way associative caches are more common.  An N-way
associative cache is like N direct-mapped caches of (total size/N).  So
a 512K 4-way associative cache with 8-bit tags could cache 256 * (512K /
4) == 32MB of RAM.  Such a design is improbable; it would almost
certainly be designed with wider tags.  4-way 512K with 12-bit tags
would be able to cache 2^12 * 512K / 4 == 512MB.

You didn't have a performance problem at 512MB, and you do at 1GB.  So
your cache parameters are some combination which tops out at 512MB.  We
know one parameter (512K), and we can guess the associativity (1
(direct), 2- or 4-way).  The possible combinations are:

  associativity      tag length    cache size    memory coverage
  =============      ==========    ==========    ===============
  direct-mapped          10           512K           512MB
  2-way associative      11           512K           512MB
  4-way associative      12           512K           512MB

You might be able to fix this.  Go into BIOS setup, look for "advanced
chipset setup" or whatever it offers.  See if it has a "way-ness" knob.
If so, reduce it from 4-way to 2-way, or 2-way to direct.  With the same
tag length, this should double the amount of memory covered.



The Pentium III's L2 cache is inside the CPU.  I'm not really sure
whether you get to control any of this; and if you do, I'm not sure your
BIOS setup will give you access to it.  But it's worth a try.

I tried to find documentation on cachability ranges for Intel CPUs, but
gave up after a while.  It doesn't seem to be very public information.

>Bela<


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?




More Articles by Tony Lawrence - Find me on Google+



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide




 I sell and support
 Kerio Mail server
pavatar.jpg

This post tagged:

       - Bela
       - CPU
       - Hardware
       - Kernel
       - Performance




Unix/Linux Consultants

Skills Tests

Guest Post Here