Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!agate!shelby!portia!dhinds From: dhinds@portia.Stanford.EDU (David Hinds) Newsgroups: comp.unix.i386 Subject: Re: Cache performance on 386 boards running Unix Summary: Cache efficiency doesn't really depend on TOTAL program size Message-ID: <6101@portia.Stanford.EDU> Date: 25 Oct 89 19:04:18 GMT References: <919@umigw.MIAMI.EDU> <416@ssp2.idca.tds.philips.nl> Sender: David Hinds Organization: Stanford University Lines: 23 In article <416@ssp2.idca.tds.philips.nl>, pb@idca.tds.PHILIPS.nl (Peter Brouwer) writes: > This depends on the size/working set of your applications you use. > Most caches are 64k = 16 pages. So if you have large applications with > a working set ( number of pages it used during execution ) the cache is'nt > a great help. > This is not really true. A RAM cache constantly turns over to reflect the current memory usage of whatever is running on a system. It stores recently used instructions and data. It is most effective at speeding up fairly small loops (a few K), or code which accesses the same data repeatedly. Fortunately, this represents the local activity of almost all programs, almost all of the time. I don't have any concrete data, but I've seen quotes for 80386 systems with 64K caches of hit rates of 90-95% for typical real applications. Context switching should not degrade performance much, because the time scale over which the cache works is much, much shorter than a task's time slice. The cache turns over fast enough that it recovers almost immediately from a context switch. RAM caches have been standard equipment on mainframes for decades. In fact, 64K is quite large as caches go; the 80486 chip has a cache of something like 256 bytes, but I wouldn't be surprised if this had hit rates of 80-90%, even with very large programs. -David Hinds dhinds@portia.stanford.edu