From 7e4d4e674b4539851d93435a2b09d13651382455 Mon Sep 17 00:00:00 2001 From: Peng Tian Date: Wed, 17 Feb 2016 22:29:30 -0800 Subject: [PATCH] Stabilizing test innodb.innodb-buffer-pool-resize for Valgrind build 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 --- .../innodb/r/innodb-buffer-pool-resize-compressed.result | 4 ++-- .../suite/innodb/r/innodb-buffer-pool-resize.result | 4 ++-- .../t/innodb-buffer-pool-resize-compressed-master.opt | 2 +- .../suite/innodb/t/innodb-buffer-pool-resize-master.opt | 2 +- .../suite/innodb/t/innodb-buffer-pool-resize-test.inc | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-buffer-pool-resize-compressed.result b/mysql-test/suite/innodb/r/innodb-buffer-pool-resize-compressed.result index 4c6822b95742..e0bd29a29348 100644 --- a/mysql-test/suite/innodb/r/innodb-buffer-pool-resize-compressed.result +++ b/mysql-test/suite/innodb/r/innodb-buffer-pool-resize-compressed.result @@ -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 diff --git a/mysql-test/suite/innodb/r/innodb-buffer-pool-resize.result b/mysql-test/suite/innodb/r/innodb-buffer-pool-resize.result index cfb68af95b1a..1eb35cbf292c 100644 --- a/mysql-test/suite/innodb/r/innodb-buffer-pool-resize.result +++ b/mysql-test/suite/innodb/r/innodb-buffer-pool-resize.result @@ -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 diff --git a/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-compressed-master.opt b/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-compressed-master.opt index 55ca4e58a7ff..0b94fb1e9d2e 100644 --- a/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-compressed-master.opt +++ b/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-compressed-master.opt @@ -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 diff --git a/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-master.opt b/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-master.opt index 55ca4e58a7ff..0b94fb1e9d2e 100644 --- a/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-master.opt +++ b/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-master.opt @@ -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 diff --git a/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-test.inc b/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-test.inc index bb57f7fd5175..7e183da6b15f 100644 --- a/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-test.inc +++ b/mysql-test/suite/innodb/t/innodb-buffer-pool-resize-test.inc @@ -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;