Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-8923: port innodb_buffer_pool_dump_pct from MySQL
Backport pull request #125 from grooverdan/MDEV-8923_innodb_buffer_pool_dump_pct to 10.0 WL#6504 InnoDB buffer pool dump/load enchantments This patch consists of two parts: 1. Dump only the hottest N% of the buffer pool(s) 2. Prevent hogging the server duing BP load From MySQL - commit b409342c43ce2edb68807100a77001367c7e6b8e Add testcases for innodb_buffer_pool_dump_pct_basic. Part of the code authored by Daniel Black
- Loading branch information
Jan Lindström
committed
Dec 15, 2015
1 parent
af3c670
commit b63bf73
Showing
10 changed files
with
244 additions
and
6 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
SET @orig = @@global.innodb_buffer_pool_dump_pct; | ||
SELECT @orig; | ||
@orig | ||
100 | ||
SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON; | ||
SET GLOBAL innodb_buffer_pool_dump_pct=0; | ||
SELECT @@global.innodb_buffer_pool_dump_pct; | ||
@@global.innodb_buffer_pool_dump_pct | ||
1 | ||
SHOW WARNINGS; | ||
Level Code Message | ||
Warning 1292 Truncated incorrect innodb_buffer_pool_dump_pct value: '0' | ||
SET GLOBAL innodb_buffer_pool_dump_pct=101; | ||
SELECT @@global.innodb_buffer_pool_dump_pct; | ||
@@global.innodb_buffer_pool_dump_pct | ||
100 | ||
SHOW WARNINGS; | ||
Level Code Message | ||
Warning 1292 Truncated incorrect innodb_buffer_pool_dump_pct value: '101' | ||
SET GLOBAL innodb_buffer_pool_dump_pct=@orig; |
34 changes: 34 additions & 0 deletions
34
mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# Basic test for innodb_buffer_pool_dump_pct | ||
# | ||
|
||
-- source include/have_innodb.inc | ||
|
||
# Check the default value | ||
SET @orig = @@global.innodb_buffer_pool_dump_pct; | ||
SELECT @orig; | ||
|
||
# Do the dump | ||
SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON; | ||
|
||
# Wait for the dump to complete | ||
let $wait_condition = | ||
SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at ' | ||
FROM information_schema.global_status | ||
WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'; | ||
-- source include/wait_condition.inc | ||
|
||
# Confirm that the dump file has been created | ||
-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)` | ||
-- file_exists $file | ||
|
||
--disable_warnings | ||
SET GLOBAL innodb_buffer_pool_dump_pct=0; | ||
SELECT @@global.innodb_buffer_pool_dump_pct; | ||
SHOW WARNINGS; | ||
SET GLOBAL innodb_buffer_pool_dump_pct=101; | ||
SELECT @@global.innodb_buffer_pool_dump_pct; | ||
SHOW WARNINGS; | ||
--enable_warnings | ||
|
||
SET GLOBAL innodb_buffer_pool_dump_pct=@orig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters