Not the answer you need?
Register and ask your own question!

"TokuDB: Auto scheduling background analysis" continuously appearing in log file

vlaskyvlasky EntrantCurrent User Role Beginner
I recently upgraded a replication slave from Percona Server 5.6 to the latest version of Percona Server 5.7.

We are using the TokuDB engine for many tables.

Now, the mysql log file is getting lots of entries likes this:

2016-03-24T03:29:59.950572Z 41 [Note] TokuDB: Auto scheduling background analysis for ./diggers_db/tblcurrent, delta_activity 1 is greater than 30 percent of 4 rows. - succeeded.
2016-03-24T03:29:59.960814Z 41 [Note] TokuDB: Auto scheduling background analysis for ./tilttray_db/tblcurrent, delta_activity 1 is greater than 30 percent of 3 rows. - succeeded.
2016-03-24T03:29:59.989689Z 41 [Note] TokuDB: Auto scheduling background analysis for ./luxury_db/tblcurrent, delta_activity 3 is greater than 30 percent of 13 rows. - succeeded.
2016-03-24T03:29:59.999439Z 41 [Note] TokuDB: Auto scheduling background analysis for ./valley_db/tblcurrent, delta_activity 2 is greater than 30 percent of 8 rows. - succeeded.
2016-03-24T03:30:00.054944Z 41 [Note] TokuDB: Auto scheduling background analysis for ./slab_db/tblcurrent, delta_activity 1 is greater than 30 percent of 5 rows. - succeeded.

The same database names are appearing again and again. I note that most of these tables are tiny, with between 1 and 20 rows. It's been over a day since the upgrade and it's still happening.

Perhaps this is a bug in the TokuDB analyze code causing it to schedule unnecessary analyze operations?

I see there are many configuration options to control the behaviour TokuDB analyze, but not sure if it is necessary to tweak these - I'd rather not stab in the dark.

Would appreciate expert advice. Thanks.

Comments

  • George LorchGeorge Lorch Percona Percona Moderator Role Patron
    Hello Vlasky,
    First, I am curious why you are using TokuDB for tables with only 1 and 20 rows. TokuDB was designed for 'big data', tables with millions and billions of rows. It will not perform as well as InnoDB for smaller data sets.

    So on to your question:

    The new auto analysis behavior is described here https://www.percona.com/doc/percona-server/5.7/tokudb/tokudb_background_analyze_table.html

    It was modeled loosely on similar functionality that exists within InnoDB but with more flexibility and intending to be as lock-less as possible since analysis can take some time.

    Since your tables are so small, you might want to disable the 'automatic' nature of this feature by setting the global variables tokudb_auto_analyze=0 and tokudb_analyze_in_background=false. It will then behave as it did in 5.5/5.6 where TokuDB index cardinality statistics will need to be manually updated by explicitly executing "ANALYZE TABLE ..."

    --
    George O. Lorch III
    Software Engineer, Percona
  • recarvrecarv Entrant Inactive User Role Beginner
    I'm getting nearly the same thing in Percona 5.7.11-4 with a mix of InnoDB and tokuDB tables - however its strange because its saying the table has 0 rows:

    TokuDB: Auto scheduling background analysis for ./db/table_name_redaced, delta_activity 2 is greater than 30 percent of 0 rows. - succeeded.

    What is troubling is that this tokuDB table has 8.7m rows!! This has to be a bug, any suggestions on what might be going on and/or how to investigate?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.