List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:May 30 2008 9:53am
Subject:Re: key cache mutex contention in MyISAM
View as plain text  
Hi!

>>>>> "Mark" == Mark Callaghan <mcallaghan@stripped> writes:

>> On May 28, 2008, at 3:43 PM, Mark Callaghan wrote:
>> 
>>> Are there plans to fix the key cache mutex contention problem in
>>> MyISAM that occurs on SMP platforms? If there are plans, is there a
>>> worklog entry?
>>> 
>>> There is a bug for this at http://bugs.mysql.com/bug.php?id=31551

Mark> On Thu, May 29, 2008 at 7:43 AM, Paul McCullagh
Mark> <paul.mccullagh@stripped> wrote:

>> Hi Mark,
>> 
>> I noticed in the bug report that you mention: "Monty has stated that the key
>> cache mutex contention problem is easy to fix".
>> 
>> Do you have any idea how Monty planned to fix the problem?

Mark> I think he mentioned splitting it into several caches with a mutex per
Mark> cache. But he should respond.

Yes, that's the plan.

Conceptually this is easy. The main problems are two:

- Moving buffers between cache part that have different mutex. This is
  for example when we flush a buffer and reuse it for another file.
- Flushing the whole cache or all entries for a file. (Happens during
  checkpoint).

This is something we are likely to start working on for Maria within
the next 2 months.

In theory you could move the Maria pagecache code and use it by
MyISAM, but it would be better to switch to Maria tables, either
transactional or not. The Maria non-transactional tables should have
at least identical performance and storage constraints as MyISAM in
all cases, except for parts where we have added new optimization, like
the page cache, where Maria will be notable faster.

I would expect that the non-transactional Maria tables will be quite
robust withing a couple of months; After all 90% of the code for these
are from MyISAM and quite good tested!

As the time table looks today, we should be feature complete with
Maria 1.5 (crashsafe tables), which is the code in the MySQL-5.1-maria
branch, in a couple of weeks;  I pushed yesterday part 2 of 3 of
versioning of data.  Data and count(*)/checksum are now completely
versioned.  The last missing part is versioning of index on which I
will start working on today.

Regards,
Monty
Thread
key cache mutex contention in MyISAMMark Callaghan28 May
  • Re: key cache mutex contention in MyISAMPaul McCullagh29 May
    • Re: key cache mutex contention in MyISAMMark Callaghan29 May
      • Re: key cache mutex contention in MyISAMPaul McCullagh29 May
        • RE: key cache mutex contention in MyISAMRick James29 May
          • RE: key cache mutex contention in MyISAMMichael Widenius30 May
      • Re: key cache mutex contention in MyISAMMichael Widenius30 May