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
1. CSS Miscellaneous Icons There are three ways t...
The code looks like this: SELECT @i:=@i+1 rowNum,...
Table of contents 1. Component bloat 2. Change th...
location expression type ~ indicates to perform a...
The method found on the Internet works The footer ...
When to install If you use the protoc command and...
In the previous article, we introduced the MySQL ...
1. The Importance of Indexes Indexes are used to ...
The a tag is mainly used to implement page jump, ...
Table of contents Various ways to merge objects (...
Sometimes our pages will need some prompt boxes o...
Table of contents 1. Embed CSS styles directly in...
describe: fuser can show which program is current...
<br />Related articles: Web skills: Multiple...
This article shares the specific code of Vue3 man...