Csound Csound-dev Csound-tekno Search About

Re: cacheing

Date1997-11-19 13:59
Fromjames@maths.ex.ac.uk
SubjectRe: cacheing
Subject: Re: cacheing
Reply-To: MohrJ@Augustana.AB.CA
Priority: normal
In-Reply-To: <24437.199711181027@zeno.maths.exeter.ac.uk>
X-Mailer: Pegasus Mail for Windows (v2.53/R1)
Message-Id: <514F5960A7@corelli.augustana.ab.ca>

Les Rackl wrote, in reply to Javier Ruiz:

> >P.S. I have just bought a 8600/200, should I buy more cache memory for   
> >real time performance? (I have already enough DRAM)
> 
> 
> >Javier Ruiz
> 
> 
> If you are loading data into the CPU from RAM in 64K chunks (say), then   
> 64K of cache
> can add tremendous performance increases, because it "pre-fetches" the   
> data chunk and
> can then load into the CPU very, very quickly (something like 1 CPU   
> cycle).
> 
> If you're not loading 64K chunks, though, you'll be generating cache   
> misses which will actually
> degrade performance, relative to having no cache.

It is theoretically possible (but highly unlikely) that a memory 
usage pattern could cause poorer performance using a cache than not 
using a cache due to generating a large number of cache misses.

However, research has shown that even rather small cache sizes will 
yield a hit ratio above 0.75 (see references in Stallings, "Computer 
Organization and Architecture", 4e, p. 154), so it is usually worth 
the money to add an L2 cache.  (It may not be worth the money to 
_increase_ the size of an existing L2 cache, since you do not get 
linear improvement in hit ratio with increasing cache size.  For 
example, if you have a 64K L2 cache already, it may be worth it to 
increase that to 128K but may not worth it to go to to 256K.  It is 
unlikely that anything beyond 512K will be of much use, according to 
test results.)

> This is my understanding of it, though i confess to not understanding the   
> differences between
> Level 1 and Level 2 cache.  Could someone straighten this out for me?

The L1 cache is the cache memory which is placed on the same chip as 
the CPU by the chip manufacturer.  For example, the 80386 has no 
on-chip cache, the 80486 has a single 8 KB cache, and the Pentium has 
two on-chip caches -- one for data and one for instructions -- each 
of size 8 KB.   Since the CPU does not need to access the on-chip 
cache via an external bus, and due to the extremely short data paths 
on the chip, on-chip cache access is extremely fast.

An L2 cache is a bank of high performance memory which can 
optionally be installed on most system boards which the CPU can 
access via an external bus.  Cache memory is more expensive per bit 
than "regular" memory, not only because it is faster but also because 
it has to provide a special form of addressing so that caching will 
work (typically, a form of what is called "associative" memory).

Because it is off-chip, the size of the L2 cache is user-configurable 
(or OEM-configurable), so any debates about which cache sizes are 
appropriate, either based on speed or cost factors, are referring to 
the L2 cache.  (On the other hand, comparisons of various 
microprocessors may include discussion of the relative sizes of their 
L1 cache memories.)

> les

Regards,
Jonathan Mohr

Jonathan Mohr, Associate Professor of Computing Science
Augustana University College, Camrose, Alberta, Canada  T4V 2R3   
Phone:  (403) 679-1514          Fax: (403) 679-1129
E-mail: MohrJ@Augustana.AB.CA





Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa21966;
          19 Nov 97 14:48 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa01727;
          19 Nov 97 14:50 GMT
Received: (qmail 2081 invoked from network); 19 Nov 1997 14:50:32 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 19 Nov 1997 14:50:32 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (OAA23073); Wed, 19 Nov 1997 14:33:30 GMT
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk; Wed, 19 Nov 97 14:33:03 GMT
Received: from qmailr@pat.bath.ac.uk [138.38.32.2] by hermes via SMTP (NAA10737); Wed, 19 Nov 1997 13:49:49 GMT
Message-Id: <199711191349.NAA10737@hermes>
Received: (qmail 24729 invoked from network); 19 Nov 1997 13:50:01 -0000
Received: from omphalos.maths.bath.ac.uk (HELO maths.Bath.AC.UK) (mmdf@138.38.99.25)
  by pat.bath.ac.uk with SMTP; 19 Nov 1997 13:50:01 -0000
Date:     Wed, 19 Nov 97 13:48:08 GMT
From: jpff@maths.bath.ac.uk
Subject:  Re: cps2pch Question & Chord Strumming Orc/Sco
To: csound@maths.ex.ac.uk
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Message written at 18 Nov 1997 22:38:01 +0000
--- Copy of mail to hljmm@discover-net.net ---
In-reply-to: <3.0.3.16.19971108135416.0b170780@mail.discover-net.net> (message
	from Hans Mikelson on Sat, 08 Nov 1997 13:54:16)
References:  <3.0.3.16.19971108135416.0b170780@mail.discover-net.net>

In answer to teh question..
 How do you use cps2pch with unequal temperament?
i refer you to the documentation (edited here for simplicity)

		icps	cps2pch		ipch, iequal

Converts a pitch-class notation into cycles-per-second for equal
divisions of the octave.
There is a restriction of no more than 100 equal divisions.

INITIALISATION

ipch    - Input number of the form 8ve.pc, indicating an `octave' and
	  which note in the octave.

iequal  - if positive, the number of equal intervals into which the 
	  `octave' is divided.  Must be less than or equal to 100.
	  if negative is the number of a table of frequency multipliers

EXAMPLES


  inote cps2pch	p5, 19			; convert oct.pch to cps in 19ET

The use of a table allows exotic scales by mapping frequencies in a table

For example the table
	f2 0 16 -2 1 1.1 1.2 1.3 1.4 1.6 1.7 1.8 1.9

can be used with
	ip          cps2pch	p4, -2
to get a 10 note scale of unequal divisions



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22037;
          19 Nov 97 15:18 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa02976;
          19 Nov 97 15:20 GMT
Received: (qmail 6339 invoked from network); 19 Nov 1997 15:20:38 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 19 Nov 1997 15:20:38 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (NAA03962); Wed, 19 Nov 1997 13:56:03 GMT
Received: from exub by maths.exeter.ac.uk; Wed, 19 Nov 97 13:55:25 GMT
Received: from qmailr@pat.bath.ac.uk [138.38.32.2] by exub via SMTP (NAA18583); Wed, 19 Nov 1997 13:57:03 GMT
Message-Id: <199711191357.NAA18583@exub>
Received: (qmail 24666 invoked from network); 19 Nov 1997 13:49:35 -0000
Received: from omphalos.maths.bath.ac.uk (HELO maths.Bath.AC.UK) (mmdf@138.38.99.25)
  by pat.bath.ac.uk with SMTP; 19 Nov 1997 13:49:35 -0000
Date:     Wed, 19 Nov 97 13:47:41 GMT
From: jpff@maths.bath.ac.uk
Subject:  Re: 32-bit float AIFF
To: csound@maths.ex.ac.uk
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Message written at 18 Nov 1997 21:50:28 +0000
--- Copy of mail to rwd@pact.srf.ac.uk ---
In-reply-to: <199711171756.RAA06683@talisker.pact.srf.ac.uk> (message from
	Richard Dobson on Mon, 17 Nov 1997 17:56:39 +0000 (GMT))
References:  <199711171756.RAA06683@talisker.pact.srf.ac.uk>

Can you give a reference to what the format is for WAV/float?  Without
that it is rather hard to incorporate the format into the main system
==John ff



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa22691;
          19 Nov 97 18:38 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa09541;
          19 Nov 97 18:39 GMT
Received: (qmail 748 invoked from network); 19 Nov 1997 17:21:25 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 19 Nov 1997 17:21:25 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (RAA22880); Wed, 19 Nov 1997 17:09:31 GMT
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk; Wed, 19 Nov 97 17:09:01 GMT
Received: from aixrs1.hrz.uni-essen.de [132.252.180.228] by hermes via ESMTP (RAA15498); Wed, 19 Nov 1997 17:08:50 GMT
Received: from FILA (khalid@[132.252.240.64]) by aixrs1.hrz.uni-essen.de (8.8.5/8.7) with SMTP id SAA39770 for ; Wed, 19 Nov 1997 18:11:47 +0100
Message-Id: <34731DDE.387AE177@uni-essen.de>
Date: Wed, 19 Nov 1997 18:11:58 +0100
From: Khalid 
X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.29 i586)
Mime-Version: 1.0
To: csound@maths.ex.ac.uk
Subject: Re: quoted headers unlistenable
References: <199711101641.IAA28844@eos.arc.nasa.gov> <34731D87.339AD3AD@uni-essen.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

Hi,
        when you say "quoted headers" do you mean
the lines that reference earlier mails and start with
the smaller-than sign? Or do you mean the stuff that
documents the route the mail has travelled and that's
usually on mail that has been sent to several adresses
i a row? Do you have a suggestion how we could ease
the thing for you people?

                khalid



Received: from stork.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa23422;
          19 Nov 97 19:54 GMT
Received: from pat.bath.ac.uk by stork.maths.Bath.AC.UK id aa12204;
          19 Nov 97 19:55 GMT
Received: (qmail 20152 invoked from network); 19 Nov 1997 19:55:07 -0000
Received: from hermes.ex.ac.uk (144.173.6.14)
  by pat.bath.ac.uk with SMTP; 19 Nov 1997 19:55:07 -0000
Received: from noether [144.173.8.10] by hermes via SMTP (TAA03935); Wed, 19 Nov 1997 19:41:47 GMT
Received: from hermes.ex.ac.uk by maths.exeter.ac.uk; Wed, 19 Nov 97 19:41:30 GMT
Received: from oznet11.ozemail.com.au [203.2.192.118] by hermes via ESMTP (TAA21393); Wed, 19 Nov 1997 19:41:22 GMT
Received: from [203.108.203.211] (slmel57p03.ozemail.com.au [203.108.203.211]) by oznet11.ozemail.com.au (8.8.4/8.6.12) with SMTP id GAA02460; Thu, 20 Nov 1997 06:43:57 +1100 (EST)
Message-Id: <199711191943.GAA02460@oznet11.ozemail.com.au>
Subject: Re: cacheing
Date: Thu, 20 Nov 97 06:45:30 +1200
X-Mailer: Claris Emailer 2.0v2, June 6, 1997
From: Graeme Gerrard 
To: mohrj@corelli.augustana.ab.ca, Csound list 
MMDF-Warning:  Parse error in original version of preceding line at UK.AC.Bath.maths.stork
Mime-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk

james@noether.ex.ac.uk

>example, if you have a 64K L2 cache already, it may be worth it to 
>increase that to 128K but may not worth it to go to to 256K.  It is 
>unlikely that anything beyond 512K will be of much use, according to 
>test results.)

Below is a message I sent to Javier re this thread.
>I have a 7300/200, but it came with a 256K cache like the 8600.  I put in 
>a 512K cache but can't remember the speed increase it gave, but I do 
>remember it was significant.  Soon after, I tested a 1Mb cache 
>against 512K with MacBench and found a 16% increase in processor speed.  
>There were very few 1M caches around at the time and they were expensive 
>so I stayed with the 512K.

I rechecked my figues and it was an 11% increase, not 16%.  The increase 
from 256K to 512K was much more as I recall.  Check on MacWorld or one of 
those places - they had a set of results there earlier this year.