[MDEV-15599] InnoDB operations significantly slower after upgrade to MariaDB 10x Created: 2018-03-19 Updated: 2019-01-28 Resolved: 2019-01-28 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Configuration |
| Affects Version/s: | 10.1.24, 10.2.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Lori Patrick | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
CentOS 6.5 and 7.3 |
||
| Attachments: |
|
| Description |
|
I recently upgraded my servers from 5.5.34 to 10x. For my hosts running CentOS 6x I went with 10.1.24 and hosts running CentOS 7x I went with 10.2.8. I have noticed a slow down in certain innodb operations on both 10.1.24 and 10.2.8. For example, I have a replication master that is running 5.5.34 and a delete operation took 20 seconds. When it replicated to the 10.2.8 slave, it took 70 seconds. Some additional details: • Both servers had been rebooted and all caches flushed. Are there any config settings in 10x I can tweak that address this kind of performance issue? |
| Comments |
| Comment by Alice Sherepa [ 2018-03-20 ] | ||||||||||||||||||||||
|
please add examples of the "slow" queries, EXPLAIN EXTENDED for those queries in 5.5 and 10.0 and you .cnf file(s) | ||||||||||||||||||||||
| Comment by Lori Patrick [ 2018-03-20 ] | ||||||||||||||||||||||
|
I can't do an explain on a delete operation on 5.5.34, but for the 10.2.8 server it would be: explain extended DELETE FROM audit_db_dropcopy.drop_copy_fill_events WHERE trade_date < "2017-03-20";
-----
----- I am attaching the 5.5.34 and 10.2.8 my.cnf(s) | ||||||||||||||||||||||
| Comment by Alice Sherepa [ 2018-03-20 ] | ||||||||||||||||||||||
|
please provide also output of SHOW CREATE TABLE audit_db_dropcopy.drop_copy_fill_events, so I will try to compare it on 5.5 and 10.2 | ||||||||||||||||||||||
| Comment by Lori Patrick [ 2018-03-20 ] | ||||||||||||||||||||||
|
CREATE TABLE `drop_copy_fill_events` ( | ||||||||||||||||||||||
| Comment by Alice Sherepa [ 2018-03-27 ] | ||||||||||||||||||||||
|
Is it possible for you to compare execution time of the query without replication? And please provide output of "free -m" and SHOW ENGINE INNODB STATUS \G | ||||||||||||||||||||||
| Comment by Lori Patrick [ 2018-03-27 ] | ||||||||||||||||||||||
|
I am not sure what you mean about without replication? When I noticed the problem, it ran it on each server with binary logging enabled, so those are time not thru replication but done locally on each host after a reboot without any other active threads. Do you need me to replicate in some other way? If you want me to get the engine status and free -m when the delete runs, I can grab that on Sat after I reboot. These are production hosts I can't reboot until the weekend. As of right this moment, the output of show engine innodb status \G is attached. free -m output from master: free -m output from slave: | ||||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-12-31 ] | ||||||||||||||||||||||
|
It looks like this one fell through the cracks, sorry about that. The very first thing that comes to mind looking at the table structure, the query and the plan, is that both 20 and 70 seconds sound very lucky for a table with ~14M rows and without an index to use. Was it comparative timing for this very query, or could it be a different one? Further, you didn't mention it, so just in case – is it certain that the structures and data are identical on both servers? Is it possible that the table on the master has less data or, for example, the table on the slave has a trigger which the master doesn't have (quite typical for slaves used for analytics)? Regarding replication, one of the concerns is that, given binlog_format=mixed in your config, the server can rather easily switch from the STATEMENT format to ROW (it might even be caused not by this particular query, but by something that happened earlier in the session). You said that both master and slave execute the delete operation, but you didn't say that you saw the slave execute the delete query, so we can't rule it out yet. It would mean that instead of one statement removing N rows, your slave would execute N statements removing 1 row. It might even be not a bad thing, given the presence of PK and absence of an index on trade_date column, but it would definitely affect execution time, for better or worse (depending on N). |