Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
Description
There have been several bug reports about how the background encryption threads can use a lot of CPU. Prior analysis suggested those this is primarily caused by the operations that check for key rotation. As part of MDEV-11738, the innodb_encryption_rotate_key_age system variable's special 0 value was added to disable these checks, and this does seem to help most users.
The default value of innodb_encryption_rotate_key_age is 1, so key rotation checks will be enabled by default. The problem is that many encryption users will be using {file_key_management}} plugin, which doesn't even support key rotations. Many of these users are not aware that they should set innodb_encryption_rotate_key_age to 0, so their background threads will be using more CPU than is necessary.
Would it be possible to automatically disable key rotation checks for file_key_management plugin (and maybe other plugins that don't support key rotation)?
Attachments
Issue Links
- causes
-
MDEV-35558 fil_crypt_must_default_encrypt() is being called even if ENCRYPTION=NO
-
- Open
-
- is duplicated by
-
MDEV-17757 MariaDB 10.1 encryption threads consume CPU 100%
-
- Closed
-
- relates to
-
MDEV-14398 When innodb_encryption_rotate_key_age=0 is set, server won't encrypt tablespaces
-
- Closed
-
-
MDEV-29652 data-at-rest enabled high CPU use for long times
-
- Closed
-
-
MDEV-20713 Implement key rotation for file_key_management plugin
-
- Open
-
-
MDEV-24426 fil_crypt_thread keep spinning even if innodb_encryption_rotate_key_age=0
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Issue Type | Task [ 3 ] | Bug [ 1 ] |
Assignee | Jan Lindström [ jplindst ] |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.2 [ 14601 ] |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.2 [ 14601 ] |
Link |
This issue relates to |
Assignee | Jan Lindström [ jplindst ] | Thirunarayanan B [ thiru ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Jan Lindström [ jplindst ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Labels | encryption file_key_management innodb innodb_encryption_threads | encryption file_key_management innodb innodb_encryption_threads need_feedback |
Assignee | Jan Lindström [ jplindst ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Jan Lindström [ jplindst ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Jan Lindström [ jplindst ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.4 [ 22408 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] |
Labels | encryption file_key_management innodb innodb_encryption_threads need_feedback | encryption file_key_management innodb innodb_encryption_threads |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Link | This issue relates to MDEV-20713 [ MDEV-20713 ] |
Description |
There have been several bug reports about how the background encryption threads can use a lot of CPU. Prior analysis suggested those this is primarily caused by the operations that check for key rotation. As part of The default value of innodb-encryption-rotate-key-age is 1, so key rotation checks will be enabled by default. The problem is that many encryption users will be using file_key_management plugin, which doesn't even support key rotations. Many of these users are not aware that they should set innodb-encryption-rotate-key-age=0, so their background threads will be using more CPU than is necessary. Would it be possible to automatically disable key rotation checks for file_key_management plugin (and maybe other plugins that don't support key rotation)? |
There have been several bug reports about how the background encryption threads can use a lot of CPU. Prior analysis suggested those this is primarily caused by the operations that check for key rotation. As part of The default value of {{innodb_encryption_rotate_key_age}} is {{1}}, so key rotation checks will be enabled by default. The problem is that many encryption users will be using {file_key_management}} plugin, which doesn't even support key rotations. Many of these users are not aware that they should set {{innodb_encryption_rotate_key_age}} to {{0}}, so their background threads will be using more CPU than is necessary. Would it be possible to automatically disable key rotation checks for {{file_key_management}} plugin (and maybe other plugins that don't support key rotation)? |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.1 [ 16100 ] |
Link |
This issue relates to |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Affects Version/s | 10.5 [ 23123 ] | |
Affects Version/s | 10.6 [ 24028 ] |
Assignee | Sergei Golubchik [ serg ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.6 [ 24028 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Fix Version/s | 10.6.3 [ 25904 ] | |
Fix Version/s | 10.2.39 [ 25731 ] | |
Fix Version/s | 10.3.30 [ 25732 ] | |
Fix Version/s | 10.4.20 [ 25733 ] | |
Fix Version/s | 10.5.11 [ 25734 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Fix Version/s | 10.2.40 [ 26027 ] | |
Fix Version/s | 10.3.31 [ 26028 ] | |
Fix Version/s | 10.4.21 [ 26030 ] | |
Fix Version/s | 10.5.12 [ 26025 ] | |
Fix Version/s | 10.2.39 [ 25731 ] | |
Fix Version/s | 10.3.30 [ 25732 ] | |
Fix Version/s | 10.4.20 [ 25733 ] | |
Fix Version/s | 10.5.11 [ 25734 ] |
Workflow | MariaDB v3 [ 83306 ] | MariaDB v4 [ 153061 ] |
Link | This issue relates to MENT-1399 [ MENT-1399 ] |
Link |
This issue relates to |
Zendesk Related Tickets | 117847 |
Link | This issue causes MDEV-35558 [ MDEV-35558 ] |
Link |
This issue is duplicated by |
As far as I can see, there is no need to do key rotation if innodb-encryption-rotate-key-age=1 and latest key version is 1 (which is always the case with file_key_management plugin).
There is a need to encrypt existing tables, but I suppose
MDEV-11738already solves that.