Re: Queriey hangs on "Sending data" state on high traffic
Posted by: Anil Kumar
Date: June 22, 2012 08:49AM
Date: June 22, 2012 08:49AM
Thanks Aftab, for your response.
We have 3 MySQL servers and each having 16G RAM. One is master and and two are slaves, now we are planning to distribute read and writes on slaves and master respectively.
Please suggest what configuration I shoud put in my.cnf for high traffic site and all one thing more, all tables having InnoDB engine (pls specify global, buffer variables and max connections etc).
+-----------------------------------+--------------+
| Variable_name | Value |
+-----------------------------------+--------------+
| Aborted_clients | 14313 |
| Aborted_connects | 6 |
| Binlog_cache_disk_use | 910 |
| Binlog_cache_use | 8572981 |
| Bytes_received | 59259938633 |
| Bytes_sent | 285925580815 |
| Com_admin_commands | 3 |
| Com_alter_db | 0 |
| Com_alter_table | 5 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_call_procedure | 0 |
| Com_change_db | 2562574 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 3 |
| Com_create_table | 117 |
| Com_create_user | 0 |
| Com_dealloc_sql | 0 |
| Com_delete | 465078 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 4 |
| Com_drop_table | 0 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 1383312 |
| Com_insert_select | 3 |
| Com_kill | 628 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 20 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 2 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 5783933 |
| Com_replace_select | 1879 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 80096431 |
| Com_set_option | 5792377 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 7 |
| Com_show_charsets | 0 |
| Com_show_collations | 0 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 1895 |
| Com_show_databases | 58 |
| Com_show_errors | 0 |
| Com_show_fields | 2289385 |
| Com_show_grants | 3 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 18 |
| Com_show_logs | 0 |
| Com_show_master_status | 2 |
| Com_show_ndb_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 33207 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 462 |
| Com_show_status | 33116 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 104 |
| Com_show_triggers | 1015 |
| Com_show_variables | 41 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_fetch | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 20 |
| Com_update | 1552981 |
| Com_update_multi | 0 |
| Com_xa_commit | 0 |
| Com_xa_end | 0 |
| Com_xa_prepare | 0 |
| Com_xa_recover | 0 |
| Com_xa_rollback | 0 |
| Com_xa_start | 0 |
| Compression | OFF |
| Connections | 2563923 |
| Created_tmp_disk_tables | 10696743 |
| Created_tmp_files | 2778 |
| Created_tmp_tables | 16543703 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 17149652 |
| Handler_delete | 0 |
| Handler_discover | 0 |
| Handler_prepare | 17145962 |
| Handler_read_first | 7194921 |
| Handler_read_key | 10204753618 |
| Handler_read_next | 110684609948 |
| Handler_read_prev | 637415339 |
| Handler_read_rnd | 1282789733 |
| Handler_read_rnd_next | 13526982309 |
| Handler_rollback | 611386 |
| Handler_savepoint | 0 |
| Handler_savepoint_rollback | 0 |
| Handler_update | 75745258 |
| Handler_write | 7504905317 |
| Innodb_buffer_pool_pages_data | 517177 |
| Innodb_buffer_pool_pages_dirty | 866 |
| Innodb_buffer_pool_pages_flushed | 2255130 |
| Innodb_buffer_pool_pages_free | 1 |
| Innodb_buffer_pool_pages_misc | 7110 |
| Innodb_buffer_pool_pages_total | 524288 |
| Innodb_buffer_pool_read_ahead_rnd | 54301 |
| Innodb_buffer_pool_read_ahead_seq | 12011 |
| Innodb_buffer_pool_read_requests | 322251432394 |
| Innodb_buffer_pool_reads | 1393087 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 77572239 |
| Innodb_data_fsyncs | 603471 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 78860193792 |
| Innodb_data_reads | 1582526 |
| Innodb_data_writes | 2010748 |
| Innodb_data_written | 80933492224 |
| Innodb_dblwr_pages_written | 2255130 |
| Innodb_dblwr_writes | 46020 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 15844469 |
| Innodb_log_writes | 281988 |
| Innodb_os_log_fsyncs | 305635 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 7025281536 |
| Innodb_page_size | 16384 |
| Innodb_pages_created | 274471 |
| Innodb_pages_read | 4813111 |
| Innodb_pages_written | 2255130 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 442585 |
| Innodb_row_lock_time_avg | 334 |
| Innodb_row_lock_time_max | 56492 |
| Innodb_row_lock_waits | 1322 |
| Innodb_rows_deleted | 409009 |
| Innodb_rows_inserted | 7254898 |
| Innodb_rows_read | 124996353543 |
| Innodb_rows_updated | 1409460 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 107171 |
| Key_blocks_used | 34070 |
| Key_read_requests | 124995851 |
| Key_reads | 0 |
| Key_write_requests | 34511567 |
| Key_writes | 0 |
| Last_query_cost | 0.000000 |
| Max_used_connections | 665 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 11 |
| Open_streams | 0 |
| Open_tables | 512 |
| Opened_tables | 247726 |
| Prepared_stmt_count | 0 |
| Qcache_free_blocks | 65130 |
| Qcache_free_memory | 337048272 |
| Qcache_hits | 191029729 |
| Qcache_inserts | 34198679 |
| Qcache_lowmem_prunes | 3274391 |
| Qcache_not_cached | 48201965 |
| Qcache_queries_in_cache | 117221 |
| Qcache_total_blocks | 300189 |
| Queries | 293579910 |
| Questions | 293579910 |
| Rpl_status | NULL |
| Select_full_join | 268308 |
| Select_full_range_join | 82943 |
| Select_range | 7160624 |
| Select_range_check | 0 |
| Select_scan | 7568066 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 5524737 |
| Sort_merge_passes | 931 |
| Sort_range | 5317524 |
| Sort_rows | 27499677187 |
| Sort_scan | 13569316 |
| Ssl_accept_renegotiates | 0 |
| Ssl_accepts | 0 |
| Ssl_callback_cache_hits | 0 |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_ctx_verify_depth | 0 |
| Ssl_ctx_verify_mode | 0 |
| Ssl_default_timeout | 0 |
| Ssl_finished_accepts | 0 |
| Ssl_finished_connects | 0 |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_mode | NONE |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 0 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_sessions_reused | 0 |
| Ssl_used_session_cache_entries | 0 |
| Ssl_verify_depth | 0 |
| Ssl_verify_mode | 0 |
| Ssl_version | |
| Table_locks_immediate | 138027185 |
| Table_locks_waited | 1126 |
| Tc_log_max_pages_used | 0 |
| Tc_log_page_size | 0 |
| Tc_log_page_waits | 0 |
| Threads_cached | 505 |
| Threads_connected | 10 |
| Threads_created | 732 |
| Threads_running | 4 |
| Uptime | 276467 |
+-----------------------------------+--------------+
Waiting for your response.
We have 3 MySQL servers and each having 16G RAM. One is master and and two are slaves, now we are planning to distribute read and writes on slaves and master respectively.
Please suggest what configuration I shoud put in my.cnf for high traffic site and all one thing more, all tables having InnoDB engine (pls specify global, buffer variables and max connections etc).
+-----------------------------------+--------------+
| Variable_name | Value |
+-----------------------------------+--------------+
| Aborted_clients | 14313 |
| Aborted_connects | 6 |
| Binlog_cache_disk_use | 910 |
| Binlog_cache_use | 8572981 |
| Bytes_received | 59259938633 |
| Bytes_sent | 285925580815 |
| Com_admin_commands | 3 |
| Com_alter_db | 0 |
| Com_alter_table | 5 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_call_procedure | 0 |
| Com_change_db | 2562574 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_checksum | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 3 |
| Com_create_table | 117 |
| Com_create_user | 0 |
| Com_dealloc_sql | 0 |
| Com_delete | 465078 |
| Com_delete_multi | 0 |
| Com_do | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 4 |
| Com_drop_table | 0 |
| Com_drop_user | 0 |
| Com_execute_sql | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_help | 0 |
| Com_insert | 1383312 |
| Com_insert_select | 3 |
| Com_kill | 628 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 20 |
| Com_optimize | 0 |
| Com_preload_keys | 0 |
| Com_prepare_sql | 0 |
| Com_purge | 2 |
| Com_purge_before_date | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 5783933 |
| Com_replace_select | 1879 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_revoke_all | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 80096431 |
| Com_set_option | 5792377 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 7 |
| Com_show_charsets | 0 |
| Com_show_collations | 0 |
| Com_show_column_types | 0 |
| Com_show_create_db | 0 |
| Com_show_create_table | 1895 |
| Com_show_databases | 58 |
| Com_show_errors | 0 |
| Com_show_fields | 2289385 |
| Com_show_grants | 3 |
| Com_show_innodb_status | 0 |
| Com_show_keys | 18 |
| Com_show_logs | 0 |
| Com_show_master_status | 2 |
| Com_show_ndb_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_privileges | 0 |
| Com_show_processlist | 33207 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 462 |
| Com_show_status | 33116 |
| Com_show_storage_engines | 0 |
| Com_show_tables | 104 |
| Com_show_triggers | 1015 |
| Com_show_variables | 41 |
| Com_show_warnings | 0 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_stmt_close | 0 |
| Com_stmt_execute | 0 |
| Com_stmt_fetch | 0 |
| Com_stmt_prepare | 0 |
| Com_stmt_reset | 0 |
| Com_stmt_send_long_data | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 20 |
| Com_update | 1552981 |
| Com_update_multi | 0 |
| Com_xa_commit | 0 |
| Com_xa_end | 0 |
| Com_xa_prepare | 0 |
| Com_xa_recover | 0 |
| Com_xa_rollback | 0 |
| Com_xa_start | 0 |
| Compression | OFF |
| Connections | 2563923 |
| Created_tmp_disk_tables | 10696743 |
| Created_tmp_files | 2778 |
| Created_tmp_tables | 16543703 |
| Delayed_errors | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Flush_commands | 1 |
| Handler_commit | 17149652 |
| Handler_delete | 0 |
| Handler_discover | 0 |
| Handler_prepare | 17145962 |
| Handler_read_first | 7194921 |
| Handler_read_key | 10204753618 |
| Handler_read_next | 110684609948 |
| Handler_read_prev | 637415339 |
| Handler_read_rnd | 1282789733 |
| Handler_read_rnd_next | 13526982309 |
| Handler_rollback | 611386 |
| Handler_savepoint | 0 |
| Handler_savepoint_rollback | 0 |
| Handler_update | 75745258 |
| Handler_write | 7504905317 |
| Innodb_buffer_pool_pages_data | 517177 |
| Innodb_buffer_pool_pages_dirty | 866 |
| Innodb_buffer_pool_pages_flushed | 2255130 |
| Innodb_buffer_pool_pages_free | 1 |
| Innodb_buffer_pool_pages_misc | 7110 |
| Innodb_buffer_pool_pages_total | 524288 |
| Innodb_buffer_pool_read_ahead_rnd | 54301 |
| Innodb_buffer_pool_read_ahead_seq | 12011 |
| Innodb_buffer_pool_read_requests | 322251432394 |
| Innodb_buffer_pool_reads | 1393087 |
| Innodb_buffer_pool_wait_free | 0 |
| Innodb_buffer_pool_write_requests | 77572239 |
| Innodb_data_fsyncs | 603471 |
| Innodb_data_pending_fsyncs | 0 |
| Innodb_data_pending_reads | 0 |
| Innodb_data_pending_writes | 0 |
| Innodb_data_read | 78860193792 |
| Innodb_data_reads | 1582526 |
| Innodb_data_writes | 2010748 |
| Innodb_data_written | 80933492224 |
| Innodb_dblwr_pages_written | 2255130 |
| Innodb_dblwr_writes | 46020 |
| Innodb_log_waits | 0 |
| Innodb_log_write_requests | 15844469 |
| Innodb_log_writes | 281988 |
| Innodb_os_log_fsyncs | 305635 |
| Innodb_os_log_pending_fsyncs | 0 |
| Innodb_os_log_pending_writes | 0 |
| Innodb_os_log_written | 7025281536 |
| Innodb_page_size | 16384 |
| Innodb_pages_created | 274471 |
| Innodb_pages_read | 4813111 |
| Innodb_pages_written | 2255130 |
| Innodb_row_lock_current_waits | 0 |
| Innodb_row_lock_time | 442585 |
| Innodb_row_lock_time_avg | 334 |
| Innodb_row_lock_time_max | 56492 |
| Innodb_row_lock_waits | 1322 |
| Innodb_rows_deleted | 409009 |
| Innodb_rows_inserted | 7254898 |
| Innodb_rows_read | 124996353543 |
| Innodb_rows_updated | 1409460 |
| Key_blocks_not_flushed | 0 |
| Key_blocks_unused | 107171 |
| Key_blocks_used | 34070 |
| Key_read_requests | 124995851 |
| Key_reads | 0 |
| Key_write_requests | 34511567 |
| Key_writes | 0 |
| Last_query_cost | 0.000000 |
| Max_used_connections | 665 |
| Not_flushed_delayed_rows | 0 |
| Open_files | 11 |
| Open_streams | 0 |
| Open_tables | 512 |
| Opened_tables | 247726 |
| Prepared_stmt_count | 0 |
| Qcache_free_blocks | 65130 |
| Qcache_free_memory | 337048272 |
| Qcache_hits | 191029729 |
| Qcache_inserts | 34198679 |
| Qcache_lowmem_prunes | 3274391 |
| Qcache_not_cached | 48201965 |
| Qcache_queries_in_cache | 117221 |
| Qcache_total_blocks | 300189 |
| Queries | 293579910 |
| Questions | 293579910 |
| Rpl_status | NULL |
| Select_full_join | 268308 |
| Select_full_range_join | 82943 |
| Select_range | 7160624 |
| Select_range_check | 0 |
| Select_scan | 7568066 |
| Slave_open_temp_tables | 0 |
| Slave_retried_transactions | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 5524737 |
| Sort_merge_passes | 931 |
| Sort_range | 5317524 |
| Sort_rows | 27499677187 |
| Sort_scan | 13569316 |
| Ssl_accept_renegotiates | 0 |
| Ssl_accepts | 0 |
| Ssl_callback_cache_hits | 0 |
| Ssl_cipher | |
| Ssl_cipher_list | |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_ctx_verify_depth | 0 |
| Ssl_ctx_verify_mode | 0 |
| Ssl_default_timeout | 0 |
| Ssl_finished_accepts | 0 |
| Ssl_finished_connects | 0 |
| Ssl_session_cache_hits | 0 |
| Ssl_session_cache_misses | 0 |
| Ssl_session_cache_mode | NONE |
| Ssl_session_cache_overflows | 0 |
| Ssl_session_cache_size | 0 |
| Ssl_session_cache_timeouts | 0 |
| Ssl_sessions_reused | 0 |
| Ssl_used_session_cache_entries | 0 |
| Ssl_verify_depth | 0 |
| Ssl_verify_mode | 0 |
| Ssl_version | |
| Table_locks_immediate | 138027185 |
| Table_locks_waited | 1126 |
| Tc_log_max_pages_used | 0 |
| Tc_log_page_size | 0 |
| Tc_log_page_waits | 0 |
| Threads_cached | 505 |
| Threads_connected | 10 |
| Threads_created | 732 |
| Threads_running | 4 |
| Uptime | 276467 |
+-----------------------------------+--------------+
Waiting for your response.
Subject
Views
Written By
Posted
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.