Bug #104877 Linear read-ahead status values no have change
Submitted: 9 Sep 2021 3:03 Modified: 11 Oct 2021 12:48
Reporter: HULONG CUI Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.26 OS:Any
Assigned to: CPU Architecture:Any

[9 Sep 2021 3:03] HULONG CUI
Description:
i have test liner read-ahead performance。
#1.first change my.cnf file
innodb_buffer_pool_dump_at_shutdown=0
innodb_buffer_pool_load_at_startup=0
innodb_read_ahead_threshold=10
innodb_random_read_ahead=0

#2.select Query 3000 of 6000 rows
mysql> show global status  like '%ahead%';
+-----------------------------------.----+-------+
| Variable_name                         | Value |
+---------------------------------------+-------+
| Innodb_buffer_pool_read_ahead_rnd     | 387   |
| Innodb_buffer_pool_read_ahead         | 0     |
| Innodb_buffer_pool_read_ahead_evicted | 0     |
+---------------------------------------+-------+

this values  Innodb_buffer_pool_read_ahead no have changed

How to repeat:
1)make data
shell> ./sysbench  ./lua/oltp_common.lua --mysql-user=root --mysql-password=123456  --mysql-socket=/opt/data8.0/mysql/mysql.sock    --mysql-db=sbtest --tables=1 --table-size=6000 --db-driver=mysql --report-interval=10 --threads=10 --time=120 prapare

Initializing worker threads...

Creating table 'sbtest1'...
Inserting 6000 records into 'sbtest1'
Creating a secondary index on 'sbtest1'...

2)record status
mysql> show status  like '%ahead%';
+---------------------------------------+-------+
| Variable_name                         | Value |
+---------------------------------------+-------+
| Innodb_buffer_pool_read_ahead_rnd     | 387   |
| Innodb_buffer_pool_read_ahead         | 0     |
| Innodb_buffer_pool_read_ahead_evicted | 0     |
+---------------------------------------+-------+

3)select query
mysql> pager cat > /dev/null
mysql>select * from sbtest1 where id <7000;
mysql> nopager 

4)view change status
mysql> show status  like '%ahead%';
+---------------------------------------+-------+
| Variable_name                         | Value |
+---------------------------------------+-------+
| Innodb_buffer_pool_read_ahead_rnd     | 487   |
| Innodb_buffer_pool_read_ahead         | 0     |
| Innodb_buffer_pool_read_ahead_evicted | 0     |
+---------------------------------------+-------+
the Innodb_buffer_pool_read_ahead donot have  changed
[9 Sep 2021 13:56] MySQL Verification Team
Hi Mr. CUI,

Thank you for your bug report.

However, it does not seem to be a bug, at all.

You have done only the preparation stage and you have not run TPC benchmark, at all. We also recommend that you run TPC test, if OLTP does not provide results.

You can also halve the threshold and after you run the full benchmark, you will see that read ahead works.

Let us know the results of the experiment.
[10 Oct 2021 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".