[MDEV-24426] fil_crypt_thread keep spinning even if innodb_encryption_rotate_key_age=0 Created: 2020-12-17 Updated: 2021-01-04 Resolved: 2020-12-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Encryption, Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.5.9, 10.6.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | performance | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
With the following patch:
and with the invocation
I see high CPU usage on GNU/Linux on the 10.5 server. On the 10.6 server with The anomaly is caused by the fact that fil_crypt_return_iops() is waking up all fil_crypt_thread even though innodb_encryption_rotate_key_age=0 and there is no work to do. Unfortunately, for other settings than --innodb-encryption-rotate-key-age=0 a proper fix of this would require implementing a check whether the encryption plugin supports key versioning. |
| Comments |
| Comment by Marko Mäkelä [ 2020-12-18 ] | ||||||
|
For the record, on 10.6 ever since
The powertop main screen would report the wake-ups for each thread. I took 3 samples of the output while the server process that was started by mtr was idle. The biggest thread with wakeups was the timer_handler, which is used by InnoDB as well, ever since Apart from the timer_handler, only two other threads were reported by powertop: ma_checkpoint_background (0.05 wakeups/second), and a random sample (0.00 wakeups/second) for tpool::thread_pool_generic::worker_main using a timed wait in tpool::thread_pool_generic::wait_for_tasks. | ||||||
| Comment by Matthias Leich [ 2020-12-18 ] | ||||||
|
| ||||||
| Comment by Marko Mäkelä [ 2021-01-04 ] | ||||||
|
The remaining problem should be addressed by |