Optimization of my. ini in mysql database 2 GB memory for site-specific anti-DDoS settings

Source: Internet
Author: User
Mysql database my. ini optimization, 2 GB memory, for many sites, compression settings. You can refer.

Mysql database my. ini optimization, 2 GB memory, for many sites, compression settings. You can refer.

The larger the physical memory, the larger the setting. The default value is 2402, and the value is adjusted.
Innodb_additional_mem_pool_size = 4 M; default value: 2 M
Innodb_flush_log_at_trx_commit = 1
(If it is set to 0, innodb_log_buffer_size is stored after the queue is full. The default value is 1)
Innodb_log_buffer_size = 2 M; default value: 1 M
Innodb_thread_concurrency = 8 if you have a few CPUs on your server, set it to a few. We recommend that you use the default value of 8
Key_buffer_size = 256 M. The default value is 218 to 128.
Tmp_table_size = 64 M. The default value is 16 M and the value is adjusted to 64-256.
Read_buffer_size = 4 M. The default value is 64 K.
Read_rnd_buffer_size = 16 M. The default value is 256 K.
Sort_buffer_size = 32 M. The default value is 256 K.
Max_connections = 1024 the default value is 1210.
Thread_cache_size = 120 The default value is 60.
Query_cache_size = 64 M

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.