mysql - Website slow loading on VPS -
i have vps, centos 6 64bit directadmin + custombuild.
web server: apache reverse proxy nginx.
i hosting lot of websites on vps. when there lot of hits on website "example.com", website becoming extremely slow (can 50 seconds , more), others work perfect , fast.
i checked cpu , memory, there nothing weird.
i installed "mytop" monitoring database, , happened when there 20+- running queries.
my.cnf content:
[mysqld] max_allowed_packet=16m innodb_buffer_pool_size = 5096m innodb_buffer_pool_instances = 12 innodb_file_per_table = 1 innodb_log_file_size = 64m innodb_log_files_in_group = 2 innodb_log_buffer_size = 10m innodb_flush_log_at_trx_commit = 0 innodb_buffer_pool_load_at_startup = 1 innodb_log_buffer_size = 8 innodb_thread_concurrency = 12 innodb_flush_method = o_direct innodb_read_io_threads = 4 innodb_write_io_threads = 8 #max_connections = 800 #max_user_connections = 400 local-infile=0 max_connections=120 # interactive_timeout=300 join_buffer_size=512k key_buffer_size=64m query_cache_limit=4g tmp_table_size=1024m max_heap_table_size=512m # thread_cache_size=4 open_files_limit=50000 table_open_cache=3000 query_cache_type=1 query_cache_size=128m #
i dont know if mysql problem or apache , nginx problem.
the information give pretty sparse. should check general cpu usage , see applications use cpu. if other applications on server still performing have slow database queries. 20+ sounds pretty depending on call lots of hits. should analyse database queries running , how long take. maybe need add indexes. problem locks in database.
Comments
Post a Comment