-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MDEV-31953 madvise(..., MADV_FREE) is causing a performance regression / MDEV-24670 avoid OOM by linux kernel co-operative memory management #2805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
grooverdan
merged 1 commit into
MariaDB:10.11
from
grooverdan:bb-10.11-MDEV-24670-memory-pressure
Nov 18, 2023
+402
−6
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,27 @@ | ||
| # | ||
| # MDEV-24670 avoid OOM by linux kernel co-operative memory management | ||
| # | ||
| set @save_dbug=@@debug_dbug; | ||
| set @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug; | ||
| set @save_lag_wait=@@GLOBAL.innodb_max_purge_lag_wait; | ||
| set GLOBAL innodb_max_purge_lag_wait=0; | ||
| CREATE TABLE t1 (t TEXT) ENGINE=InnoDB; | ||
| SET GLOBAL innodb_limit_optimistic_insert_debug=2; | ||
| SET unique_checks=0, foreign_key_checks=0; | ||
| INSERT INTO t1 SELECT CONCAT(REPEAT('junk text', 500), CAST(seq AS CHAR)) FROM seq_1_to_1000; | ||
| SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit; | ||
| SET GLOBAL innodb_max_purge_lag_wait=@save_lag_wait; | ||
| DROP TABLE t1; | ||
| SELECT CAST(VARIABLE_VALUE AS INTEGER) INTO @dirty_prev | ||
| FROM INFORMATION_SCHEMA.GLOBAL_STATUS | ||
| WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty'; | ||
| set debug_dbug="d,trigger_garbage_collection"; | ||
| SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size; | ||
|
grooverdan marked this conversation as resolved.
|
||
| SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD | ||
| FROM INFORMATION_SCHEMA.GLOBAL_STATUS | ||
| WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty'; | ||
| LESS_DIRTY_IS_GOOD | ||
| 1 | ||
| FOUND 1 /InnoDB: Memory pressure event freed/ in mysqld.1.err | ||
| set debug_dbug=@save_dbug; | ||
| # End of 10.11 tests | ||
This file contains hidden or 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,44 @@ | ||
| --source include/have_debug.inc | ||
| --source include/linux.inc | ||
| --source include/not_embedded.inc | ||
|
dr-m marked this conversation as resolved.
|
||
| --source include/have_innodb.inc | ||
| --source include/have_sequence.inc | ||
|
|
||
| --echo # | ||
| --echo # MDEV-24670 avoid OOM by linux kernel co-operative memory management | ||
| --echo # | ||
|
|
||
| set @save_dbug=@@debug_dbug; | ||
|
|
||
| set @save_limit=@@GLOBAL.innodb_limit_optimistic_insert_debug; | ||
| set @save_lag_wait=@@GLOBAL.innodb_max_purge_lag_wait; | ||
| set GLOBAL innodb_max_purge_lag_wait=0; | ||
|
|
||
| CREATE TABLE t1 (t TEXT) ENGINE=InnoDB; | ||
| SET GLOBAL innodb_limit_optimistic_insert_debug=2; | ||
| SET unique_checks=0, foreign_key_checks=0; | ||
| INSERT INTO t1 SELECT CONCAT(REPEAT('junk text', 500), CAST(seq AS CHAR)) FROM seq_1_to_1000; | ||
|
|
||
| SET GLOBAL innodb_limit_optimistic_insert_debug=@save_limit; | ||
| SET GLOBAL innodb_max_purge_lag_wait=@save_lag_wait; | ||
|
|
||
| DROP TABLE t1; | ||
|
|
||
| SELECT CAST(VARIABLE_VALUE AS INTEGER) INTO @dirty_prev | ||
| FROM INFORMATION_SCHEMA.GLOBAL_STATUS | ||
| WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty'; | ||
|
|
||
| set debug_dbug="d,trigger_garbage_collection"; | ||
| SET GLOBAL innodb_buffer_pool_size=@@innodb_buffer_pool_size; | ||
|
|
||
| SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD | ||
| FROM INFORMATION_SCHEMA.GLOBAL_STATUS | ||
| WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty'; | ||
|
|
||
| let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; | ||
| let SEARCH_PATTERN= InnoDB: Memory pressure event freed; | ||
| --source include/search_pattern_in_file.inc | ||
|
|
||
| set debug_dbug=@save_dbug; | ||
|
|
||
| --echo # End of 10.11 tests | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.