List:Internals« Previous MessageNext Message »
From:Brian Aker Date:July 3 2008 9:32pm
Subject:Re: mutex contention for the query cache
View as plain text  
Hi!


On Jul 3, 2008, at 12:23 PM, Sergey Petrunia wrote:

> I suppose a storage engine could do a better job at detecting cases
> when some INSERT/UPDATE/DELETE operation didn't affect the cached
> fragments, but that seems to be a problem that is not related to poor
> qcache concurrency.  Or they are somehow related?


Bingo, this is the problem you are solving. Ever noticed with a light  
load how often (and somewhat buggily I might add) that Innodb purges  
the query cache? The mechanics of MVCC require you purge a global  
cache nearly constantly if it does not understand the current context  
of a query.

If you do the cache inside of the engine you get the advantage of  
understanding version... this buys you a cache you can use a lot more  
frequently.

There is some added benefit to also caching fragments for join  
operations but no engine today (other then Infobright) is really all  
that smart on this level.

The query cache was awesome for MyISAM/Analytic sorts of uses. Today?  
It is locking structure is far too primitive to be of any value on  
16way machines. Even if you start splitting its hash you are just  
pushing out the problem. I have seen the suggestion for using a bloom  
filter to solve some of this... but really... just let it go.

Cheers,
	-Brian

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
_______________________________________________________
You can't grep a dead tree.



Thread
mutex contention for the query cacheMARK CALLAGHAN3 Jul
  • Re: mutex contention for the query cacheMARK CALLAGHAN3 Jul
    • Re: mutex contention for the query cacheMARK CALLAGHAN3 Jul
      • RE: mutex contention for the query cacheRick James3 Jul
        • Re: mutex contention for the query cacheMARK CALLAGHAN3 Jul
          • RE: mutex contention for the query cacheRick James3 Jul
            • Re: mutex contention for the query cacheMARK CALLAGHAN3 Jul
              • Re: mutex contention for the query cacheBrian Aker3 Jul
              • Re: mutex contention for the query cacheSergei Golubchik3 Jul
          • Re: mutex contention for the query cacheKonstantin Osipov3 Jul
            • Re: mutex contention for the query cacheBrian Aker3 Jul
              • Re: mutex contention for the query cacheSergey Petrunia3 Jul
                • Re: mutex contention for the query cacheBrian Aker3 Jul
                  • Re: mutex contention for the query cacheSergei Golubchik3 Jul
                    • Re: mutex contention for the query cacheBrian Aker4 Jul
                      • Re: mutex contention for the query cacheJonas Oreland4 Jul
                        • Re: mutex contention for the query cacheSergei Golubchik4 Jul
                          • Re: mutex contention for the query cacheJonas Oreland4 Jul
                            • Re: mutex contention for the query cacheJonas Oreland4 Jul
                              • Re: mutex contention for the query cacheKonstantin Osipov4 Jul
                      • Re: mutex contention for the query cacheMark Leith4 Jul
                      • Re: mutex contention for the query cacheMARK CALLAGHAN4 Jul
                        • Re: mutex contention for the query cacheBrian Aker4 Jul
                          • Re: mutex contention for the query cacheMARK CALLAGHAN5 Jul
                            • Re: mutex contention for the query cacheBrian Aker5 Jul
                            • Re: mutex contention for the query cacheJonas Oreland2 Aug
                              • Re: mutex contention for the query cacheFrazer Clement5 Aug
  • Re: mutex contention for the query cacheKonstantin Osipov3 Jul
  • Re: mutex contention for the query cacheJocelyn Fournier3 Jul
    • RE: mutex contention for the query cacheRick James3 Jul
      • Re: mutex contention for the query cacheJocelyn Fournier3 Jul
        • RE: mutex contention for the query cacheRick James3 Jul
  • Re: mutex contention for the query cacheAntony T Curtis3 Jul