PDA

View Full Version : Request for server config advice


AussieSat
Tue 26th Aug '03, 10:00pm
Hi gurus, I would like some help to configure our small server as we are experiencing slowish page loads on our vB site. Find below the items as requested.


1) Dedicated

2) Celeron 1.7Ghz
256Mb Ram
Maxtor 30Gb IDE
Redhat Linux 8.0
Apache 1.3.28
PHP 4.3.2
MySQL 4.0.14-standard

3)No innodb

4)MySQL -> cPanel

5)I have supplied 2 copies of Top as the second (httpd using 99.9% CPU) seems to occour regularly - at the time of running Top we had approx 20 users online (not peak time).

11:32pm up 18 days, 20:55, 1 user, load average: 0.00, 0.02, 0.00
86 processes: 85 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 0.0% user, 0.5% system, 0.0% nice, 99.4% idle
Mem: 250948K av, 209900K used, 41048K free, 0K shrd, 46240K buff
Swap: 522072K av, 83108K used, 438964K free 76180K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
25231 root 18 0 1136 1136 852 R 0.5 0.4 0:04 top
1 root 8 0 276 248 228 S 0.0 0.0 0:21 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 9 0 0 0 0 SW 0.0 0.0 1:46 kapmd
4 root 19 19 0 0 0 SWN 0.0 0.0 0:02 ksoftirqd_CPU0

11:35pm up 18 days, 20:58, 1 user, load average: 0.03, 0.02, 0.00
108 processes: 106 sleeping, 1 running, 1 zombie, 0 stopped
CPU states: 0.7% user, 0.3% system, 0.0% nice, 98.8% idle
Mem: 250948K av, 219600K used, 31348K free, 0K shrd, 47340K buff
Swap: 522072K av, 83108K used, 438964K free 76464K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
23105 root 0 0 1780 580 548 S 99.9 0.2 273:47 httpd
25231 root 17 0 1136 1136 852 R 0.7 0.4 0:05 top
2646 mysql 10 0 20768 6352 4908 S 0.1 2.5 9:37 mysqld
1 root 7 0 276 248 228 S 0.0 0.0 0:21 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd

6)[mysqld]
set-variable = max_connections=500
set-variable = max_allowed_packet=8M

7)+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 0 |
| Aborted_connects | 6 |
| Bytes_received | 1065157450 |
| Bytes_sent | 128580633 |
| Com_admin_commands | 0 |
| Com_alter_table | 0 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 434438 |
| Com_change_master | 0 |
| Com_check | 0 |
| Com_commit | 0 |
| Com_create_db | 3 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 132 |
| Com_delete | 19988 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 124 |
| Com_flush | 26 |
| Com_grant | 11 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 40812 |
| Com_insert_select | 523 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 1 |
| Com_optimize | 0 |
| Com_purge | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 1068 |
| Com_replace_select | 33 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 4633232 |
| Com_set_option | 60 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_create | 60 |
| Com_show_databases | 76 |
| Com_show_fields | 75 |
| Com_show_grants | 3 |
| Com_show_keys | 3 |
| Com_show_logs | 0 |
| Com_show_master_status | 0 |
| Com_show_new_master | 0 |
| Com_show_open_tables | 0 |
| Com_show_processlist | 3695 |
| Com_show_slave_hosts | 0 |
| Com_show_slave_status | 0 |
| Com_show_status | 1 |
| Com_show_innodb_status | 0 |
| Com_show_tables | 119 |
| Com_show_variables | 40 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 0 |
| Com_unlock_tables | 0 |
| Com_update | 1085518 |
| Connections | 436596 |
| Created_tmp_disk_tables | 367 |
| Created_tmp_tables | 268678 |
| Created_tmp_files | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 28439 |
| Handler_read_first | 61694 |
| Handler_read_key | 27044429 |
| Handler_read_next | 29689658 |
| Handler_read_prev | 1665541 |
| Handler_read_rnd | 36682048 |
| Handler_read_rnd_next | 132164552 |
| Handler_rollback | 0 |
| Handler_update | 823267 |
| Handler_write | 7201020 |
| Key_blocks_used | 7793 |
| Key_read_requests | 116668274 |
| Key_reads | 91974 |
| Key_write_requests | 225212 |
| Key_writes | 200214 |
| Max_used_connections | 25 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 64 |
| Open_files | 126 |
| Open_streams | 0 |
| Opened_tables | 18044 |
| Questions | 6656837 |
| 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 | 1465 |
| Select_full_range_join | 3668 |
| Select_range | 1016015 |
| Select_range_check | 0 |
| Select_scan | 652669 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 8 |
| Slow_queries | 0 |
| Sort_merge_passes | 0 |
| Sort_range | 440994 |
| Sort_rows | 36834336 |
| Sort_scan | 676934 |
| Table_locks_immediate | 6653835 |
| Table_locks_waited | 143 |
| Threads_cached | 0 |
| Threads_created | 436595 |
| Threads_connected | 1 |
| Threads_running | 1 |
| Uptime | 1103965 |
+--------------------------+------------+

8)Also on server
1 - vB3 (seperate license), low traffic.
1 - PHP-Nuke with InvisionPB, low traffic
3 - small static sites, low traffic

9)Average 20 users online, peak 60, these numbers are increasing though.

10)http://sat-industry.net/phpinfo.php

11)KeepAlive = On
MaxKeepAliveRequests = 100
KeepAliveTimeout = 15
MinSpareServers = 5
MaxSpareServers = 10
StartServers = 5
MaxClients = 150

12) vB2.3.2, running a few hacks including EasyArchive, some hacks are used on every page via the Parsed PHP code section, also we have a banner script (NKads) which I feel is part of the boards slow load time but it is something we must have at least until vB3 is released.


We would appreciate any advice you can give.

-AussieSat

eva2000
Wed 27th Aug '03, 1:16am
edit or replace your current /etc/my.cnf file with below one and restart mysql


[mysqld]
max_connections = 400
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
skip-innodb

[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


see how that goes for a few days

AussieSat
Wed 27th Aug '03, 4:16am
Thanks for the reply Eva200! I'll try it out.

AussieSat
Fri 29th Aug '03, 6:27pm
While it did seem to give a little increase in speed, we found that we could no longer upload attachments larger than 1M (database errors). On looking at the vB3 installation on the server it showed the MySQL Maximum Packet Size to be only 1.00M. Any idea why this would be?
Regards, AussieSat.

eva2000
Sat 30th Aug '03, 1:42am
strange can you post the output of this command

mysqladmin -u root -p variables