Skip to content

Commit

Permalink
Stabilizing test innodb.innodb-buffer-pool-resize for Valgrind build
Browse files Browse the repository at this point in the history
Summary: Occasionally this test fails with Valgrind build (only). Buffer pool resizing contains large amount of heavy memory operations, this makes the test runs very slowly with Valgrind build, during which buffer pages get I/O fixed or buffer fixed for longer time, especially in this test the buffer pool is small and the data is relatively large, which introduces higher chance that resizing operation fails to find enough collectable memory in time. This diff increases both the original buffer size and the resize target to make it easier to collect buffer pool blocks for Valgrind build. Same changes also are applied to test innodb.innodb-buffer-pool-resize-compressed since these two tests share the same testing code.

Test Plan: MTR

Reviewers: tianx

Reviewed By: tianx

Subscribers: webscalesql-eng

Differential Revision: https://reviews.facebook.net/D54345
  • Loading branch information
pengtfb authored and Herman Lee committed Feb 22, 2016
1 parent d0cdd9d commit 7e4d4e6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ create or replace view view0 as select 1 union all select 1;
set @`v_id` := 0;
set @`v_val` := 0;
replace into t1 select (@`v_id` := (@`v_id` + 4) mod 4294967296) as id, (@`v_val` := (@`v_val` + 4) mod 4294967296) as val from view0 v0, view0 v1, view0 v2, view0 v3, view0 v4, view0 v5, view0 v6, view0 v7, view0 v8, view0 v9, view0 v10, view0 v11, view0 v12, view0 v13, view0 v14, view0 v15, view0 v16, view0 v17;
set global innodb_buffer_pool_size = 7340032;
set global innodb_buffer_pool_size = 42991616;
select count(val) from t1;
count(val)
262144
set global innodb_adaptive_hash_index=OFF;
set global innodb_buffer_pool_size = 16777216;
set global innodb_buffer_pool_size = 67108864;
select count(val) from t1;
count(val)
262144
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/innodb/r/innodb-buffer-pool-resize.result
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ create or replace view view0 as select 1 union all select 1;
set @`v_id` := 0;
set @`v_val` := 0;
replace into t1 select (@`v_id` := (@`v_id` + 4) mod 4294967296) as id, (@`v_val` := (@`v_val` + 4) mod 4294967296) as val from view0 v0, view0 v1, view0 v2, view0 v3, view0 v4, view0 v5, view0 v6, view0 v7, view0 v8, view0 v9, view0 v10, view0 v11, view0 v12, view0 v13, view0 v14, view0 v15, view0 v16, view0 v17;
set global innodb_buffer_pool_size = 7340032;
set global innodb_buffer_pool_size = 42991616;
select count(val) from t1;
count(val)
262144
set global innodb_adaptive_hash_index=OFF;
set global innodb_buffer_pool_size = 16777216;
set global innodb_buffer_pool_size = 67108864;
select count(val) from t1;
count(val)
262144
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--innodb-buffer-pool-size=16M
--innodb-buffer-pool-size=64M
--innodb-buffer-pool-chunk-size=2M
--innodb-buffer-pool-resizing-timeout=60
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--innodb-buffer-pool-size=16M
--innodb-buffer-pool-size=64M
--innodb-buffer-pool-chunk-size=2M
--innodb-buffer-pool-resizing-timeout=60
8 changes: 4 additions & 4 deletions mysql-test/suite/innodb/t/innodb-buffer-pool-resize-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ set @`v_val` := 0;
# 2^18 == 262144 records
replace into t1 select (@`v_id` := (@`v_id` + 4) mod 4294967296) as id, (@`v_val` := (@`v_val` + 4) mod 4294967296) as val from view0 v0, view0 v1, view0 v2, view0 v3, view0 v4, view0 v5, view0 v6, view0 v7, view0 v8, view0 v9, view0 v10, view0 v11, view0 v12, view0 v13, view0 v14, view0 v15, view0 v16, view0 v17;

# Shrink buffer pool to 7MB
set global innodb_buffer_pool_size = 7340032;
# Shrink buffer pool to 41MB
set global innodb_buffer_pool_size = 42991616;
--source include/wait_condition.inc

select count(val) from t1;

set global innodb_adaptive_hash_index=OFF;

# Expand buffer pool to 16MB
set global innodb_buffer_pool_size = 16777216;
# Expand buffer pool to 64MB
set global innodb_buffer_pool_size = 67108864;
--source include/wait_condition.inc

select count(val) from t1;
Expand Down

0 comments on commit 7e4d4e6

Please sign in to comment.