[MDEV-23492] performance_schema_digests_size changing from default to 5000 when enabling performance_schema Created: 2020-08-16  Updated: 2020-10-23  Resolved: 2020-10-23

Status: Closed
Project: MariaDB Server
Component/s: Configuration
Affects Version/s: 10.3.13
Fix Version/s: 10.2.35, 10.3.26, 10.4.16, 10.5.7

Type: Bug Priority: Minor
Reporter: Jitender Singh Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Production



 Description   

Hi Team,

On MariaDB version 10.3.13, default value of performance_schema_digests_size is '-1' as per document. However when enabling performance_schema on this the value is getting changed from -1 to 5000

https://mariadb.com/kb/en/performance-schema-system-variables/#performance_schema_digests_size

I did not find any document stating the same. Steps to reproduce

1. Installed MariaDB 10.3.13 on rhel 7 and verify the value of 'performance_schema_digests_size' it will show '-1'.
2. Enable performance_scheme and again see the value, it changes to '5000'
3. Though I can change value between -1 to 200 but not able to understand howcome it is showing 5000 where as the limit is between -1 to 200.

[root@ip-xx.xx.xx.xx ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
Server version: 10.3.13-MariaDB MariaDB Server
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select @@version; select @@performance_schema_digests_size;select @@performance_schema;
+-----------------+
| @@version       |
+-----------------+
| 10.3.13-MariaDB |
+-----------------+
1 row in set (0.000 sec)
 
+-----------------------------------+
| @@performance_schema_digests_size |
+-----------------------------------+
|                                -1 |
+-----------------------------------+
1 row in set (0.000 sec)
 
+----------------------+
| @@performance_schema |
+----------------------+
|                    0 |
+----------------------+
1 row in set (0.000 sec)
 
MariaDB [(none)]>
 
After enabling performacne_schema on EC2 instance the value changed to 5000
 
[root@ip-xx.xx.xx.xx my.cnf.d]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.13-MariaDB MariaDB Server
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select @@version; select @@performance_schema_digests_size;select @@performance_schema;
+-----------------+
| @@version       |
+-----------------+
| 10.3.13-MariaDB |
+-----------------+
1 row in set (0.000 sec)
 
+-----------------------------------+
| @@performance_schema_digests_size |
+-----------------------------------+
|                              5000 |
+-----------------------------------+
1 row in set (0.000 sec)
 
+----------------------+
| @@performance_schema |
+----------------------+
|                    1 |
+----------------------+
1 row in set (0.000 sec)
 
MariaDB [(none)]>
 
Tried chaning performance_schema_digests_size to 100 and was able to change.
[root@ip-xx.xx.xx.xx my.cnf.d]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.13-MariaDB MariaDB Server
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select @@version; select @@performance_schema_digests_size;select @@performance_schema;
+-----------------+
| @@version       |
+-----------------+
| 10.3.13-MariaDB |
+-----------------+
1 row in set (0.000 sec)
 
+-----------------------------------+
| @@performance_schema_digests_size |
+-----------------------------------+
|                               100 |
+-----------------------------------+
1 row in set (0.000 sec)
 
+----------------------+
| @@performance_schema |
+----------------------+
|                    1 |
+----------------------+
1 row in set (0.000 sec)
 
MariaDB [(none)]>

Again changed value from 100 to -1 when performance schema is enabled and it changed to 5000

[root@ip-xx.xx.xx.xx my.cnf.d]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.13-MariaDB MariaDB Server
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> select @@version; select @@performance_schema_digests_size;select @@performance_schema;
+-----------------+
| @@version       |
+-----------------+
| 10.3.13-MariaDB |
+-----------------+
1 row in set (0.000 sec)
 
+-----------------------------------+
| @@performance_schema_digests_size |
+-----------------------------------+
|                              5000 |
+-----------------------------------+
1 row in set (0.000 sec)
 
+----------------------+
| @@performance_schema |
+----------------------+
|                    1 |
+----------------------+
1 row in set (0.000 sec)
 
MariaDB [(none)]>

Is this expected behavior?



 Comments   
Comment by Sergei Golubchik [ 2020-08-31 ]

yes, 5000 is expected behavior (it's the auto-configured value, the help text says "-1 for automated sizing").

The fact that auto value is larger than manually allowed upper threshold is a bug.

Generated at Thu Feb 08 09:22:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.