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
Method 1: Use CSS overflow omission to solve The ...
Table of contents 1. Overview 2. Use docker to de...
1. Add PRIMARY KEY (primary key index) mysql>A...
Preface Recently, I have been busy writing a smal...
Preface Yesterday, there was a project that requi...
Introduction: This article takes the sample proje...
1. One-click installation of Mysql script [root@u...
Table of contents 1. Developer Platform Configura...
I was recently working on a project at the compan...
【question】 The INSERT statement is one of the mos...
Table of contents 1. Introduction to built-in obj...
The default varchar type in MySQL is case insensi...
In fact, this is also a clickbait title, and it c...
The principle of uploading pictures on the front ...
Preparation 1. Environmental Description: Operati...