PDA

View Full Version : Optimization Request.


d3f
Tue 26th Oct '04, 11:29pm
Been running this setup for awhile, other then the addition of 512 MB's of ram today (reason why the uptime stats our short) I have been expirencing random spikes, where the load goes above 2 and stay's there for an hour or two.

*edit* server is down atm, had no contact with the host as of yet looks like someone desided to dos us or something.

1. Dedicated

2.

Athlon XP 2400+
1024MB of Ram
80GB EIDE non Raid
Redhat 9
Apache 1.3.32
MySql 4.0.21
PHP 4.3.9

3. Not using InnoDB

4. Default Direct Admin Package.

5. 20:10:15 up 2:13, 1 user, load average: 0.22, 0.53, 0.66
192 processes: 189 sleeping, 2 running, 1 zombie, 0 stopped
CPU states: 17.9% user 5.5% system 0.0% nice 0.0% iowait 76.4% idle
Mem: 1014780k av, 511476k used, 503304k free, 0k shrd, 34164k buff
399576k actv, 36376k in_d, 32460k in_c
Swap: 1012084k av, 0k used, 1012084k free 166048k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
11372 blacknex 21 0 0 0 0 Z 1.1 0.0 0:00 0 perlgcache.cg
3847 apache 15 0 16924 16M 11300 S 0.3 1.6 0:00 0 httpd
1419 apache 15 0 18304 17M 12496 S 0.1 1.8 0:02 0 httpd
1451 apache 15 0 18068 17M 12516 S 0.1 1.7 0:02 0 httpd
1457 apache 15 0 18916 18M 13072 S 0.1 1.8 0:02 0 httpd
1657 apache 15 0 18064 17M 11668 S 0.1 1.7 0:02 0 httpd
6445 apache 15 0 15736 15M 10436 S 0.1 1.5 0:00 0 httpd
8287 apache 15 0 14616 14M 9716 S 0.1 1.4 0:00 0 httpd
11147 apache 15 0 16348 15M 10740 S 0.1 1.6 0:00 0 httpd
11250 methlabs 15 0 1272 1272 856 R 0.1 0.1 0:00 0 top
1 root 15 0 472 472 420 S 0.0 0.0 0:03 0 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd_CPU
9 root 25 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
5 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kswapd.

6. No my.cnf in /etc/ so I assume its running off default settings.

7. Tue Oct 26 21:15:44 CDT 2004


21:15:45 up 3:18, 0 users, load average: 0.84, 0.82, 0.79
209 processes: 207 sleeping, 1 running, 1 zombie, 0 stopped
Mem: 1014780k av, 551668k used, 463112k free, 0k shrd, 36116k buff
432636k actv, 44796k in_d, 29236k in_c
Swap: 1012084k av, 0k used, 1012084k free 188268k cached



Http processes currently running = 143
Mysql processes currently running = 13

Netstat information summary
2 CLOSING
5 LAST_ACK
12 SYN_RECV
14 FIN_WAIT2
21 LISTEN
26 FIN_WAIT1
125 ESTABLISHED
294 TIME_WAIT

+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| Aborted_clients | 0 |
| Aborted_connects | 40 |
| Bytes_received | 12569714 |
| Bytes_sent | 606343549 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 3211 |
| 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 | 219 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 1177 |
| Com_insert_select | 44 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 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 | 169 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 33025 |
| Com_set_option | 0 |
| Com_show_binlog_events | 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_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_processlist | 0 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 1 |
| Com_show_variables | 1 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 4108 |
| Connections | 3082 |
| Created_tmp_disk_tables | 354 |
| Created_tmp_tables | 1039 |
| Created_tmp_files | 3 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 392 |
| Handler_read_first | 6916 |
| Handler_read_key | 506600 |
| Handler_read_next | 237749 |
| Handler_read_prev | 196446 |
| Handler_read_rnd | 112180 |
| Handler_read_rnd_next | 6013821 |
| Handler_rollback | 0 |
| Handler_update | 4995 |
| Handler_write | 116358 |
| Key_blocks_used | 4543 |
| Key_read_requests | 1188437 |
| Key_reads | 2831 |
| Key_write_requests | 95202 |
| Key_writes | 2975 |
| Max_used_connections | 3 |
| 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 | 260 |
| Questions | 44996 |
| Qcache_queries_in_cache | 0 |
| Qcache_inserts | 0 |
| Qcache_hits | 0 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 0 |
| Qcache_free_memory | 0 |
| Qcache_free_blocks | 0 |
| Qcache_total_blocks | 0 |
| Rpl_status | NULL |
| Select_full_join | 18 |
| Select_full_range_join | 0 |
| Select_range | 7961 |
| Select_range_check | 0 |
| Select_scan | 6651 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 0 | (execution time > 10 secs)
| Sort_merge_passes | 0 |
| Sort_range | 1583 |
| Sort_rows | 2295427 |
| Sort_scan | 3057 |
| Table_locks_immediate | 58721 |
| Table_locks_waited | 7 |
| Threads_cached | 0 |
| Threads_created | 3081 |
| Threads_connected | 1 |
| Threads_running | 1 |
| Uptime | 11820 | 3 hrs 17 mins 0 sec
+--------------------------+-----------+


Key Reads/Key Read Requests = 0.002382 (Cache hit = 99.997618%)
Key Writes/Key Write Requests = 0.031249
Connections/second = 0.261 (/hour = 938.680)
KB received/second = 1.038 (/hour = 3738.579)
KB sent/second = 50.096 (/hour = 180344.772)
Temporary Tables Created/second = 0.088 (/hour = 316.447)
Opened Tables/second = 0.022 (/hour = 79.188)
Slow Queries/second = 0.000 (/hour = 0.000)
% of slow queries = 0.000%
Queries/second = 3.807 (/hour = 13704.365)

8. Just VB and static HTML site.

9. Avg 40-50 Max 100 or so Cookie Timeout = 1800

10. http://www.methlabs.org/info.php

11. Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 5
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 450
MaxRequestsPerChild 1000

12. VB 3.0.3

eva2000
Wed 27th Oct '04, 11:04am
1. reduce httpd.conf's maxclients from 450 to 150 and restart apache
2. backup existing /etc/my.cnf if it exists then replace with following below


[mysqld]
skip-innodb
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M


and restart mysql after

3. i can't load your info.php link so can't see if you already installed Turck Mmcache - if you haven't do so http://www.vbulletin.com/forum/showthread.php?t=75878 and remove zend optimiser if it's loaded (in php.ini)