In my previous post about InnoDB Stalls on Empty Free List, I used a test environment that might look a little artificial : a table larger than the InnoDB Buffer Pool but fitting in the Linux Page Cache. This configuration allows serving very quickly what MySQL thinks are IOs because these are hit in the filesystem cache. In this post, I explain why this environment is not
If, in Percona Server, you are observing tail latencies on queries that should be fast, this might be a side effect of Percona's improved InnoDB Empty Free List Algorithm. When using this algorithm (the default in 5.6 and 5.7 and optional configuration in 8.0), a query needing a free page while none are available waits until the LRU Manager Thread refills the free list. Because this
The Primary key is like the hero of a row, which has more beneficial features in the table while performing any task on the table.
The DBA knows the importance of the primary key in the table and how to handle it.
[Read more]At Percona Managed Services, sometimes clients’ applications face deadlock situations and need all historic deadlock information for application tuning.
We could get the LATEST DETECTED DEADLOCK from SHOW ENGINE INNODB STATUS\G:
…. ------------------------ LATEST DETECTED DEADLOCK ------------------------ *** (1) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 163 page no 3 n bits 72 index GEN_CLUST_INDEX of table `deadlock_test`.`t` trx id 78507 lock_mode X waiting *** (2) TRANSACTION: TRANSACTION 78508, ACTIVE 155 sec starting index read mysql tables in use 1, locked 1 ….
But how could we view all past deadlock information?
We could enable innodb_print_all_deadlocks, and all deadlocks in InnoDB user transactions will be recorded in the MySQL error log.
Let‘s start the test.
Create the test database …
[Read more]We’re ecstatic and energised about the prospect of sowing seeds of knowledge in our opensource database community.
Thank you to everyone who joined us for the 17th edition of MyWebinar. We hope that our time together helped to elevate and seam your work to perfection. We’re committed to giving back to the opensource database community in the coming days by presenting more LIVE events.
Maha Lakshmi Ganapathineedi from Mydbops was successful in making this event more interactive, engaging, and, most importantly, productive for the audience. Thank you for your continuous contribution to the opensource community.
Topic: Redo …
[Read more]MySQL 8.0.30 was released on 26-07-2022. It has a good list of features.
- Generated Invisible Primary Key
- Dynamic Redo log Sizing
- Instruments to monitor group replication memory
- Support for Ubuntu 22.04
A most notable feature for Database Administrators and database reliability engineers is Dynamic redo logging.
The more widely adopted open-source backup tool is Xtrabackup. The change in the redo log design has affected this hot backup tool.
2022-10-04T18:40:08.211998+05:30 0 [Note] [MY-011825] [Xtrabackup] recognized server arguments: --datadir=/var/lib/mysql
2022-10-04T18:40:08.212264+05:30 0 [Note] [MY-011825] [Xtrabackup] recognized client arguments: …
[Read more]
This is one of the exciting troubleshooting related to XA transactions let’s dive in. Let me provide a few backgrounds.
For one of our clients, when we try to drop a table, it is waiting for metadata lock. On debugging it is one of the XA transactions is holding the shared write lock and causing metadata lock on all the other local transactions.
Let us view the metadata locks from the Performance Schema.
mysql> select OBJECT_TYPE,OBJECT_SCHEMA,OBJECT_NAME,
LOCK_TYPE,LOCK_STATUS,SOURCE from
performance_schema.metadata_locks\G |
A large table is a pain for many reasons as long as it is in a system. And as if that’s not enough, it is also a difficult task to get rid of it. In this post, we will understand why it is a pain to do this operation and what we can do about it. It will be like asking the table “Tell me what happened and I will ease up the eviction”.
So what happened? When a table is dropped (or truncated), InnoDB has to scan the pages throughout the buffer pool and remove all those belonging to that table. For a large buffer pool, this crawling in the buffer pool pages and eviction process will be slower. When we say “scan buffer pool”, it mainly looks for “LRU”, “FLUSH” (Dirty pages), and “AHI” entries.
LRU: Buffer pool pages are stored in a linked list of pages in order of usage. As the data reaches the end of the list, it is evicted to make space for new data. When the room is needed to add …
[Read more]Since 8.0.30, you have the possibility to modify the InnoDB Redo Log Capacity online. An undersized Redo Log Capacity is problematic and lead to performance issues.
However, it’s not recommended to oversize the Redo Log either.
Redo Log files consume disk space and increases the recovery time
in case of a restart (innodb_fast_shutdown=1
) or a
sudden crash. And it also slows down shutdown when
innodb_fast_shutdown=0
.
This means that now, you don’t need to restart MySQL if you want to increase or decrease the size of the InnoDB Redo Logs files. In fact, we don’t talk anymore about file size but about capacity ! The DBA doesn’t need to specify any file size and/or amount of files for Redo Logs anymore …
[Read more]In this blog, I will demonstrate how to use Percona Monitoring and Management (PMM) to find out the reason why the MySQL server is stalling. I will use only one typical situation for the MySQL server stall in this example, but the same dashboards, graphs, and principles will help you in all other cases.
Nobody wants it but database servers may stop handling connections at some point. As a result, the application will slow down and then will stop responding.
It is always better to know about the stall from a monitoring instrument rather than from your own customers.
PMM is a great help in this case. If you look at its graphs and notice that many of them started showing unusual behavior, you need to react. In the case of stalls, you will see that either some activity went to 0 or, otherwise, it increased to high …
[Read more]