0

I have a database with 25 M record in 42 tables(all tables is Myisam). When the number of users increases, the site is slowed down . pleas help me .

Server Config: Linux , Centos Ram : 30 GB CPU : 20 Core

my.cnf parameters:

[client] port = 3306 socket = /var/lib/mysql/mysql.sock

[mysqld] port = 3306 
socket = /var/lib/mysql/mysql.sock local-infile=0
 skip-locking skip-innodb
 wait_timeout=50
 max_connections=550 
query_cache_type=1
 query_cache_limit=1M 
interactive_timeout=50 
connect_timeout=10 
max_allowed_packet = 128M 
join_buffer=1M 
table_open_cache = 1024 
sort_buffer_size = 30M 
read_buffer_size = 30M 
read_rnd_buffer_size = 8M 
key_buffer_size = 6G 
bulk_insert_buffer_size = 256M 
myisam_sort_buffer_size = 246M 
myisam_max_sort_file_size = 4G 
myisam_repair_threads = 1 
myisam_recover thread_cache_size = 16 
query_cache_size = 960M
 max_connect_errors=10 
record_buffer=1M 
table_cache=2048 
thread_concurrency = 40 
log-bin=mysql-bin
 server-id = 1 

[safe_mysqld] err-log=/var/log/mysqld.log open_files_limit=65535 [mysqldump] quick max_allowed_packet = 128M

[mysql] no-auto-rehash

[myisamchk] key_buffer_size = 512M sort_buffer_size = 256M read_buffer = 16M write_buffer = 16M

[mysqlhotcopy] interactive-timeout

1 Answer 1

3

MyISAM. Say no more. The "table locks" are probably what causes the performance to decline as you get more 'users'.

Some tips on the conversion to InnoDB: http://mysql.rjweb.org/doc.php/myisam2innodb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.