Results 1 to 3 of 3

Thread: Memory latency and timing?

  1. #1

    Thread Starter
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    Memory latency and timing?

    So I am putting together a new PC and while shopping for memory I am at an impass. Memory is speced with stuff like Cas Latency and Timing (8-8-8-24?).

    What in the world does this even mean? Do you want higher numbers or lower numbers?
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Memory latency and timing?

    You want lower numbers. The first three numbers are the row and column access latencies. They are measured in clock cycles. The last number is an overall frame of activity. It's the minimum charge time. The typical (safe/standard) setting would be the sum of the first three numbers but sometimes better performance can be gained by making it slightly lower. Too low and your RAM simply won't work because it won't be able to read or write. Too high and you are putting in an unnecessary delay.

    The simple technical explanation:
    Your computer has a clock. That clock is measured in hertz (hz). One hz = 1 times a second. Thus, the clock of an 800mhz memory bus cycles at 800,000,000 cycles per second. That's spiffy fast.

    Memory is set up like a giant grid. Each cell in that grid holds either a 1 or 0; a bit. In order for a computer to store or read a bit, it needs to give power to both the row and the column that bit is sitting on.

    Here's where timings come in, the third number is the RAS (tRP) , that's the amount of time the computer takes to charge the row (the first thing it does). The second number is the RAS to CAS delay (tRCD). Think of it as the time it takes to switch from a row to a column. The first number is the CAS (tCL). The amount of time a computer takes to charge a column (the last thing it does).

    These three numbers are measured in clock cycles. So, to read a single bit of memory, the computer with 8-8-8-24 RAM will take 8 + 8 + 8 = 24 cycles out of those 800,000,000 to do so. May not seem like a lot, but to read a megabyte (8 bits in a byte * 1,024,000 bytes), it takes 196,608,000 cycles by the numbers. That's almost 1/4 of a second... at least, by the numbers.

    This would be the case if our megabyte was scattered all over the place in our RAM, which it rarely is. Most data is stored sequentially.

    Those rows of RAM are also called banks, and when a computer charges a bank (the last of those 8's), it doesn't have to un-charge it until it's done with it as long as all the data falls in that bank. So, if you have a megabyte with it's bits all in a row, you only need to call that last 8 once. Likewise, since you're not changing rows, that second 8 is only called once. The CAS though is still in full force, and thus, why it's by far the most important number. This is also why the CAS is listed first.

    Thus, if you had a megabyte of data in a single bank, it would only take: 8+8+(8*1,024,000*8) = 65,536,016 cycles. Divide that by our speed of 800mhz, and you get 81 milliseconds. Not bad. A CAS of 9 would take 92 milliseconds to load a megabyte. A CAS of 7 would only take 71.

    What if your bus speed was faster? What if instead of 800mhz, you were running a 1066mhz bus? Just divide by the larger number and they come out: CAS 8 = 61ms, CAS 9 = 69ms, CAS 7 = 53ms. Thus, bus speed makes a much larger difference than the timings. If you have to down-clock your RAM to get better timings, it's not worth it. Even the slowest 1066mhz bus speed CAS time is better than fastest 800mhz CAS time!

    Computers have other tricks as well such as bank interleaving, DDR, etc to speed them up, but the theory of how the numbers work is sound. The lower the timings numbers and higher the bus speed, the faster the machine overall.
    Last edited by Jenner; Jul 24th, 2009 at 08:27 AM.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  3. #3

    Thread Starter
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913

    Re: Memory latency and timing?

    Thanks a bunch. That all makes sense now.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width