Relationship between RAM & processor speed

1

1

RAM is just used for temporary storage. But since this storage is in the cpu memory (RAM) it is fast. Programs can easily read/write values into it. I've noticed more the RAM less time it takes for the application to load/execute. But doesn't this actually depend of the processor speed (MHz or GHz values). I am wondering what is the science/relationship between processor speed and RAM.

deostroll

Posted 2009-09-03T06:56:47.707

Reputation: 1 515

6I think I went bug-eyed reading your question. – caliban – 2009-09-03T06:59:29.370

@deostroll, you could look at the processor and nehalem tags on this site to start with basic references. – nik – 2009-09-03T07:07:45.627

I agree with scoopdreams: this question is hard to read. And there is no exclamation mark at the end. So, is it a real question? – Burkhard – 2009-09-03T08:29:51.153

What, it seems you are trying to speak scientist but forgeting you grammar and Spalling? – The Green Frog – 2009-09-03T08:38:44.303

Is this homework? – Xetius – 2009-09-03T09:53:18.320

Answers

11

I believe you are referring to IO operations for processing purposes, and I'll attempt to give a simplified layman answer.

Assume the processor is a meat-grinder in a factory, and assume RAM, hard disk are like the conveyor belt system feeding unprocessed meat to the grinder to be ground.

Assume the conveyor belt has two parts -> the slow-but-wide part, and the fast-but-narrow part. The former alludes to the hard disk big storage but slow speed, and the latter is referring to memory's small storage but high speed characteristics.

So...

HARD DISK CONVEYOR (WIDE BUT SLOW) -> RAM CONVEYOR (NARROW BUT FAST) -> GRINDER (PROCESSOR)

When your increase your RAM, it is like widening the RAM conveyor, thus the grinder can potentially receive much more at one go for processing.

If your RAM is low, it means that while the RAM conveyor is fast, it is extremely narrow, thus the volume of meat pouring into the grinder is little. At the same time, meat might potentially choke at the hard disk conveyor points (in short meat that is supposed to be on the RAM conveyor in a well-optimized system is actually still on the hard disk conveyor - a.k.a paging/swap file).

To sum an answer all up in a hopefully easy to understand sentence :

The relationship between RAM and processor and why programs run faster is simply because with more RAM, more data to be processed can get to the processor faster.

If the size of the system memory is equivalent to how wide the RAM conveyor is, then the Frontside Bus (FSB) is equivalent to how fast the RAM conveyor goes.

Whew! Hope this answers your question!

caliban

Posted 2009-09-03T06:56:47.707

Reputation: 18 979

so the ram wouldn't hold processor instructions? – deostroll – 2009-09-03T07:20:23.167

@deostroll, if you look at it in this context, instructions are also data for the processor --- hope that does not confuse you. – nik – 2009-09-03T07:29:21.590

do the cpu registers that hold the address of a memory location actually point to some place physically inside the ram? – deostroll – 2009-09-03T07:53:48.903

No, the registers are inside the CPU so get bound by the internal bus speed of the cpu itself, and not the external bus speed of the RAM. Old school programming in machine code often optimised to keep variables in registers and not RAM to speed it up. – Xetius – 2009-09-03T09:52:07.213

1This analogy could work... but the details are wrong. The hard disk is a conveyor coming from a huge warehouse... but the conveyor itself is not wider/larger. – Ben Voigt – 2012-07-09T19:17:58.517

3

I believe that the scientific equation is really a function of the program's behavior. It's best understood if we over-simplify a bit :

  • If the program is disk-intensive, speed is proportional to the disk.
  • If the program is oriented towards calculations : speed is (mostly) proportional to the CPU, since the memory cache nowadays is pretty intelligent and fast.
  • Else speed is (mostly) proportional to memory.

Summary: For every intensively active program, there is a bottle-neck. Even with professional tools, it's not always easy to analyze which component is to blame. After discussing with the administrator for a very large database, it seems like the idea is to improve one machine bottleneck after another, because with each improvement the behavior may change. This isn't exact science, because the hardware is too complex : see Intel's 8-core CPUs will have 2.3 billion transistors.

harrymc

Posted 2009-09-03T06:56:47.707

Reputation: 306 093