More On Chip CPU Cache is better?

xaphunda

Junior Member
Apr 12, 2002
2
0
0
Which programs and or applications benefit the most from having extra on chip cpu cache like having 1 or 2 mb cache xeon's vs the 256k cache xeons? Or 1mb pentium pro's vs 256k pentium pro's.
Any ideas / thoughts would be nice!

Thanks,

-=X
 

FishTankX

Platinum Member
Oct 6, 2001
2,738
0
0
Games benefit. Database's benefit. Photoshop sure as heck benefits.

The type of application that benefits from more onchip L2 cache is the type of program that likes to do large operations on a set of data1 or 2 MB in size. Thus, with sufficent cache, you can cache the data onchip and eleminate memory access for reading the file, as the whole file has been loaded into the chip. This allows work on the file to proceed much faster than if it had to have drawn 3/4ths of the file from main memory. Lemme just give you an example of the massive speed disparity between onboard cache and main memory.

P4 2.2GHZ
Internal L2 bandwidth SSE2 enabled:70GB/s
Internal L2 bandwidth non SSE2 enabled:35GB/s
Main memory:3.2GB/s

In programs where you're working with reasonably sized files (i.e. a 1 or 2 MB bitmap) having enough cache memory to bring the whole entire thing into cache would give you *tremondous* boosts in speed! Like as in the 20% range. Same thing for database's. If one entry in a database needs to have some things changed, if you can fit the whole thing into L2 cache you're going to work on it significantly faster than if not.

Things that *don't* benefit much from L2 cache are streaming applications where in you are depending mostly on RAM for your data access. or programs that have such small datasets that you don't need more than 256KB total cache to cache the objects your working on. But just imagine this situation.

You have a database. You have one entry where every person who's owed a certian amount of money needs to have their intrest recalculated. If 1 set of data is 1.5MB, a 2MB Xeon is gonna do a hell of alot better than a 512K Xeon because it doesn't have to go rummaging back to main memory every time it needs to make a modification to the file. Just make your modifications in L2, ship it back to main memory, get the next set of data, perform the same operation, ship it back, etc etc etc..

*OR* the best example! Photoshop! Imagine (again) your working with a 1.5MB file, this time you're doing a guassian blur filter. If you only had 256K of cache you would have to go back to main memory constantly to get the information about a certian part of the picture for interpolation etc.. and it would just waste alot of time. Now, assume you have a 2MB cache running at full core speed. Do a logic operation, check interpolation points, do another logic operation, create interpolation points, etc.. until the whole image is finished. Ship it back to main memory. Your done! No memory access! Again, I show you the figures.

P4 2.2GHZ
Internal L2 bandwidth SSE2 enabled:70GB/s
Internal L2 bandwidth non SSE2 enabled:35GB/s
Main memory:3.2GB/s

Now, the P4's prefetch instructions drastically reduce the benefit of tremondous caches in comparison to P3's. But large L2 caches are still very useful in the above mentioned applications.
 

FishTankX

Platinum Member
Oct 6, 2001
2,738
0
0
Another factor in speed difference is latency

P4 2.2GHZ L1 Cache access (CPU cycles needed):6 or 7
P4 2.2GHZ L2 Cache access (CPU cycles needed):25 or so
P4 2.2GHZ Main memory access (CPU cycles needed): :Q ~250 cycles!
P4 2.2GHZ Harddrive access (CPU cycles needed): :Q:Q 1,300,000 or so cycles!! :Q:Q

This really adds up!
 

Accord99

Platinum Member
Jul 2, 2001
2,259
172
106


<< Another factor in speed difference is latency

P4 2.2GHZ L1 Cache access (CPU cycles needed):6 or 7
>>


P4's L1 data cache has 2 cycle latency


<< P4 2.2GHZ L2 Cache access (CPU cycles needed):25 or so >>


P4's L2 cache has 7 cycle latency

 

BreakApart

Golden Member
Nov 15, 2000
1,313
0
0


<< Which programs and or applications benefit the most from having extra on chip cpu cache like having 1 or 2 mb cache xeon's vs the 256k cache xeons? Or 1mb pentium pro's vs 256k pentium pro's.
Any ideas / thoughts would be nice!

Thanks,

-=X
>>



Pretty much ALL programs run better with more L1-L2 cache.
What makes a bigger difference is whether the cache is running at full cpu speed or if it's running slower-(1/2 speed, 1/3 speed, etc)
 

Crank

Senior member
Feb 7, 2001
428
0
76
I've been wondering about this....I recently built a P41.8GHZ system, and I bought my CPU about two weeks before the Northwoods were announced :(
I can return mine and upgrade to a 1.8Northwood for very little money, but it will take a lot of hassle - I can't decide if it's worth it or not.
I mostly use my computer for gaming, so .... ... what do you think, will the double L2 cash be worth a bit of a headache?

Thanks,

 

xaphunda

Junior Member
Apr 12, 2002
2
0
0
Thanks for the info, quite educational. I now wonder if distributed.net's rc5 or OGR project has a large program sized that dont normaly fit into a 256k cache!

You see, just got some Pentium Pro 1mb cpu's for my dual Intel board, its old school but the chips were cheap, and im a collector, i was thinking about running a database server on it and see what kind of performance i could squeeze out of it w/ the better chips.

Man these 1mb cpu's get MUCH hotter that the 256k chips, prolly all that extra die size is doing it.
 

FishTankX

Platinum Member
Oct 6, 2001
2,738
0
0
:Q The 1MB pentium pro's L2 cache was almost the size of an Athlon!!! :Q It was manufactured on a .35 micron process and was on a seperate die than the CPU but on the same package. That's why it gets so frikkin hot. a 1MB L2 cache Pentium pro 200 in a dual configuration will have roughly the database crunching power as a PIII500 Xeon 512K or so.. i'm thinking. Or a 450. That's why they were absurdly expensive! If the cache was dead, or the CPU were dead, both had to be thrown out. :eek: so that expensive cache was wasted if the CPU was bad. The CPU was wasted if the expensive cache was bad. That's why it was a nightmare to produce.

 

FishTankX

Platinum Member
Oct 6, 2001
2,738
0
0


<< I've been wondering about this....I recently built a P41.8GHZ system, and I bought my CPU about two weeks before the Northwoods were announced :(
I can return mine and upgrade to a 1.8Northwood for very little money, but it will take a lot of hassle - I can't decide if it's worth it or not.
I mostly use my computer for gaming, so .... ... what do you think, will the double L2 cash be worth a bit of a headache?

Thanks,
>>



Northwood's aren't twice as expensive. :) :D :p