May 24, 2012

Post: Why you should ignore MySQL's key cache hit ratio

key buffer, key_buffer, and key cache interchangeably. However, I will be careful about the difference between “rate” and “ratio”. In this article, the key cache miss rate… or “your key cache hit ratio should be very high, ideally above 99.9%” or “if your key cache hit ratio is low, your key_buffer_…

Post: What MySQL buffer cache hit rate should you target

…What cache hit rate is good for optimal MySQL Performance” is typical question I’m asked. It could by MyISAM key_buffer or Innodb… problems with key buffer efficiency. In the real world even single operation may be IO bould while showing very large hit rate so… were these reads/writes, how good was OS or SAN cache hit rate – something you would not see otherwise. The bad luck is…

Post: MySQL Query Cache

… queries as if query cache hit happens Com_select is not incremented. But if you have just 20% Cache hit rate does it mean it is not worth it ? Not really it depends on which queries are cached, as well… I’ve seen query cache offering about double performance for simple queries with select done by primary key, obviously there is no…

Comment: When should you store serialized objects in the database?

…. Or, you can aggregate in process in the background and cache the values. I haven’t heard of many people running… strategy has been key to their scalability. Treating MySQL like a key value store makes it dead simple to cache your objects. My… will read and write through to cache without any extra effort. We see a 99.9% cache hit rate in production. In practice, that…

Comment: MySQL Query Cache

… way you should combine it with mysql-qery-cache because if your manual cache is outdated you get most time parts of…: 8B, RX: 1B) [OK] Key buffer hit rate: 99.7% (14M cached / 44K reads) [OK] Query cache efficiency: 87.9% (5M cached / 6M selects) On this…-hosting. So you are independent of apc/memcached, have optimal caching, reduced queries and a secure setup with a great performance

Post: SHOW INNODB STATUS walk through

…last failed foreign key constraint: ———————— LATEST FOREIGN KEY ERROR ———————— 060717 …are done to OS cache, and being sequential writes…hit ratio which measures buffer pool efficiency. 1000/1000 corresponds to 100% hit rate. It is hard to tell what buffer pool hit rate

Post: MySQL caching methods and tips

… remain available in the cache, but they are now “stale”. Until the cache key expires, the contents …the MySQL query cache, since the rate of invalidation can not be controlled, and multiple cache entries may … cache is empty. When talking about cache, the miss path is at least as important as the hit

Comment: MySQL random freezes could be the query cache

Currently, the query cache uses the actual query as the key to the cache. This means bad things, when you’re using generated… was generated. What would work must better for the query cache key is simply a cryptographic digest of the tokens which the… a significantly higher hit rate and you don’t hit the query cache mutex lock so often because you only ever hit it when you…

Comment: MySQL random freezes could be the query cache

… about keying off of *both* the actual query and a cryptographic digest of the tokens? I.e. attempt to hit the cache as… the digest. Upside: same cost in terms of parsing, higher hit rate. Downside: storing 2x keys, performing 2x lookups for true misses.