pt-variable-advisor sort_buffer_size-1 says to leave at default when it's already the default (MySQL >= 5.6.4)

Bug #1283754 reported by Matthew Haughton
2
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Confirmed
Undecided
Unassigned

Bug Description

The default value for sort_buffer_size changed from 2097144 in versions before 5.6.4 to 262144 in 5.6.4 and higher (see https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_sort_buffer_size).

The current sort_buffer_size-1 check is hard coded to fail if sort_buffer_size != 2097144. When the check fails it shows a warning saying the variable should be left at the default value, even if it's already at the default 262144 in 5.6.4 and up.

This should be updated to perhaps check the version of MySQL and adjust the expected value accordingly, or to specify that sort_buffer_size should be set to 2097144, or updated so it's more relevant in the latest MySQL releases.

tags: added: pt-variable-advisor
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

This was easy to confirm with 5.6.19 and version 2.2.10 of the toolkit:

[openxs@centos ~]$ mysql -uroot -e 'select version(), @@sort_buffer_size'
+-------------+--------------------+
| version() | @@sort_buffer_size |
+-------------+--------------------+
| 5.6.19-67.0 | 262144 |
+-------------+--------------------+
[openxs@centos ~]$ pt-variable-advisor --version
pt-variable-advisor 2.2.10
[openxs@centos ~]$ pt-variable-advisor h=localhost | grep sort
# NOTE sort_buffer_size-1: The sort_buffer_size variable should generally be left at its default unless an expert determines it is necessary to change it.
[openxs@centos ~]$ mysql -uroot -e 'set global sort_buffer_size=DEFAULT'
[openxs@centos ~]$ mysql -uroot -e 'select version(), @@sort_buffer_size'
+-------------+--------------------+
| version() | @@sort_buffer_size |
+-------------+--------------------+
| 5.6.19-67.0 | 262144 |
+-------------+--------------------+

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1209

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.