Bug #72137 inaccurate handling of srv_activity_count
| Submitted: | 26 Mar 2014 21:32 | Modified: | 19 Aug 2014 14:26 |
|---|---|---|---|
| Reporter: | Inaam Rana (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
| Version: | 5.6 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[26 Mar 2014 21:32]
Inaam Rana
[27 Mar 2014 19:56]
Sveta Smirnova
Thank you for the report. Verified as described. To repeat: 1. Start MTR as: ./mtr --start innodb & 2. Create Gypsy file: i|1|drop table if exists t1 i|1|create table t1(f1 int not null auto_increment primary key, f2 varchar(255), f3 timestamp) engine=innodb i|10000|insert into t1(f2) values(md5(?))|int n|1000|select * from t1 where f1=?|int 3. Run it as gypsy --host=127.0.0.1:13000 --user=root --queryfile=bug72137_1.query --threads=50 --duration=1000 4. Before 50 threads, doing select start, connect to MySQL server and measure number of dirty pages: mysql> show status like 'innodb%dirty%'; +--------------------------------+---------+ | Variable_name | Value | +--------------------------------+---------+ | Innodb_buffer_pool_pages_dirty | 204 | | Innodb_buffer_pool_bytes_dirty | 3342336 | +--------------------------------+---------+ 2 rows in set (0.03 sec) 5. Watch these numbers while SELECTs are running, notice numbers do not change. 6. Watch the numbers after SELECTs stop.
[1 Jul 2014 20:41]
Inaam Rana
Uploading patch.
[1 Jul 2014 20:42]
Inaam Rana
patch to fix activity count increment with selects
Attachment: srv_act_5.6.patch (application/octet-stream, text), 5.32 KiB.
[19 Aug 2014 14:26]
Daniel Price
Fixed as of the upcoming 5.6.21, 5.7.5 release, and here's the changelog entry: "srv_active_wake_master_thread()" was called directly in "innobase_commit" and "innobase_prepare", waking up the master thread and incrementing "srv_activity_count". "srv_active_wake_master_thread()" should only be called after committing write transactions, not after read-only transactions or rollbacks. This patch also replaces some calls to "srv_active_wake_master_thread()" with calls to "ib_wake_master_thread()". Thank you for the bug report.
[25 Sep 2014 12:18]
Laurynas Biveinis
revno: 6119 committer: bin.x.su@oracle.com branch nick: mysql-5.6 timestamp: Tue 2014-08-19 15:10:06 +0800 message: Bug#18477009 - INACCURATE HANDLING OF SRV_ACTIVITY_COUNT We call srv_active_wake_master_thread() directly and one of the places is innobase_commit (and prepare as well). This call not only wakes up the master thread but also increments the srv_activity_count which tells the page_cleaner that server is not idle. That's no what we expect. We should call srv_active_wake_master_thread() only after the commitment of a write trx, but not read-only trx, or after a rollback. This patch also changes some call of srv_active_wake_master_thread() to ib_wake_master_thread(). Original patch is provided by Inaam. rb#5909, approved by Jimmy.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.