[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian-trivia

On Sun, 2003-01-12 at 20:43, Otto Visser wrote:
> On Sun, 2003-01-12 at 19:51, Adrian 'Dagurashibanipal' von Bidder wrote:

> > If the CPU were the bottleneck, the Athlon should be much faster. I
> > guess it's memory access, which would explain the roughly equal time for
> > a machine with roughly a factor 3 difference in raw CPU speed (yes, I
> > know the MHz don't really compare, but I'd say the difference is big
> > enough here.)
> My memory (768 MB) is running at 133 MHz and it takes less then 3 secs
> on my computer (1.44 MHz Celeron), so you could be true there. But that
> would mean approx. 50 MB transfer? While /var/lib/dpkg/available is less
> then 10 MB?

You'll have to take much more things into account:

In these 3 seconds, *lots* of interrupts happen.
You're on a multitasking system, so there's task switches.
Code must be read from memory. too.
Depending on how the parser works, data might be read and written back
multiple times.
You have a cache hierarchy with an efficiency of probably very close to
99%, so the amount of data going into/coming out from the CPU core is
much higher, but that one doesn't matter so much from a performance
point of view - L1 cache is quite fast.

So, while I'm still quite sure that memory access is the problem, I'm
not sure that you can calculate it that easily. When reading quite a lot
of data, the data will often force the code out of the caches, forcing
extremely many cache misses in code that should really be cached (this
is for L2 cache. L1 cache is separated for code and data iirc.)

Does anybody know: is there an easy way to monitor cache efficiency in
Linux? (x86)

-- vbi

this email is protected by a digital signature: http://fortytwo.ch/gpg

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: