Commit 707aeca3 authored by Inaam Rana's avatar Inaam Rana

When flushing from LRU we try to keep a certain number of pages over

and above the general requirement free. We call them
BUF_FLUSH_EXTRA_MARGIN. With multiple buffer pools we may end up keeping
this amount of pages for each buffer pool. This patch, diagnosed and fixed
by Michael, throttles flushing in such cases.

rb://435
bug#54346
parent b14708f3
...@@ -228,8 +228,8 @@ make sure that a read-ahead batch can be read efficiently in a single ...@@ -228,8 +228,8 @@ make sure that a read-ahead batch can be read efficiently in a single
sweep). */ sweep). */
#define BUF_FLUSH_FREE_BLOCK_MARGIN(b) (5 + BUF_READ_AHEAD_AREA(b)) #define BUF_FLUSH_FREE_BLOCK_MARGIN(b) (5 + BUF_READ_AHEAD_AREA(b))
/** Extra margin to apply above BUF_FLUSH_FREE_BLOCK_MARGIN */ /** Extra margin to apply above BUF_FLUSH_FREE_BLOCK_MARGIN */
#define BUF_FLUSH_EXTRA_MARGIN(b) (BUF_FLUSH_FREE_BLOCK_MARGIN(b) / 4 \ #define BUF_FLUSH_EXTRA_MARGIN(b) ((BUF_FLUSH_FREE_BLOCK_MARGIN(b) / 4 \
+ 100) + 100) / srv_buf_pool_instances)
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
#ifndef UNIV_NONINL #ifndef UNIV_NONINL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment