Invalidating query cache mysql battlefield bad company 2 stats not updating
This makes it difficult to make a good decision without showing the concrete performance consequences to each decision.
Currently nobody wants: 1) a blocking mutex 2) a client barrier on a write.
The current code actually locks/unlocks the query_cache lock twice when the query_cache_size is zero! This can all be bypassed if the check for query_cache_size is done without holding the QC lock as in Query_cache::store_query The CPU time wasted is very less, however, in benchmark situations, every cpu cycle counts.
How to repeat: Run a sysbench read-write benchmark with lots of threads.
Therefore the data usually is not handled in one big chunk.
The query cache allocates blocks for storing this data on demand, so when one block is filled, a new block is allocated.
Updated changelog entry: The server unnecessarily acquired a query cache mutex even with the query cache disabled, resulting in a small performance decrement.Description: Since the Query cache hurts some workloads, we turn if off by setting query_cache_size=0.However, the Query Cache still does some work before finding out that query_cache_size is 0 and returning.By using the command line option --query_cache_type=0, the user can disable the query cache permanently and avoid taking the query cache mutex. After review, it may be pushed to the relevant source trees for release in the next version.You can access the patch from: 2742 Kristofer Pettersson 2008-10-27 Bug#38551 query cache can still consume [very little] cpu time even when it is off.