Understanding data access speed

Posted by Sir Four at 12:08pm Dec 8 '14
You must sign in to send Sir Four a message

The speed of your CPU is rarely the cause of computer slowness. Speed is mostly influenced by data access. I'll explain why that is!

When you're playing a game, typing a paper, or whatever, your CPU is performing lots of little operations on bits of data. The closer that data is to the CPU, the faster it can access it. CPUs themselves have small areas of data cache which they can access very fast—call them L1 cache and L2 cache. If the data isn't there, the next fastest place to get it is in your memory (RAM). Nowadays computers typically store at least several gigabytes of data in their RAM at a time. The data isn't in RAM? Gotta get it from your hard drive, the slowest component of your computer. Maybe you have an SSD instead of a mechanical hard drive, though, which will give you a speed boost.

An analogy for the various data access speeds

You're a receptionist in an office typing an email, and you need the recipient's name. The name is on a piece of paper lying on your desk, so you glance down to see it before you can continue typing—this is the speed of L1 cache.

Actually, the name is on a paper lying at the side of your desk, so you reach for it, read it, and resume typing—this is the speed of L2 cache.

Actually, the name is on a paper sitting over by the shared office printer, so you get up, walk over, grab it, walk back, and continue typing—this is the speed of RAM.

No, actually you don't have the name in the office at all. You have to drive three hours to the person's house to ask them their name, then drive three hours back to continue typing the email—this is the speed of an SSD.

No no, actually the only place that has the name is a remote temple that requires an eight day hike to get to, and an eight day hike to get back from, before you can complete your task of typing this email—this is the speed of a mechanical hard drive.


So if the L1 cache equals glancing down at a piece of paper, a mechanical drive is a 16 day round trip hike. But you could make it a mere 6 hour car ride by using an SSD instead. Data access is S L O W!

Now lets say the receptionist sends someone out to retrieve the name instead of personally doing it. The receptionist/CPU is now sitting there doing absolutely nothing useful until the name comes in. This is your CPU being "idle". It's performing no useful work much of the time. Luckily CPUs can multitask, so our receptionist can do some other stuff in the meantime while waiting for that name. Of course those other tasks may have such delays as well.


There are 2 private posts in this thread. You need to sign in to read them.

Below are the public posts you may view:

You currently have read-only access to this board. You must request an account to join the conversation.

Why Join 4thKingdom?

Note that there are no ads here. Just intelligent and friendly conversation. We keep the spam out, the trolls out, the advertisers out… 4K is just a low-key, old-fashioned site with members from around the world.
This community began in 1998, and we continue to accept new members today.

Hot Discussion Topics: