Preface By default, MySQL will initialize a large memory block to cache database query data. But my small host only has 640MB of memory, and top query found that it ate up 30% of my total memory, almost 200MB. But there are only a few MB of data in this database, and this setting feels unreasonable. After searching the article, I finally reduced the memory usage to 128MB Implementation Modify /etc/mysql/mysql.conf.d/mysqld.cnf directly Add the following configuration at the end of the configuration performance_schema_max_table_instances=150 table_definition_cache=150 table_open_cache=64 Then restart the service with service mysql restart Effect Before optimization After optimization The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: VMware and CentOS system installation method to reset the root password
>>: WeChat applet implements a simple calculator
Table of contents 1. The role of nginx process lo...
1. Priority of multiple servers For example, if e...
Table of contents 1. Schematic diagram of group q...
Table of contents Class Component Functional Comp...
Table of contents Purpose of Teleport How Telepor...
If you forget your MySQL login password, the solu...
Table of contents 1.union: You can add query resu...
Table of contents Purpose of the table For exampl...
1. Create a docker network card [root@i ~]# brctl...
This article shares the specific code for impleme...
Preface When we use query statements, we often ne...
Table of contents Immediately execute function fo...
The effect of this function is similar to vue的pro...
Table of contents 1. unzip command 1.1 Syntax 1.2...
as follows: docker run -d -p 5000:23 -p 5001:22 -...