lunes, 1 de enero de 2018

setting memory usage mysql

  • If you have at least 1-2GB of memory and many tables and want maximum performance with a moderate number of clients, use something like this:
    shell> mysqld_safe --key_buffer_size=384M --table_open_cache=4000 \
               --sort_buffer_size=4M --read_buffer_size=1M &
  • If you have only 256MB of memory and only a few tables, but you still do a lot of sorting, you can use something like this:
    shell> mysqld_safe --key_buffer_size=64M --sort_buffer_size=1M
    If there are very many simultaneous connections, swapping problems may occur unless mysqld has been configured to use very little memory for each connection. mysqld performs better if you have enough memory for all connections.
  • With little memory and lots of connections, use something like this:
    shell> mysqld_safe --key_buffer_size=512K --sort_buffer_size=100K \ --read_buffer_size=100K &
/etc/my.cnf

No hay comentarios:

Publicar un comentario