Where the open source database community meets: Use code PERCONA75 and secure your spot for Percona Live.  Register

TokuDB Stats

October 20, 2011
Author
Tim.Callaghan
Share this Post:

I’ve been benchmarking and testing TokuDB for a few months now. One goal of benchmarking is to understand what is limiting the performance of a particular configuration. I frequently use “show engine [innodb/tokudb] status;” from within the MySQL command line client as part of my research.

As I run most of my benchmarks on InnoDB as well as TokuDB, I noticed that there are significant differences in the way each present status information. InnoDB returns a single row, with various sections and carriage returns to maintain readability. In contrast, TokuDB presents one piece of status information per row (currently 139 rows as of TokuDB v5.0.5). This is an important distinction if you want to parse, compare, or store discrete status values. Here is sample output from each engine. I’ve cut out portions of each to maintain readability.

InnoDB plugin v1.0.13

TokuDB v5.0.5

MySQL provides 3 columns for the results of show engine status: Type, Name, and Status. I’m not sure why InnoDB pushes all output into the Status column of a single row, maybe there are historical reasons. Our implementation uses one Name / Status pair per row, which is much easier to read, parse, or sort.

One of our developers created a simple Python script that polls MySQL to get the current TokuDB engine status, compares the values to the last values read, and outputs the delta of the two. Pretty handy when trying to understand what the storage engine is up to. The script is named “tokustat.py”, but I alias it as tokutop.

The source code of the python script is available via this link. Because our engine status information is so well organized, it is only 86 lines of code (and could probably be much smaller).

I’d be interested to hear how others are reading and parsing the status of other engines, email me at [email protected].

0 0 votes
Article Rating
Subscribe
Notify of
guest

4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Joe
Joe
14 years ago

Hello,

To my understanding the InnoDB output is supposed to be read by humans. The same information (or a subset of it?) is also presented in the INFORMATION_SCHEMA database which is more suitable for machine parsing.

Cheers, Joe

Tim.Callaghan
Tim.Callaghan
14 years ago
Reply to  Joe

Joe,

I’ve looked around the information schema and saw some of the information in global_status, but significantly less than “show engine innodb status;” provides. Is more available?

-Tim

Mark Callaghan
14 years ago
Reply to  Tim.Callaghan

Many things are missing from SHOW STATUS, but that is getting better in recent 5.6 releases. The Facebook patch adds many of the missing values to SHOW STATUS.

Daniël van Eeden
14 years ago

What I do like in the output of SHOW ENGINE INNODB STATUS in MariaDB is that the size of the buffer pool is not only shown in a number of pages but also in the number of megabytes.

This is related an issue with the table_cache: some folks think that the value is in bytes, which isn’t true. This is why I created bugreport #58229.

So if it’s possible you should add a column to the SHOW ENGINE TOKUDB STATUS output with the corresponding units.

Far
Enough.

Said no pioneer ever.
MySQL, PostgreSQL, InnoDB, MariaDB, MongoDB and Kubernetes are trademarks for their respective owners.
© 2026 Percona All Rights Reserved