B
Bob Day
I wrote a program to measure the "end to end" latency
for reading a random 32-bit word in RAM. Basically,
it works like this:
1. It creates a circular list of pointers in memory in
which each pointer points at random to another
pointer in the list. The list occupies 256MB of
memory.
2. Then, by iterating through the list, the program
computes the time required to execute the
instruction, "mov edi, [edi]". When I run the
program, the time I'm getting is about 230
nanoseconds, which, on my computer translates
to 23 CPU cycles.
My computer has an MSI 694T Pro mainboard, a
1GHz PIII Celeron CPU, 100MHz FSB, and 512MB
PC133 CL2 ECC RAM set to run at 133MHz.
According to SiSoft Sandra, its performance is right in
line with similar configurations.
I have the RAM set to "turbo" in the BIOS, which I
believe sets the RAM timings to 2-1-1-1, which would
mean that it should take 5 cycles to read in a (32 byte)
cache line. (Each random access as described above
would pull in a cache line.)
Why am I measuring 23 cycles? What part of "RAM
latency" don't I understand??
-- Bob Day
for reading a random 32-bit word in RAM. Basically,
it works like this:
1. It creates a circular list of pointers in memory in
which each pointer points at random to another
pointer in the list. The list occupies 256MB of
memory.
2. Then, by iterating through the list, the program
computes the time required to execute the
instruction, "mov edi, [edi]". When I run the
program, the time I'm getting is about 230
nanoseconds, which, on my computer translates
to 23 CPU cycles.
My computer has an MSI 694T Pro mainboard, a
1GHz PIII Celeron CPU, 100MHz FSB, and 512MB
PC133 CL2 ECC RAM set to run at 133MHz.
According to SiSoft Sandra, its performance is right in
line with similar configurations.
I have the RAM set to "turbo" in the BIOS, which I
believe sets the RAM timings to 2-1-1-1, which would
mean that it should take 5 cycles to read in a (32 byte)
cache line. (Each random access as described above
would pull in a cache line.)
Why am I measuring 23 cycles? What part of "RAM
latency" don't I understand??
-- Bob Day