Search This Site
Custom Search
Build Your Own Computer
HOME
What's New

Computer Help

Guides and more

Site Pages

Computer Cache


What is Cache?

What is computer cache? It is a temporary storage area where frequently used data can be quickly accessed. How to clear cache, clearing cache, clear browser cache, what is cache are discussed.

What is cache? In computer terms, it is a data collection that holds duplicate values of the original that is stored elsewhere or values that were computed earlier.

Processor cache is a temporary data storage area where frequently accessed data can be quickly accessible.

Once data is stored, it can be accessed in the future much quicker than other memory types such as RAM or hard drives.

This greatly speeds up CPU operations as it has less data to recalculate and does not have to go as far to get the data.

Computer Cache

Let's look at an example to illustrate this point:

We'll use a CD player, like you would have on your home sound system. Your CD player is there to play your music CD's. You put your CD in the tray, close the tray, and hit play.

When you want to hear a different CD, you remove the CD from the tray, go to your CD storage, which just so happens to be in a different room, get the CD, walk back, put it in the tray, and hit play. This isn't working to well, it's pretty slow. The job gets done, but takes too much time.

This is an example of a CD player without "cache". It takes you time to change the CD. So how do we improve the performance of our CD player (i.e. our computer cache), so that it plays a different CD much quicker? We'll give it some memory.

You get tired of having to change the CD every time you want to hear a different one. So you go out and buy a CD player with a CD changer. This CD changer can hold 100 CD's.

So now, you load in your favorite 100 CD's, and whenever you want to hear one, you simply hit the number of the slot that your CD is in, and hit play. To hear a different one, you simply select the new slot, and hit play. You will still need to change to a different CD occasionally, as you can't fit your 1000 CD library into the changer. This is an example of a CD player with cache.

So what happens if you want to hear a CD that is not in the changer? In this case, it will be a little less efficient, because first you have to check the changer to see if you already have the disc loaded. If you don't, then you go to storage to get it.

One of the challenges of computer memory design is to minimize the impact of searches. Modern hardware has basically done this and reduced the time to nearly zero.


 

What is Cache?

We can take a few things from this example:

  • Computer cache is the use of faster, but smaller memory. Our CD changer only holds 100 CD's, but it changes a CD much faster.
  • When you use the on-board memory, you have to first check to see if the data you want is present. If the data is found, this is called a computer cache hit. If not, it is a computer cache miss, and the computer then continues on to the system memory.
  • Processor memory has a maximum storage area that is not modifiable. We can fit 100 CD's in the changer, but we cannot increase the size of the changer without replacing the CD player.
  • It is possible to have multiple layers of computer cache. You will often hear about L1 and L2 cache, with L3 cache becoming popular. In our example, you could have a small shelf right next to the CD changer that holds another 50 CD's, so you can just reach over and grab one without having to walk to storage.

 

Processor Cache

Processor Cache

Processors measure time in very tiny increments. When the CPU needs to access the RAM, it takes about 60 nanoseconds, or 60 billionths of a second. Since CPU's can have a cycle time as low as 2 nanoseconds, that is quite a bit of time.

So engineers did two things. First, they build a special area of memory directly on the motherboard that is very small, but very fast. This is the L2 cache.

A trip to this memory takes the processor around 30 nanoseconds, half the time of regular RAM. Then, they decided that wasn't fast enough and built another layer of memory directly on the CPU itself.

This became the L1 cache, which is accessed at the same speed as the cycle time of the processor, around 2 nanoseconds.

Today, some processors are built with 2 levels of memory directly on the chip, with the L3 cache being on the motherboard. So, you can see how these can be strung together.

L1 supplies the L2 memory, which in turn supplies the L3 memory. The L3 memory talks with the system memory, the RAM, which talks to your hard drive and other storage devices. Your hard drive can then be used as a cache for an even slower medium, the internet. When it comes to data retrieval, your internet connection is the slowest link in your computer system.

(Most often, the terms clearing cache and how to clear cache refers to the internet cache.) This is where internet cache comes in - and this is why it is important to clear browser cache of your internet cache (to improve the capacity) regularly


 

So, we can see that the more computer cache you have on a CPU, the faster it is going to operate. Because of the benefit of speed, many peripherals use computer cache.

Hard drives, printers, and graphics cards all use on-board memory to speed up their operations. As CPU's increase in speed, the demand for faster memory increases as well. We have seen over time the amount of cache increase to help the rest of the system keep up.

Current CPU's can have 1MB of L1 memory, 2MB of L2 memory, and another 2MB of L3 memory. As we continue to see processor speeds go higher and higher, the amounts of cache will increase as well to keep up.

 

Return from Computer Cache to Computer Memory

Return To Build Your Own Computer Homepage from Computer Cache


FREE NEWSLETTER
The Builders Corner will help to keep you informed of new computer technologies.
Email

Name

More Information


I will never ever give out your email address.


Thanks for
Clear Guide

"Putting the parts together was relatively straightforward. The only snag we hit (my son & I) was getting the CPU fan aligned properly. We had 3 pins in, then noticed when we turned the board over that one wasn't through.

After struggling (carefully!) for 10 minutes, we loosened the other pins, aligned all the pins and we were away again.

The hardest part, I thought, was the wiring. And here your guide really shined.

Most of the other guides ignore it, or just say 'connect all the wires properly'. So thanks for the details (because the devil really is in those wiring details)."

Don, the Netherlands




 



 

Copyright© 2008-2014. Voice Marketing Inc. All Rights Reserved. Read our Privacy Policy.