PDA

View Full Version : Server Optimization Request


Patrick
Fri 5th Sep '03, 2:23am
1. Shared Virtual Server

2.
cpu speed/type single or dual cpus): single athlon 2.4ghz
how much memory installed: 512mb ram
hard drive type/configuration: 80GB EIDE non raid
linux distributor or windows version: redhat linux 7.3
apache/IIS version: apache 1.3.28
PHP version: php 4.3.3
MySQL version: mysql 4.0.14-standard

3. not to my knowledge, but a means to check would serve good.

4. No details

5.
1:08am up 11 days, 14 min, 2 users, load average: 0.56, 0.92, 1.02
156 processes: 151 sleeping, 5 running, 0 zombie, 0 stopped
CPU states: 36.6% user, 4.7% system, 0.0% nice, 58.5% idle
Mem: 507576K av, 431528K used, 76048K free, 0K shrd, 28812K buff
Swap: 522072K av, 70968K used, 451104K free 189256K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
29851 nobody 17 0 10636 9256 5792 R 9.5 1.8 0:05 httpd
29844 nobody 11 0 9188 7760 5688 S 7.6 1.5 0:08 httpd
29912 nobody 20 0 9548 8080 5748 R 6.2 1.5 0:04 httpd
1600 nobody 14 0 9168 8140 6060 R 4.2 1.6 0:00 httpd
29885 nobody 10 0 10000 8620 5764 S 2.8 1.6 0:06 httpd
29920 nobody 10 0 9104 7728 5736 S 2.3 1.5 0:05 httpd
2052 root 15 0 1004 1004 756 R 2.3 0.1 0:00 top
8348 mysql 10 0 38844 33M 5504 S 1.4 6.6 0:15 mysqld
29839 nobody 9 0 10620 9268 5764 S 1.4 1.8 0:09 httpd
29893 nobody 9 0 9268 7884 5748 S 1.4 1.5 0:08 httpd
8353 mysql 9 0 38844 33M 5504 S 0.4 6.6 0:18 mysqld
20644 mysql 9 0 38844 33M 5504 S 0.4 6.6 0:16 mysqld
1550 root 9 0 984 984 824 S 0.4 0.1 0:00 pure-ftpd
1 root 7 0 464 420 404 S 0.0 0.0 0:25 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:03 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
4 root 9 0 0 0 0 SW 0.0 0.0 8:52 kswapd
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 kupdated
8 root 9 0 0 0 0 SW 0.0 0.0 1:18 kjournald
134 root 9 0 0 0 0 SW 0.0 0.0 1:20 kjournald
135 root 9 0 0 0 0 SW 0.0 0.0 1:24 kjournald
136 root 9 0 0 0 0 SW 0.0 0.0 4:48 kjournald
471 root 9 0 0 0 0 SW 0.0 0.0 0:00 eth0
829 root 9 0 520 480 432 S 0.0 0.0 1:05 syslogd
834 root 9 0 412 356 356 S 0.0 0.0 0:02 klogd
963 named 9 0 13280 12M 9772 S 0.0 2.5 0:00 named
965 named 9 0 13280 12M 9772 S 0.0 2.5 0:01 named
966 named 9 0 13280 12M 9772 S 0.0 2.5 7:32 named
967 named 9 0 13280 12M 9772 S 0.0 2.5 0:03 named
968 named 9 0 13280 12M 9772 S 0.0 2.5 1:41 named
988 root 9 0 924 796 724 S 0.0 0.1 0:41 sshd
1022 root 8 0 792 704 640 S 0.0 0.1 0:09 xinetd
1143 root 9 0 1720 524 524 S 0.0 0.1 0:01 whostmgrd
1469 root 8 0 604 560 516 S 0.0 0.1 0:21 crond
1609 root 9 0 592 572 528 S 0.0 0.1 0:07 pure-ftpd
1620 root 9 0 392 352 348 S 0.0 0.0 0:00 pure-authd
1880 root 9 0 672 572 572 S 0.0 0.1 0:00 portsentry
1899 root 9 0 348 296 296 S 0.0 0.0 0:00 mingetty
1900 root 9 0 348 296 296 S 0.0 0.0 0:00 mingetty
1901 root 9 0 348 296 296 S 0.0 0.0 0:00 mingetty
1902 root 9 0 348 296 296 S 0.0 0.0 0:00 mingetty
....
and a lot more...

6.

[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
max_connections = 400
max_user_connections = 35
key_buffer = 32M
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 = 1M
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 = 8M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M


7. http://www.ideninsider.com/mysqlinfo.php

8. Has about 50 other sites on the machine, all low level, low bandwidth, low processor intensive sites.

9. MAX connections is at 176, but the max lately is 125-150. Average is about 50-60

10. http://www.ideninsider.com/phpinfo.php

11.
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 360

12. vB 2.3.0

13. This machine runs the current version of cpanel as well. Just for reference. And thanks :)

eva2000
Fri 5th Sep '03, 4:17am
so you have full root access on virtual a/c ? how many virtual sites does the server you're on handle ?

2 things

1. change my.cnf value for

max_user_connections = 35

to

max_user_connections = 75

or better yet comment it out

2. change httpd.conf maxclients from 360 to 150

then restart mysql and apache

might want to update to vB 2.3.2 while you're at it

Patrick
Fri 5th Sep '03, 5:08am
eva, we have a big issue with load spikes, they happen at odd times, and when it spikes, it continues to spike, and doesn't usually stop until services get restarted. It originates from the vbulletin forum in question, any other ideas?

Amount of websites hosted on the machine is about 75-100. I was a little off in my first post.

P.S. The change suggested hasn't been made yet, but shouldn't fix the spikes right?

eva2000
Fri 5th Sep '03, 11:55am
eva, we have a big issue with load spikes, they happen at odd times, and when it spikes, it continues to spike, and doesn't usually stop until services get restarted. It originates from the vbulletin forum in question, any other ideas?

Amount of websites hosted on the machine is about 75-100. I was a little off in my first post.

P.S. The change suggested hasn't been made yet, but shouldn't fix the spikes right?
try it and see.... it's hard to say whether it's vB or not as you do have 75-100 sharing php/apache and mysql resources