- Finalement, je me rends compte qu'il n'y a pas grand chose à faire pour un poste de dev à partir du moment où je ne laisse pas mon poste allumé tout le temps.
- A savoir que la plupart des variables sont à mettre dans [mysqld] pour qu'elles soient prises en compte.
- https://www.askapache.com/mysql/mysql-performance-tuning/
- Il faut un MySQL allumé et utilisé depuis longtemps pour avoir des recommandations pertinentes
- Ceci dit, quelques améliorations demandé par mysqltuner :
# sudo vim /etc/mysql/conf.d/perso.cnf
[mysqld]
key_buffer_size = 128M
query_cache_limit = 2048M
table_open_cache = 10000 # anciennement table_cache
tmp_table_size = 1024M
max_heap_table_size = 1024M
innodb_buffer_pool_size = 2048M
innodb_flush_log_at_trx_commit = 2 # permet d'écrire plus vite (dev)!
innodb_file_per_table = 1
# Mettre en commentaire log_error : sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf.
- Drush command terminated abnormally due to an unrecoverable error.
sudo vim /etc/security/limits.conf
-
soft nofile 10240
-
hard nofile 10240
sudo vim /lib/systemd/system/mysql.service
LimitNOFILE=infinity
reboot