----- Original Message -----
From: "Jeremy Zawodny" <jzawodn@stripped>
To: "Michael Griffith" <michael@stripped>
Cc: "mysql" <mysql@stripped>
Sent: Monday, November 05, 2001 10:39 PM
Subject: Re: key cache optimization
> On Mon, Nov 05, 2001 at 07:15:31PM -0700, Michael Griffith wrote:
> >
> > Either the key cache is inefficient or I misunderstand it. Can
> > anyone explain this?
> >
> > Before query:
> >
> > | Key_blocks_used | 530300 |
> > | Key_read_requests | 56072940 |
> > | Key_reads | 527026 |
> >
> > Query executed, takes 30+ seconds
> >
> > After Query
> >
> > | Key_blocks_used | 530300 |
> > | Key_read_requests | 56092143 |
> > | Key_reads | 527026 |
> >
> > No increase in key_reads, so lookup came from cache
> >
> > Same Query run again takes 0.11 seconds (272 times faster)
>
> Interesting.
>
> Even if all the key blocks where in memory (and not swapped
> out--you're not using Linux 2.4.x, are you?), there's the data itself.
> The rows may not have been cached the first time, but the second time
> they probably were.
Actually I am using 2.4. MySQL 3.23.43 on RH 7.1 (2.4.3 SMP) 2 CPUs
Is there something about linux 2.4 and the cache that I should be aware of?
I considered that the delay may be in the OS cache, but I really don't
believe that is it. I have about 800MB of OS cache, and I don't have 800M of
data files. If that is it then something is in the cache that should no be
there otherwise I don't know why it would ever be swapped out.
Thanks.