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
inline-flex is the same as inline-block. It is a ...
The fixed IP address of the centos-DVD1 version s...
Preface Recently I encountered a requirement, whi...
On Saturday, the redis server on the production s...
After IntelliJ IDEA deploys a Javaweb project usi...
The docker image id is unique and can physically ...
Preface Execute the show create table <tablena...
Excel is the most commonly used tool for data ana...
The first time I wrote a MySQL FUNCTION, I kept g...
1. Enable Prometheus telemetry data By default, t...
Exposing network ports In fact, there are two par...
I recently used the ssm framework when doing a pr...
1. Warm and gentle Related address: http://www.web...
This article shares the installation and activati...
Sometimes you need to debug remotely in a server ...