Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cache Performance vs. Speed 2

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is there someone in this forum who can knock the best analogy on why Cache matters. One source says that too much Cache is uneccessary, but then others says that 2mb of cache is beneficial and an advantage. Others only care about speed. I take it that Cache is what mainly differs AMD from Intel besides the speed and low voltages correct?
What would be difference between P4 2.2ghz with 2mb of cache vs. a P4 2.2ghz with 512kb? Genious anyone?

cachedude
 
CACHE seriously speeds up your system

cache is SUPER FAST memory. and the more the better but it usually comes at a high cost.

the 2mb cache system will be a lot faster..

an example that is unrelated but may help you understand it better is you internet cache or temporary internet files..

say your on at a whopping 56k. and you have internet cache disabled. you have to download the WHOLE WEB PAGE every time you goto it. what cache does it saves it on the harddrive so when you go back to it again it doesnt have to download it all over again it just pulls it from the HDD the processors cache is not exactly the same but apply this principle and you will see how more cache means faster pc...

 
Let me finish the above analogy, your 56k will refresh alot faster using the temp internet files cache on your PC (small cache), however if you used your ISP's webcache directly over a cablemodem the page would be there instantly (lots of cache). ***************************************
Party on, dudes!
 
Not sure where you saw a P4 with 2MB of cache. It used to have 32kb of L1 Cache and 256kb of L2 cache. I realize the new Northwood P4's have 512kb of L2 cache, but I haven't seen one with 2MB.

Anyway, generally speaking "the more the better". However, Intel and AMD could have bumped up the cache to dozens of MB years ago, if they seriously thought it would help.


Let me explain...

L1 and L2 cache store instructions from the CPU that can be executed much more quickly than from system RAM. These "instructions" are actually educated guesses by the CPU on what instructions are going to be needed next. It's not always accurate, but most of the time it improves the overall speed of an application.

Now, many engineers have experimented with CPU's that had large amounts of cache. Almost every result has proven that amounts over 512Kb have "diminishing returns", meaning each additional amount over 512 hardly improves performance, if at all. This is especially true with modern day applications (Microsoft Office, Adobe Products, etc.).

However, I do expect to eventually see CPU's that have MB of cache on them in the "not too distant" future. Why do you ask? The reason is simple. I suspect that 64-bit CPU's will have a much more advanced logic core that can make better predictions. Better predictions leads to the need for more space. The need for more space leads to more cache. Applications can then be designed/improved to use a larger cache. You get the idea...
 
Here's what I'm getting at,

Let's say in a multimedia performing software such as Fruityloops (a music production software), they recommended dual processing since there is a CPU meter gauge which tells you how much your computer can handle (4%, 7%, 13%, 39%, etc..). So, and through personal experience over the years testing each new version of Fruityloops, I've noticed that the speed doesn't really matter since a P4 and PII don't much differ. So my point is perhaps Cache? I want to build a dual Xeon PII 2mb CPUs for this music workstation. I want my music to be flawless. Am I exaggerating?
 
From what you posted, if your CPU isn't doing 100% and struggling, then I'd say bump you RAM to 512M at least and keep your current processor. ***************************************
Party on, dudes!
 
What's the stupid difference between a

Dual PII 512kb Machine vs. Dual PII 512kb Xeon Machine.

Both same cache range.

???
 
I see your point! If a P4 doesn't perform much better than a PII in benchmarks under a specific application, going with more cache might make a difference. The hit-rate has a chance at being higher, though the latency might also be higher which might actually hurt you.

For the low-down on how cache works and terminology, go here:


[thumbsup2]
~cdogg
 
What's better memory (this being tek-tips and all);
DDR or RAMBUS?

There's this PC3200 DDR Stick I want to get, but some say stick to RAMBUS. How do you figure?
 
Ok, I am not up on this cache very much. Is there a way to set
this internet cache size (other than virtual memory on XP)? If so, how?

I have 512MB of SDRAM(?) on 1.6GB P4 and the system just got slower! I did have 256MB of RAM.

And, RE the webcache, what can I tell my ISP to get a larger size cache? My LAN is still having problems. Could this cache on the ISP be filled with obsolete files from all of the crashing (like on Windows)?

Your help will be greatly appreciated.
 
Let's just understand what a cache is;

It's a place where stuff is set aside for later use. In archaelogical terms, this can refer to hordes of treasure. Its meaning in computing terms is not really so different, since caches are not necessarily quicker than the original source. For example, the biggest cache you have on your computer is the page/swap file.

Pentium pros had up to 2Mb of cache, like Xeons. This cache memory is what makes the processors so expensive, since it's much faster than conventional RAM, but not as fast as the processor. It's a handy place for the processor to stick data that it's not using until it does need it, because it can get at it MORE quickly than other storage areas.

Xeon processors have different architectures, that suits them well to intensive operations, such as application servers. Single user audio work will not benefit as much from using this architecture as it would from using two processors under an operating system that supports SMP, and large (at least 512MB) RAM. The cost/performance ratio does not justify buying a Xeon with 512k cache over a PIII/IV with the same amount.

For "Flawless" audio work, consider a professional sound card setup. Depending on your budget, you should investigate (at the low end) Turtle Beach, (in the middle - high range) Event, and at the top, Digidesign. If you are thinking about 2 x Xeons with 2Mb cache each, maybe you've got the budget for Pro Tools. These require next to no processor time, and are recording industry standard (but beyond the reach of most mortals!)

The internet cache on most computers is set within Internet Explorer. You can safely delete all of the files contained in the Temporary Internet Files folder - it's just a storage area, as I described above. Also check your c:\windows folder for files called *.tmp (where * is a wildcard), and any folders called temp or files that begin with a tilde (~). All of this can be deleted, and will help speed up your computer. Check also my FAQ on Virtual Memory.

Caches are very useful, but a trade-off. If a cache becomes too full, you can't put anything else into it, which will have the reverse effect, ie the system will slow down. Memory caches clear themselves when you reboot - which is why rebooting can clear many issues. Physical caches of files, however, must eventually be cleared out manually, if the operating system is not sufficiently configured to do the job itself (ie Windows ;-)).

I hope this is helpful to all CitrixEngineer@yahoo.co.uk
 
Thanks for your help. Is there a way to make a script to go in and clear out the areas where the ~.* and *.tmp files are? If so, where can i get it and how do I set it up? I used a batch file before and my brother told me it probably wasn't working the way it should (like in DOS).

I am using a VB script I got from this forum to clear out memory buffers(?) when things slow down. I have to manually double click it. Is there a way to run this, say every ten minutes without doing it manually?

I, and probably 19,000,000 others would appreciate this help if it can be done.
 
Thanks for your help. Is there a way to make a script to go in and clear out the areas where the ~.* and *.tmp files are? If so, where can i get it and how do I set it up? I used a batch file before and my brother told me it probably wasn't working the way it should (like in DOS).

I am using a VB script I got from this forum to clear out memory buffers(?) when things slow down. I have to manually double click it. Is there a way to run this, say every ten minutes without doing it manually?

I, and probably 19,000,000 others would appreciate this help if it can be done.

Points for you too.
 
It could be done fairly simply with a DOS *.bat (or an NT *.cmd) file for the most common locations using a del command; ie

del c:\temp\*.*
del c:\windows\*.tmp
del c:\windows\~*.*
del c:\windows\temp\*.*
del c:\windows\temporary internet files\*.* - or c:\windows\tempor~1\*.*

This last one may not work completely, since many cookies and internet files have peculiar attributes.

I don't know the exact commands, but maybe you could include lines which search all dirs for *.tmp files, and I think there's a deltree equivalent which would allow you to clear subdirectories (you will find these in the two Temp dirs named above).

You could use the scheduler to have it run periodically, but I can't see the value of running it every 10 minutes - that would slow down general operations, and would encounter errors when trying to delete files that are in use. Windows uses temporary files as part of its caching mechanisms, so removing them as you are using the computer would not help much.

Better to simply have it run at startup. If you try to run it at shutdown, you are more likely to encounter the file in use issue.

I Hope this is helpful CitrixEngineer@yahoo.co.uk
 
Thanks for your help. I guess there is no VB script to do the same thing. I will make a batch (.bat) file to do this like I used to do.

And, are you saying I shouldn't use the "memory.vbe" script as often? I got it from a forum here under the search "DMA" which covers doing things to speed up the booting process. I used it on my 300Mhz PII. Those tricks seemed to help a lot.
I made backup copies of all of the files which were to be changed BEFORE I used any of the changes just in case it didn't work.
 
How intelligent is the CPU handling of the cache?

I belive it is simply a buffer storing blocks of (ASM) instructions from the programs (like a streaming buffer).

Since most of the program instructions actually go in a row, the CPU simply reads its cache and carry out, but if there's a 'jump' instruction it might have to load another block of instructions.

If there's a bad programmer, he maybe uses a lot of 'calls' and 'goto's', so the CPU cache won't be so effective ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top