Skip to main content

Help with my.cnf

Comments

6 comments

  • Motasem
    [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock skip-external-locking join_buffer_size = 2M max_heap_table_size = 256M tmp_table_size = 256M key_buffer_size = 128M max_allowed_packet = 1M table_open_cache = 512 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size= 16M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL #safe-updates [myisamchk] key_buffer_size = 128M sort_buffer_size = 128M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout
    0
  • cPanelMichael
    Hello :) I suggest running a MySQL tuning script after letting MySQL run for at least 24 hours to see if it recommends any specific changes. This thread should help you get started:
    0
  • Motasem
    hi, this is my result General recommendations: Run OPTIMIZE TABLE to defragment tables for better performance MySQL started within last 24 hours - recommendations may be inaccurate Reduce your overall MySQL memory footprint for system stability Enable the slow query log to troubleshoot bad queries When making adjustments, make tmp_table_size/max_heap_table_size equal Reduce your SELECT DISTINCT queries without LIMIT clauses Increase table_open_cache gradually to avoid file descriptor limits Read this before increasing table_open_cache over 64:
    0
  • Motasem
    my vps ram: 6 GB cpu: 2 core my hard disk boost SSD
    0
  • Motasem
    my current sittings [mysqld] datadir=/var/lib/mysql port = 3306 socket=/var/lib/mysql/mysql.sock query_cache_limit=128M query_cache_size=192M ## ## 32MB for every 1GB of RAM query_cache_type=1 tmp_table_size=32M max_heap_table_size= 10M max_user_connections=300 max_connections=300 max_allowed_packet=128M interactive_timeout=600 wait_timeout=600 connect_timeout=10 thread_cache_size=40 table_open_cache=1000 key_buffer=256M ## 128MB for every 1GB of RAM join_buffer_size=2M sort_buffer_size=6M ## 1MB for every 1GB of RAM read_buffer_size=6M ## 1MB for every 1GB of RAM read_rnd_buffer_size=6M ## 1MB for every 1GB of RAM thread_concurrency=4 ## Number of CPUs x 2 myisam_sort_buffer_size=64M [mysql.server] user=mysql [safe_mysqld] log-error= /var/log/mysql_error_log pid-file=/var/lib/mysql/mysql.pid open_files_limit=5000 [mysqldump] quick max_allowed_packet=128M [mysql] no-auto-rehash [myisamchk] key_buffer=20M sort_buffer=20M read_buffer=20M write_buffer=20M [mysqlhotcopy] interactive-timeout
    0
  • cPanelMichael
    MySQL started within last 24 hours - recommendations may be inaccurate

    Please ensure you let MySQL run for at least 24 hours before running the tuner to ensure accurate results. Thank you.
    0

Please sign in to leave a comment.