Percona Server with XtraDB

XtraDB does unnecessary slow log stats accounting even with the slow log disabled

Reported by Alexey Kopytov on 2013-02-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Medium
Alexey Kopytov
5.1
Medium
Alexey Kopytov
5.5
Medium
Alexey Kopytov

Bug Description

ha_innobase::external_lock() does some extra stats accounting work for slow log even if neither the slow log itself nor log_slow_verbosity=innodb are enabled:

 if (trx->n_mysql_tables_in_use == 0) {
#ifdef EXTENDED_SLOWLOG
  increment_thd_innodb_stats(thd,
     (unsigned long long) trx->descr->id,
     trx->io_reads,
     trx->io_read,
     trx->io_reads_wait_timer,
     trx->lock_que_wait_timer,
     trx->innodb_que_wait_timer,
     trx->distinct_page_access);

  trx->io_reads = 0;
  trx->io_read = 0;
  trx->io_reads_wait_timer = 0;
  trx->lock_que_wait_timer = 0;
  trx->innodb_que_wait_timer = 0;
  trx->distinct_page_access = 0;
  if (trx->distinct_page_access_hash)
   memset(trx->distinct_page_access_hash, 0, DPAH_SIZE);
#endif

The trx stats themselves are only updated if trx->take_stats is TRUE, but the code above does not check this.

tags: added: slow-extended
Alexey Kopytov (akopytov) wrote :

Assigning to myself, as this needs to be fixed for internal tests.

Alexey,
Please also consider
https://blueprints.launchpad.net/percona-server/+spec/log-queries-in-memory
which I should be implementing soon. Maybe I would need to add another
option to trigger XtraDB statistics collection but no actual logging to
the traditional slow log. I was hoping to accomplish this task entirely
within the plugin and not rely on any InnoDB/XtraDB changes.

On 2/20/2013 11:03 AM, Alexey Kopytov wrote:
> Assigning to myself, as this needs to be fixed for internal tests.
>
> ** Changed in: percona-server/5.1
> Assignee: Laurynas Biveinis (laurynas-biveinis) => Alexey Kopytov (akopytov)
>
> ** Changed in: percona-server/5.5
> Assignee: Laurynas Biveinis (laurynas-biveinis) => Alexey Kopytov (akopytov)
>

--
George O. Lorch III
Software Engineer, Percona
+1-888-401-3401 x542 US/Arizona (GMT -7)
skype: george.ormond.lorch.iii

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

Other bug subscribers