mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Bug 12356373 - PERFORMANCE REGRESSION FROM 5.1 TO 5.5 : GROUP BY:
The title of the bug is a little confusing. The actual fix is to reintroduce random readahead inside InnoDB with a dynamic, global switch innodb_random_read_ahead [default = off]. Approved by: Sunny Bains rb://696
This commit is contained in:
parent
afd6f46b7b
commit
41258f8e6c
8 changed files with 232 additions and 7 deletions
|
|
@ -61,6 +61,27 @@ buf_block_get_freed_page_clock(
|
|||
return(buf_page_get_freed_page_clock(&block->page));
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Tells if a block is still close enough to the MRU end of the LRU list
|
||||
meaning that it is not in danger of getting evicted and also implying
|
||||
that it has been accessed recently.
|
||||
Note that this is for heuristics only and does not reserve buffer pool
|
||||
mutex.
|
||||
@return TRUE if block is close to MRU end of LRU */
|
||||
UNIV_INLINE
|
||||
ibool
|
||||
buf_page_peek_if_young(
|
||||
/*===================*/
|
||||
const buf_page_t* bpage) /*!< in: block */
|
||||
{
|
||||
/* FIXME: bpage->freed_page_clock is 31 bits */
|
||||
return((buf_pool->freed_page_clock & ((1UL << 31) - 1))
|
||||
< ((ulint) bpage->freed_page_clock
|
||||
+ (buf_pool->curr_size
|
||||
* (BUF_LRU_OLD_RATIO_DIV - buf_LRU_old_ratio)
|
||||
/ (BUF_LRU_OLD_RATIO_DIV * 4))));
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
Recommends a move of a block to the start of the LRU list if there is danger
|
||||
of dropping from the buffer pool. NOTE: does not reserve the buffer pool
|
||||
|
|
@ -89,12 +110,7 @@ buf_page_peek_if_too_old(
|
|||
buf_pool->stat.n_pages_not_made_young++;
|
||||
return(FALSE);
|
||||
} else {
|
||||
/* FIXME: bpage->freed_page_clock is 31 bits */
|
||||
return((buf_pool->freed_page_clock & ((1UL << 31) - 1))
|
||||
> ((ulint) bpage->freed_page_clock
|
||||
+ (buf_pool->curr_size
|
||||
* (BUF_LRU_OLD_RATIO_DIV - buf_LRU_old_ratio)
|
||||
/ (BUF_LRU_OLD_RATIO_DIV * 4))));
|
||||
return(!buf_page_peek_if_young(bpage));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue