Log in

View Full Version : Mysql loads high 10 queries per second any suggestions?


BamaStangGuy
10-18-2004, 05:08 PM
Thu Oct 7 16:27:16 CDT 2004

16:27:17 up 143 days, 14:49, 3 users, load average: 0.18, 0.29,
0.35
87 processes: 86 sleeping, 1 running, 0 zombie, 0 stopped
total 32.6% 0.0% 1.9% 0.0% 0.0% 0.0%
65.3%
Mem: 503844k av, 490948k used, 12896k free, 0k shrd,
13892k
buff
303320k actv, 2816k in_d, 6884k in_c
Swap: 2048276k av, 45680k used, 2002596k free
219244k
cached


Http processes currently running = 32
Mysql processes currently running = 4

Netstat information summary
1 ESTABLISHED
19 LISTEN
91 TIME_WAIT

+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| Aborted_clients | 0 |
| Aborted_connects | 4 |
| Bytes_received | 16651251 |
| Bytes_sent | 849888242 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 6774 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 0 |
| Com_delete | 583 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_insert | 1105 |
| Com_insert_select | 23 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 0 |
| Com_purge | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 245 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_select | 49021 |
| Com_set_option | 0 |
| Com_show_binlogs | 0 |
| Com_show_create | 0 |
| Com_show_databases | 0 |
| Com_show_fields | 0 |
| Com_show_grants | 0 |
| Com_show_keys | 0 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_open_tables | 0 |
| Com_show_processlist | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 0 |
| Com_show_variables | 1 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 7279 |
| Connections | 7045 |
| Created_tmp_disk_tables | 180 |
| Created_tmp_tables | 2134 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 904 |
| Handler_read_first | 9923 |
| Handler_read_key | 1490452 |
| Handler_read_next | 13176844 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 132267 |
| Handler_read_rnd_next | 136157493 |
| Handler_update | 15325 |
| Handler_write | 62761 |
| Key_blocks_used | 7793 |
| Key_read_requests | 4190622 |
| Key_reads | 28923 |
| Key_write_requests | 7509 |
| Key_writes | 4633 |
| Max_used_connections | 83 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 64 | 100% of table_cache in use
| Open_files | 124 |
| Open_streams | 0 |
| Opened_tables | 6132 |
| Questions | 72071 |
| Select_full_join | 169 |
| Select_full_range_join | 300 |
| Select_range | 12749 |
| Select_range_check | 0 |
| Select_scan | 8754 |
| Slave_running | OFF |
| Slave_open_temp_tables | 0 |
| Slow_launch_threads | 0 |
| Slow_queries | 1 | (execution time > 10 secs)
| Sort_merge_passes | 0 |
| Sort_range | 4839 |
| Sort_rows | 1057060 |
| Sort_scan | 2494 |
| Table_locks_immediate | 92302 |
| Table_locks_waited | 63 |
| Threads_cached | 0 |
| Threads_created | 7044 |
| Threads_connected | 1 |
| Threads_running | 1 |
| Uptime | 6872 | 1 hr 54 mins 32 secs
+--------------------------+-----------+


Key Reads/Key Read Requests = 0.006902 (Cache hit = 99.993098%)
Key Writes/Key Write Requests = 0.616993
Connections/second = 1.025 (/hour = 3690.629)
KB received/second = 2.366 (/hour = 8518.044)
KB sent/second = 120.775 (/hour = 434791.153)
Temporary Tables Created/second = 0.311 (/hour = 1117.928)
Opened Tables/second = 0.892 (/hour = 3212.340)
Slow Queries/second = 0.000 (/hour = 0.524)
% of slow queries = 0.001%
Queries/second = 10.488 (/hour = 37755.471)


During our investigation, we found that there are currently around 11
queries running per second for mysql server (/hour = 37755.471), which
is
a quite high value. We do suggest you to optimize your mysql server
configuration. You may refer to following URL for more information on
how
to do so : http://dev.mysql.com/doc/mysql/en/MySQL_Optimization.html.
Please check the same at your end and confirm, let me know if you have
any
more questions.


I sent in a trouble ticket to my server because my site was loading extremely slow. It was just the forum. This is what they sent to me. I dont know what I would need to do to get that down. I read through that link at the bottom but I still dont quite understand it.

What should I do?

Colin F
10-18-2004, 05:11 PM
I suggest posting in this forum (http://www.vbulletin.com/forum/forumdisplay.php?f=14) at vbulletin.com with the information in this thread (http://www.vbulletin.com/forum/showthread.php?t=70117).

George should then see the thread and be able to help you, he's the guru for server optimisation :)

BamaStangGuy
10-18-2004, 06:14 PM
Thanks