Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2006 09:48:21 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        Bill Moran <wmoran@collaborativefusion.com>
Cc:        freebsd-questions@freebsd.org, Derek Ragona <derek@computinginnovations.com>
Subject:   Re: Purchasing the correct hardware: dual-core intel?  Big cache?
Message-ID:  <444E28A5.3010902@mac.com>
In-Reply-To: <20060425092526.6fe5efa6.wmoran@collaborativefusion.com>
References:  <20060424154617.9dc28c94.wmoran@potentialtech.com> <6.0.0.22.2.20060424175443.02927f48@mail.computinginnovations.com> <20060425084752.2453c0f1.wmoran@collaborativefusion.com> <6.0.0.22.2.20060425075227.028aea10@mail.computinginnovations.com> <20060425092526.6fe5efa6.wmoran@collaborativefusion.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bill Moran wrote:
[ ... ]
>> If you use well optimized applications, you see the larger performance 
>> gain.  Poor optimization causes a CPU to chug along, flushing the CPU cache 
>> often, and slowing things down considerably.
> 
> I know.  That's why I'm so desperately trying to find a way to determine
> how often the cache is being invalidated - so I can determine whether
> larger cache sizes (such as 8M) are worthwhile.

Guys, you're confusing two things:
"flushing the pipeline" vs. "L2 cache hit ratio".

The former happens when branch prediction/speculative execution goes awry and 
requires the CPU to clear the pipeline of partially-executed instructions and 
backtrack to follow the other path.  It is related to optimization quality of 
compilers, but is not related at all to how big your L2 cache is.

The size of your L2 cache affects how much data is more local to the CPU than 
main memory, and increasing it will improve the L2 cache hit ratio, or, 
equivalently, reduce L2 cache misses.  This is affected by some specific 
compiler optimizations (cf "loop unrolling"), but tends to reflect the specifics 
of the workload and how much multitasking of different programs you do more than 
the compiler.

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?444E28A5.3010902>