From: vivek@noel.cs.rice.edu (Vivek Sadananda Pai)
Subject: Re: Cache, performance, and data structures used by simulations
Date: 1 Mar 1995 23:30:01 GMT [thread overview]
Message-ID: <3j301q$lue@larry.rice.edu> (raw)
In-Reply-To: 3j0ljg$in7@agate.berkeley.edu
In article <3j0ljg$in7@agate.berkeley.edu>, peterm@tonks.EECS.Berkeley.EDU (Peter Mardahl) writes:
|>
|> This is really a question.
|>
|> We have been benchmarking a series of codes on different architectures.
|> The two of most interest to us are AlphaStation 200 4/233 and
|> HP 712/80. Both have 256k cache. I do not know the memory bandwidth
|> of the HP, the AlphaStation's is 132MB/s. No swapping took place.
[...]
My theory:
The Alpha uses 8k direct-mapped first level caches to do its
work. I don't know what the HP uses.
In the case of the structure-based code, everything you want
for a given element is pulled in at the same time. In the
case of the array-based code, bad things can happen. For
example, assume that all of your arrays start on page boundaries.
In this case, if you want to access the same element location
from all the arrays, they'll map to the same line of the first
level cache, potentially causing lots and lots of cache
conflicts.
In this case, the larger (and more highly associative)
second-level cache gets used to supply the data. So, it's
probably not an issue of memory bandwidth, but secondary-to-primary
cache bandwidth. It might also involve the main memory bandwidth,
but without a lot more information, I can't be sure (not that
I could, even with a lot more information).
|> What do you all think? Are we right? Do you have a better theory?
|> It's important that we know, because we may switch the array-based
|> code over to structures if we can get a 30-60% speedup out of it.
If your code uses the same element location from many arrays at
the same time (or close to each other), you're probably better off
switching to structures. The exact speedup you'll see depends on
a number of factors including #cache conflicts, memory bandwidth,
reuse, etc.
|> Please Cc: me any followups.
I tried, but something seems to be poorly configured at your
end. I got the following mailer-daemon error:
554 MX list for tonks.eecs.berkeley.edu. points back to langmuir.EECS.Berkeley.EDU
554 <peterm@tonks.eecs.berkeley.edu>... Local configuration error
Hope this helps,
-Vivek
next prev parent reply other threads:[~1995-03-01 23:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-01 2:19 Cache, performance, and data structures used by simulations Peter Mardahl
1995-03-01 23:30 ` Vivek Sadananda Pai [this message]
1995-03-02 23:05 ` Nick Maclaren
1995-03-04 19:01 ` John L. Henning
1995-03-06 20:08 ` Vivek Sadananda Pai
1995-03-13 18:10 ` Paul Repacholi
1995-03-02 18:03 ` John L. Henning
1995-03-03 16:52 ` Greg Lindahl
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox