[급질문] 좋은 서버로 이전 후 mysqld 데몬 과부하... 채택완료
안녕하세요? 운영하는 사이트에 문제가 생겨 질문 요청드립니다.
전에 4코어에 8GB 램 가상서버에서 사이트를 잘 운영을 해왔었습니다.
그러던 중 동시접속자가 많이 늘어서 단독서버 24코어 32GB 램 서버로 이사를 했습니다.
하드웨어 RAID 로 하드 8개도 묶어놨고요. 이전보다 훨씬 성능이 우수한 서버로 이전을 했는데,
전 서버의 접속량 절반만 들어와도 mysqld 데몬의 CPU 사용량이 1800% 를 넘어가면서
사이트 접속이 마비 됩니다. 서버 이전시 똑같은 OS 버젼에 아파치,PHP,MYSQL 버젼 및 세팅까지
똑같이 해서 덤프 떠서 옮긴 겁니다. 참고로 InnoDB 방식 입니다.
Mysqld 데몬이 저럴때 재시작 해주면 5분 정도 버티다가 다시 1800% 이상 치솟습니다.
Mysql이 다운되지는 않는데 계속 저렇게 CPU 과부하만 걸리고 접속이 전혀 안됩니다.
PHP 코드 하나 건든것도 없는데 대체 뭔 일인지 모르겠습니다.
혹시 몰라 제가 서버 이전하면서 유일하게 만진 my.cnf 파일 첨부 합니다.
모든 테이블 InnoDB에 32GB 램인데 세팅값에 이상은 없는지 한번 살펴봐주시면 감사하겠습니다.
----------------------------------------------------------------------------------
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 init_connect = SET collation_connection = utf8_general_ci init_connect = SET NAMES utf8 character-set-server = utf8 collation-server = utf8_general_ci skip_name_resolve default-storage-engine=InnoDB max_connections = 1024 max_connect_errors = 10 table_open_cache = 2048 #external-locking max_allowed_packet = 16M binlog_cache_size = 1M max_heap_table_size = 64M read_buffer_size = 2M read_rnd_buffer_size = 16M sort_buffer_size = 8M join_buffer_size = 8M thread_cache_size = 8 thread_concurrency = 8 query_cache_size = 128M query_cache_limit = 10M ft_min_word_len = 4 #memlock thread_stack = 192K transaction_isolation = REPEATABLE-READ tmp_table_size = 64M log-bin=mysql-bin binlog_format=mixed #log_slave_updates #log #log_warnings slow_query_log = 1 slow_query_log_file=mysql-slow.log long_query_time = 3 server-id = 1 binlog_cache_size = 1M # binlog cache 사이즈 max_binlog_size = 500M # bin로그 maximum 사이즈 expire_logs_days = 3 # 로그 만료기간 key_buffer_size = 32M bulk_insert_buffer_size = 64M myisam_sort_buffer_size = 128M myisam_max_sort_file_size = 10G myisam_repair_threads = 1 innodb_additional_mem_pool_size = 16M innodb_buffer_pool_size = 16G innodb_data_file_path = ibdata1:1000M:autoextend innodb_file_io_threads = 4 #innodb_force_recovery=1 innodb_thread_concurrency = 16 innodb_flush_log_at_trx_commit = 2 #innodb_fast_shutdown innodb_log_buffer_size = 8M innodb_log_file_size = 256M innodb_log_files_in_group = 3 #innodb_log_group_home_dir innodb_max_dirty_pages_pct = 90 #innodb_flush_method=O_DSYNC innodb_lock_wait_timeout = 120
[mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
[client] default-character-set = utf8
[mysqldump] default-character-set = utf8
[mysql] default-character-set = utf8
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인