Notes on Performance Optimization of php and mysql tutorials
The larger tmp_table_size = 200 m tmp_table_size, the smaller the probability of being converted to disk tmp table
Php program page mysql closed in time
Set mysql timeout
Low-priority-updates
Tmp_table_size = 200 m; larger memory usage
Low_priority_updates = no; set the read priority
Wait_timeout = 10; about 10 seconds.
Table_cache = 1024; the larger the physical memory, the larger the setting. The default value is 2402. The optimal value is adjusted to 512-1024.
Key_buffer_size = 1024 m;
Sort_buffer_size = 256 m;
Read_buffer_size = 1024 m;
Join_buffer_size = 512 m;
Read_rnd_buffer_size = 1024 m; sort by user order
Max-seeks-for-key = 1000; limit keyword scan does not exceed 1,000 keyword searches
According to General mysql memory computing companies:
1) used by the system. Assume that 800 m is reserved;
2) Exclusive thread, about 4.5 gb = 151*(10 m + 10 m + 5 m + 5 m + 512 k), the composition is roughly as follows:
Sort_buffer_size: 10 m
Join_buffer_size: 10 m
Read_buffer_size: 5 m
Read_rnd_buffer_size: 5 m
Thread_stack: 512kb
3) myisam key cache
Key_buffer_size 2.4g
4) innodb buffer pool: Ignore. Currently, the innodb Storage engine table does not exist.
The number of mysql connections per cpu should not exceed 300