Transferred from Linux commune
Here's how to confirm the number of links and threads for mariadb (like MySQL) here today. MARIADB and MySQL are different, and it's not clear yet.
This is an introduction to reducing the load on the database and improving the efficiency of the database.
Connection mariadb
# Mysql-uroot-penter Password:welcome to the MariaDB Monitor. Commands End With; or \g.your MariaDB connection ID is 1176Server version:5.5.41-mariadb-log MariaDB servercopyright (c) #, Oracle, MariaDB Corporation Ab and others. Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement. MariaDB [(None)]>
Maximum number of connections
MariaDB [(None)]> show global variables like ' max_connections '; +-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 151 |+-----------------+-------+1 row in Set (0.00 sec)
MARIADB number of cumulative connections after startup
MariaDB [(None)]> show global status like ' Connections '; +---------------+-------+| variable_name | Value |+---------------+-------+| Connections | 1190 |+---------------+-------+1 row in Set (0.00 sec)
MARIADB maximum number of simultaneous connections after startup
MariaDB [(None)]> show global status like ' max_used_connections '; +----------------------+-------+| Variable_name | Value |+----------------------+-------+| max_used_connections | 7 |+----------------------+-------+1 row in Set (0.00 sec)
MARIADB Thread Information
MariaDB [(None)]> show global status like ' thread_% '; +-------------------------+-------+| Variable_name | Value |+-------------------------+-------+| Threadpool_idle_threads | 0 | | Threadpool_threads | 0 | | threads_cached | 6 | | threads_connected | 1 | | threads_created | 7 | | Threads_running | 1 |+-------------------------+-------+6 rows in Set (0.01 sec)
- threads_cached: Number of alternate threads (threads are available for reuse)
- threads_connected: Number of connections now
- threads_created: A new thread is generated when a spare thread is not sufficient (this value is growing to indicate threads_cached is insufficient)
- Threads_running: A thread that is executing, or a thread that is not in the sleep state
threads_cached + threads_connected < thread_cache_size is the ideal state.
MariaDB [(None)]> show global variables like ' thread_cache_size '; + ——————-+ ——-+| Variable_name | Value |+ ——————-+ ——-+| Thread_cache_size | |+ ——————-+ ——-+1 row in Set (0.00 sec)
Summary
As can be seen from the above, the commands used on MySQL can also be used in mariadb basically.
Most importantly, MySQL logic and mariadb logic do not see what is different, see the difference may require more in-depth use of mariadb.
Linux System Tutorial: How to check the MARIADB server version http://www.linuxidc.com/Linux/2015-08/122382.htm
Realization of Read and write separation of MariaDB proxy http://www.linuxidc.com/Linux/2014-05/101306.htm
Linux compiler installation Configuration mariadb database method http://www.linuxidc.com/Linux/2014-11/109049.htm
The CentOS system uses Yum to install the MARIADB database http://www.linuxidc.com/Linux/2014-11/109048.htm
Install mariadb and MySQL coexist http://www.linuxidc.com/Linux/2014-11/109047.htm
How to migrate MySQL 5.5 database to MariaDB on Ubuntu http://www.linuxidc.com/Linux/2014-11/109471.htm
[Translate]ubuntu 14.04 (trusty) Server installation MariaDB http://www.linuxidc.com/Linux/2014-12/110048htm
MariaDB Details : please click here
MariaDB : please click here.
This article permanently updates the link address : http://www.linuxidc.com/Linux/2016-05/131027.htm
MARIADB Threads and connections