PDA

View Full Version : Server Optimization Request


reverof
Wed 2nd Mar '05, 3:07pm
Dedicated server - private server
92K+ members
179K+ posts, 28K+ threads

Dual:
Vendor: GenuineIntel
Name: Intel(R) Xeon(TM) CPU 2.80GHz
speed: 2799.266 MHz
cache size: 512 KB
3gb RAM
2x120GB ATA non-raid
Linux - Red Hat
Apache 1.3.33
PHP Version 4.3.10
4.0.23-standard

12:46:12 up 10:36, 2 users, load average: 0.89, 1.01, 1.04
411 processes: 409 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 24.8% 0.0% 1.7% 0.0% 0.3% 0.2% 72.7%
cpu00 20.2% 0.0% 1.9% 0.0% 1.1% 0.3% 76.1%
cpu01 31.2% 0.0% 1.1% 0.0% 0.0% 0.0% 67.5%
cpu02 20.0% 0.0% 1.9% 0.0% 0.0% 0.3% 77.5%
cpu03 27.9% 0.0% 1.7% 0.0% 0.1% 0.1% 69.8%
Mem: 3081928k av, 2907868k used, 174060k free, 0k shrd, 286416k buff
1492756k actv, 1004104k in_d, 45592k in_c
Swap: 2040212k av, 0k used, 2040212k free 1594704k cached


my.cnf:
[mysqld]
safe-show-database
skip-innodb
max_connections = 650
key_buffer = 96M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 128
wait_timeout = 7200
connect_timeout = 10
tmp_table_size = 128M
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 4M
query_cache_size = 128M
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


Extended-status:
+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 8 |
| Aborted_connects | 0 |
| Bytes_received | 584311876 |
| Bytes_sent | 3751587436 |
| Com_admin_commands | 194508 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 92992 |
| 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 | 7191 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 0 |
| Com_flush | 2 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 47965 |
| Com_insert_select | 144 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 65 |
| Com_optimize | 0 |
| Com_purge | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 3436 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 872687 |
| Com_set_option | 1 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 1 |
| Com_show_create | 0 |
| Com_show_databases | 4 |
| Com_show_fields | 1 |
| Com_show_grants | 2 |
| 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 | 127 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 25 |
| Com_show_variables | 11 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 65 |
| Com_update | 577073 |
| Connections | 100464 |
| Created_tmp_disk_tables | 201995 |
| Created_tmp_tables | 244127 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 17112 |
| Handler_read_first | 129021 |
| Handler_read_key | 52803318 |
| Handler_read_next | 22812050 |
| Handler_read_prev | 471472 |
| Handler_read_rnd | 33269133 |
| Handler_read_rnd_next | 142337773 |
| Handler_rollback | 0 |
| Handler_update | 580750 |
| Handler_write | 31705997 |
| Key_blocks_used | 93763 |
| Key_read_requests | 152920180 |
| Key_reads | 32785 |
| Key_write_requests | 301873 |
| Key_writes | 80411 |
| Max_used_connections | 211 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 199 |
| Open_files | 291 |
| Open_streams | 0 |
| Opened_tables | 215 |
| Questions | 2150539 |
| Qcache_queries_in_cache | 14323 |
| Qcache_inserts | 465602 |
| Qcache_hits | 448440 |
| Qcache_lowmem_prunes | 0 |
| Qcache_not_cached | 407085 |
| Qcache_free_memory | 110065920 |
| Qcache_free_blocks | 5746 |
| Qcache_total_blocks | 34646 |
| Rpl_status | NULL |
| Select_full_join | 201792 |
| Select_full_range_join | 1 |
| Select_range | 105722 |
| Select_range_check | 0 |
| Select_scan | 260527 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 87949 |
| Sort_rows | 34091610 |
| Sort_scan | 245970 |
| Table_locks_immediate | 2521133 |
| Table_locks_waited | 7190 |
| Threads_cached | 26 |
| Threads_created | 264 |
| Threads_connected | 154 |
| Threads_running | 1 |
| Uptime | 38277 |
+--------------------------+------------+

Peak time we average 1700 concurrent users.
I would say all day average (1pm here now with 1175)
Cookie timeout 30

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 15
MaxSpareServers 30
StartServers 30
MaxClients 750

VB 3.0.7

eva2000
Fri 4th Mar '05, 12:09pm
1700 users over 30 cookie timeout is very high activity level for a single Xeon cpu server! Sure cookie timeout is 30s ? experiencing any load issues at peak time ?

The my.cnf looks fine to me and mysql stats look fine even cpu load average looks low.

I'd reduced your httpd.conf maxclients value from 750 to 256 and restart apache at least

got a link to phpinfo url ?

reverof
Fri 4th Mar '05, 2:46pm
eva,
Yeah I read more than I post here... I checked out all yer other server config threads and worked together my own little my.conf from different ones you posted.

Cookie timeout is 30 minutes, I am sorry, didnt meant to confuse, 1800s.

This new server, uses almost no swap which is sweet, 3gb of ram really helped over 2gb. It uses like 500k of swap when it runs backup (cpanel) at 3am thats about it. I ran a total reindex of the search, after clearing it lastnight aroudn 2am, took like 4 hours but never affected site performance. I am running the mysql db's on the 2nd hd rather than the primary, I also believe this is a factor, was a test I decided to try when moving to the new server.

I will put up a link to phpinfo shortly.

eva2000
Sun 6th Mar '05, 1:38am
30mins ah ha! a BIG difference from 30s ;)

yeah looks fine then to me ...