PDA

View Full Version : Server load spikes...what causes this?


Kathy
Wed 7th May '03, 8:10pm
In the past hour the page of my site began to take longer and longer to load.

When I finally got to the pages, my server loads are higher than normal (Usually running around 1.-2....rarely even a 2)

there was a server load of 28.2, 11.24, and another I can't remember.

Now the server loads are:
4.13, 11.65, 7.24 138 users online (98 members & 40 guests).

1.04, 7.64, 6.34 133 users online (91 members & 42 guests).

what causes this? traffic surges? The traffic seems typical...its the server loads that concern me.

I see from the mysql info that the table cache is high...considering its usually less than 20% in use.

MySQL info:




6:13pm up 55 days, 8:32, 1 user, load average: 0.88, 4.55, 5.36
236 processes: 231 sleeping, 5 running, 0 zombie, 0 stopped
CPU0 states: 68.2% user, 3.1% system, 0.0% nice, 27.1% idle
CPU1 states: 22.1% user, 56.0% system, 0.0% nice, 21.0% idle
Mem: 1030496K av, 610512K used, 419984K free, 0K shrd, 6304K buff
Swap: 2096472K av, 64556K used, 2031916K free 317680K cached



Http processes currently running = 35
Mysql processes currently running = 151

Netstat information summary
1 CLOSE_WAIT
2 FIN_WAIT1
2 SYN_RECV
6 ESTABLISHED
42 LISTEN
257 TIME_WAIT


+---------------------------+-----------------+
| Variable_name | Value |
+---------------------------+-----------------+
| Aborted_clients | 1 |
| Aborted_connects | 0 |
| Bytes_received | 423929427 |
| Bytes_sent | 3705119741 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 394044 |
| 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 | 3529 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_insert | 6580 |
| Com_insert_select | 198 |
| 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 | 762 |
| Com_replace_select | 9 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_select | 1237783 |
| Com_set_option | 58 |
| Com_show_binlogs | 0 |
| Com_show_create | 58 |
| Com_show_databases | 0 |
| Com_show_fields | 58 |
| 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 | 15434 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 2 |
| Com_show_variables | 1 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 232147 |
| Connections | 81308 |
| Created_tmp_disk_tables | 634 |
| Created_tmp_tables | 17176 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 7451 |
| Handler_read_first | 1378 |
| Handler_read_key | 21482501 |
| Handler_read_next | 163629980 |
| Handler_read_prev | 0 |
| Handler_read_rnd | 10755152 |
| Handler_read_rnd_next | 443932520 |
| Handler_update | 233938 |
| Handler_write | 7614207 |
| Key_blocks_used | 15582 |
| Key_read_requests | 86646227 |
| Key_reads | 68971 |
| Key_write_requests | 78720 |
| Key_writes | 60017 |
| Max_used_connections | 304 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 709 | 69% of table_cache in use
| Open_files | 847 |
| Open_streams | 0 |
| Opened_tables | 717 |
| Questions | 1956515 |
| Select_full_join | 133 |
| Select_full_range_join | 0 |
| Select_range | 154766 |
| Select_range_check | 0 |
| Select_scan | 673019 |
| Slave_running | OFF |
| Slave_open_temp_tables | 0 |
| Slow_launch_threads | 0 |
| Slow_queries | 122 | (execution time > 10 secs)
| Sort_merge_passes | 0 |
| Sort_range | 198370 |
| Sort_rows | 12515729 |
| Sort_scan | 113588 |
| Table_locks_immediate | 1635479 |
| Table_locks_waited | 10435 |
| Threads_cached | 123 |
| Threads_created | 360 |
| Threads_connected | 21 |
| Threads_running | 1 |
| Uptime | 47318 | 13 hrs 8 mins 38 secs
+---------------------------+-----------------+


Key Reads/Key Read Requests = 0.000796 (Cache hit = 99.999204%)
Key Writes/Key Write Requests = 0.762411
Connections/second = 1.718 (/hour = 6185.993)
KB received/second = 8.749 (/hour = 31496.995)
KB sent/second = 44.320 (/hour = 159553.312)
Temporary Tables Created/second = 0.363 (/hour = 1306.767)
Opened Tables/second = 0.015 (/hour = 54.550)
Slow Queries/second = 0.003 (/hour = 9.282)
% of slow queries = 0.006%
Queries/second = 41.348 (/hour = 148853.586)

Raz Meister
Thu 8th May '03, 5:59pm
When your server load increases have a look at 'top'.

eva2000
Fri 9th May '03, 5:38am
happens now and again it could be you have a large thread with attachments being called by concurrent users.. or have a cron job doing something at the peak of the forum usage

as long as your server recovers from it, it should be fine