Percona Server has a different default value of innodb_purge_threads as compared to upstream

Bug #1084948 reported by Ovais Tariq
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Hrvoje Matijakovic
5.5
Fix Released
Medium
Hrvoje Matijakovic

Bug Description

Percona Server 5.5 has changed the default value of innodb_purge_threads to 1, while upstream its 0. This is not mentioned anywhere in Percona Server documentation. MySQL has a default value of 0 which is inline with the documentation here: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_purge_threads

Percona Server version: 5.5.28-rel29.1 Percona Server with XtraDB (GPL), Release rel29.1, Revision 334

mysql [localhost] {msandbox} ((none)) > show variables like 'innodb_purge_threads';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| innodb_purge_threads | 1 |
+----------------------+-------+
1 row in set (0.00 sec)

MySQL version: 5.5.28-log Source distribution

mysql> show variables like 'innodb_purge_threads';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| innodb_purge_threads | 0 |
+----------------------+-------+
1 row in set (0.00 sec)

The change in Percona Server's default value should either be documented, or changed back to the default in upstream MySQL

Related branches

Changed in percona-server:
status: New → Confirmed
Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

This is the only obvious reference I see:

http://www.percona.com/doc/percona-server/5.5/performance/innodb_purge_thread.html?id=percona-server:features:innodb_purge_thread

and surely is is misleading when default value from upstream is changed.

Revision history for this message
Ovais Tariq (ovais-tariq) wrote :

Valerii,

Indeed the link that you have mentioned, it makes me assume that PS should still have the same default as upstream.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

It may be different because there are changes to how the
purge thread behaves in PS -- https://bugs.launchpad.net/percona-server/+bug/1058100/comments/1 is one of them (234.1.13 made a few changes as part of innodb_io_patches).

Regarding the default value, I don't think we should change it
now, since it is enabled by default, on my systems it is not
explicitly set at all in my.cnf. If we change it to default of 0,
it can break purge on those systems, instead we should document
it.

Revision history for this message
Ovais Tariq (ovais-tariq) wrote :

Raghu,

Note that the change you are mentioning in purge thread behaviour only applies when the purge thread is enabled, it in no way justifies changing the default :) Furthermore, even those changes are not documented, so no one knows that in Percona Server, purge_batch_size does not have the same kind of impact as upstream :)

I remember an internal conversation sometime back that suggested that there should be no changes in the default values of MySQL options for the sake of compatibility, and I think that is a reasonable approach. Changing default values without the users knowing is invasive.

Why do you think changing the default to 0 would break purge? Changing to 0 would mean that the master thread would be doing the purging, it in no way means that the purge would be broken.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

The changes to the variable innodb_purge_threads was made in the same revision -- https://bazaar.launchpad.net/~percona-core/percona-server/5.5/revision/234.1.13

The only changes to purge it seems to have done are to make
purges less aggressive (by introducing os_thread_sleep) and
waking up the purge irrespective of batch size.

However, it was a bulk import (not broken into logical patches),
so it has changes to adaptive flushing and log flushing, since
purge thread also syncs log buffer, it has effect.

Changing the default won't break it, but many seemed to have assumed it to be 1 in PS (because of all those changes), so we should make it clear in release notes if we change it.

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

Assigning to Hrvoje for documentation.
I do not see how value =1 breaks compatibility , so there is nothing wrong
with using different default value in Percona Server.

Changed in percona-server:
assignee: nobody → Hrvoje Matijakovic (hrvojem)
importance: Undecided → Medium
Stewart Smith (stewart)
Changed in percona-server:
status: Confirmed → Triaged
Revision history for this message
Ovais Tariq (ovais-tariq) wrote :

Vadim,

It doesn't break compatibility but the change in default value is not documented and hence was not clear. In one of the issues I have seen a performance regression, where disabling purge_thread fixed the purge lag that was introduced because of separate purge_thread. See the related upstream bug report: http://bugs.mysql.com/bug.php?id=59291

That's why I believe that anything that could cause regression would not be enabled by default.

Changed in percona-server:
status: Fix Committed → Fix Released
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/PS-1283

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.