PDA

View Full Version : Dedicated server optimization request


sparhawk
Wed 27th Jun '07, 2:00pm
Thanks in advance for any help you can provide. Have been getting a lot of server busy messages (but never consistent). Thanks again.

1. Dedicated Server2.
CPU speed: Dual Xeon - 2.4Ghz
Memory: 2GB RAM
HD: 2x 73GB HD
Linux distribution: Redhat Enterprise - Ensim Pro
Apache: 2.0.46
PHP: 4.4.7 (cli) (built: Jun 25 2007 19:21:19)
MySQL: Ver 12.22 Distrib 4.0.23, for pc-linux (i686)
3. 3.6.7 PL14. have_innodb = YES5. installed via RPM6. top -b -n 1


10:51:07 up 1 day, 14:08, 2 users, load average: 0.84, 0.95, 0.97
202 processes: 200 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 12.1% 0.0% 0.7% 0.0% 0.7% 4.3% 81.9%
cpu00 14.5% 0.0% 0.9% 0.0% 2.9% 0.0% 81.5%
cpu01 5.8% 0.0% 0.0% 0.0% 0.0% 8.8% 85.2%
cpu02 2.9% 0.0% 0.9% 0.0% 0.0% 8.8% 87.2%
cpu03 25.2% 0.0% 0.9% 0.0% 0.0% 0.0% 73.7%
Mem: 2055456k av, 2013764k used, 41692k free, 0k shrd, 10168k buff
1418524k actv, 275924k in_d, 30980k in_c
Swap: 2048276k av, 182216k used, 1866060k free 855900k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
19404 apache 16 0 15788 14M 4392 R 7.3 0.7 1:18 3 httpd
19156 apache 16 0 15840 15M 4392 S 1.9 0.7 1:11 1 httpd
19179 apache 15 0 15796 14M 4392 S 0.9 0.7 1:18 3 httpd
19264 apache 15 0 16088 15M 4392 S 0.7 0.7 1:08 2 httpd
19405 apache 15 0 16192 15M 4392 S 0.7 0.7 1:18 0 httpd
2810 admin1 20 0 1252 1252 876 R 0.4 0.0 0:00 2 top
1070 apache 15 0 15048 14M 4392 S 0.2 0.7 0:48 0 httpd
1774 apache 15 0 15572 14M 4388 S 0.2 0.7 0:56 0 httpd
2814 mysql 24 0 31836 22M 1332 S 0.2 1.1 0:00 2 mysqld
1 root 15 0 280 252 220 S 0.0 0.0 0:06 3 init
2 root RT 0 0 0 0 SW 0.0 0.0 0:00 0 migration/0
3 root RT 0 0 0 0 SW 0.0 0.0 0:00 1 migration/1
4 root RT 0 0 0 0 SW 0.0 0.0 0:00 2 migration/2
5 root RT 0 0 0 0 SW 0.0 0.0 0:00 3 migration/3
6 root 15 0 0 0 0 SW 0.0 0.0 0:00 2 keventd
7 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd/0
8 root 34 19 0 0 0 SWN 0.0 0.0 0:00 1 ksoftirqd/1
9 root 34 19 0 0 0 SWN 0.0 0.0 0:00 2 ksoftirqd/2
10 root 34 19 0 0 0 SWN 0.0 0.0 0:00 3 ksoftirqd/3
13 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 bdflush
11 root 15 0 0 0 0 SW 0.0 0.0 2:36 2 kswapd
12 root 15 0 0 0 0 SW 0.0 0.0 4:06 2 kscand
14 root 15 0 0 0 0 SW 0.0 0.0 0:05 3 kupdated
15 root 25 0 0 0 0 SW 0.0 0.0 0:00 3 mdrecoveryd
25 root 15 0 0 0 0 SW 0.0 0.0 0:33 1 kjournald
394 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 kjournald
710 root 15 0 280 272 216 S 0.0 0.0 0:07 1 irqbalance
739 root 15 0 220 204 160 S 0.0 0.0 0:00 0 mdadm
755 root RT 0 520 460 380 S 0.0 0.0 0:01 0 auditd
837 root 15 0 368 344 284 S 0.0 0.0 0:05 0 syslogd
847 root 15 0 1140 232 228 S 0.0 0.0 0:00 1 klogd
880 root 15 0 932 504 416 S 0.0 0.0 0:04 1 cupsd
892 root 25 0 0 0 0 SW 0.0 0.0 0:00 3 khubd
909 named 25 0 2268 1916 1076 S 0.0 0.0 0:00 0 named
916 named 15 0 2268 1916 1076 S 0.0 0.0 0:00 2 named
917 named 15 0 2268 1916 1076 S 0.0 0.0 0:00 1 named
918 named 15 0 2268 1916 1076 S 0.0 0.0 0:00 2 named
919 named 15 0 2268 1916 1076 S 0.0 0.0 0:00 3 named
920 named 15 0 2268 1916 1076 S 0.0 0.0 0:00 1 named
921 named 15 0 2268 1916 1076 S 0.0 0.0 0:00 1 named
924 root 16 0 804 616 484 S 0.0 0.0 0:04 0 sshd
935 root 25 0 576 308 304 S 0.0 0.0 0:00 2 sshd
950 root 23 0 424 280 276 S 0.0 0.0 0:00 1 xinetd
966 clamav 15 0 884 712 592 S 0.0 0.0 0:00 2 freshclam
993 root 15 0 1380 804 604 S 0.0 0.0 0:05 3 sendmail
1005 smmsp 15 0 1104 596 488 S 0.0 0.0 0:00 0 sendmail
1069 root 15 0 7376 6900 4100 S 0.0 0.3 0:13 2 httpd
1082 root 15 0 1104 580 460 S 0.0 0.0 0:02 0 proftpd
1144 postgres 15 0 808 516 432 S 0.0 0.0 0:00 1 postmaster
1146 postgres 15 0 768 412 368 S 0.0 0.0 0:00 1 postmaster
1147 postgres 15 0 824 516 416 S 0.0 0.0 0:00 0 postmaster
1315 root 5 -10 1144 372 340 S < 0.0 0.0 0:03 3 ocwhttpd
1316 nobody 5 -10 1108 344 316 S < 0.0 0.0 0:00 2 ocwhttpd
1317 nobody 5 -10 2520 2108 1516 S < 0.0 0.1 0:00 2 ocwhttpd
1318 nobody 5 -10 2336 1868 1332 S < 0.0 0.0 0:00 1 ocwhttpd
1319 nobody 5 -10 2544 2148 1540 S < 0.0 0.1 0:00 3 ocwhttpd
1320 nobody 5 -10 2468 2084 1472 S < 0.0 0.1 0:00 2 ocwhttpd
1321 nobody 5 -10 2336 1860 1328 S < 0.0 0.0 0:00 1 ocwhttpd
1322 root 5 -10 19448 10M 1552 S < 0.0 0.5 0:02 2 ensim-python
1331 root 15 0 764 592 484 S 0.0 0.0 0:03 3 bandwidth_man
1339 root 15 0 416 368 312 S 0.0 0.0 0:00 0 crond
1363 xfs 15 0 2372 316 288 S 0.0 0.0 0:00 1 xfs
1372 daemon 15 0 380 332 288 S 0.0 0.0 0:00 3 atd
1381 root 25 0 340 240 236 S 0.0 0.0 0:00 1 saslauthd
1382 root 25 0 340 240 236 S 0.0 0.0 0:00 3 saslauthd
1383 root 25 0 340 240 236 S 0.0 0.0 0:00 3 saslauthd
1384 root 25 0 340 240 236 S 0.0 0.0 0:00 1 saslauthd
1385 root 25 0 340 240 236 S 0.0 0.0 0:00 1 saslauthd
1396 root 15 0 280 272 224 S 0.0 0.0 0:00 3 rhnsd
1406 root 22 0 212 168 164 S 0.0 0.0 0:00 2 mingetty
1407 root 22 0 212 168 164 S 0.0 0.0 0:00 1 mingetty
1408 root 22 0 212 168 164 S 0.0 0.0 0:00 1 mingetty
1409 root 22 0 212 168 164 S 0.0 0.0 0:00 0 mingetty
1410 root 23 0 212 168 164 S 0.0 0.0 0:00 3 mingetty
1411 root 23 0 212 168 164 S 0.0 0.0 0:00 3 mingetty
1412 root 23 0 248 192 188 S 0.0 0.0 0:00 0 agetty
2361 root 25 0 388 252 248 S 0.0 0.0 0:00 2 safe_mysqld
2394 mysql 15 0 31836 22M 1332 S 0.0 1.1 0:29 1 mysqld
2395 mysql 23 0 31836 22M 1332 S 0.0 1.1 0:45 2 mysqld
2396 mysql 20 0 31836 22M 1332 S 0.0 1.1 0:00 2 mysqld
2397 mysql 25 0 31836 22M 1332 S 0.0 1.1 0:00 1 mysqld
2398 mysql 25 0 31836 22M 1332 S 0.0 1.1 0:00 1 mysqld
2399 mysql 20 0 31836 22M 1332 S 0.0 1.1 0:00 2 mysqld
2400 mysql 15 0 31836 22M 1332 S 0.0 1.1 0:33 2 mysqld
2401 mysql 15 0 31836 22M 1332 S 0.0 1.1 0:23 1 mysqld
2402 mysql 24 0 31836 22M 1332 S 0.0 1.1 0:00 1 mysqld
2403 mysql 15 0 31836 22M 1332 S 0.0 1.1 1:04 1 mysqld
3110 root 15 0 14600 240 236 S 0.0 0.0 0:00 2 MailScanner
27142 nobody 5 -10 2800 2456 1796 S < 0.0 0.1 0:00 2 ocwhttpd
27147 root 6 -10 19448 10M 1552 S < 0.0 0.5 0:00 3 ensim-python
27148 root 6 -10 19448 10M 1552 S < 0.0 0.5 0:00 0 ensim-python
27149 root 6 -10 19448 10M 1552 S < 0.0 0.5 0:00 3 ensim-python
27150 root 5 -10 19448 10M 1552 S < 0.0 0.5 0:00 3 ensim-python
27151 root 5 -10 19448 10M 1552 S < 0.0 0.5 0:04 0 ensim-python
27270 nobody 5 -10 2336 1876 1332 S < 0.0 0.0 0:00 1 ocwhttpd
15801 root 15 0 35780 2356 1072 S 0.0 0.1 0:07 2 MailScanner
15806 root 15 0 35780 2356 1072 S 0.0 0.1 0:07 1 MailScanner
15815 root 15 0 35960 2616 1136 S 0.0 0.1 0:05 0 MailScanner
15823 root 15 0 35780 2360 1072 S 0.0 0.1 0:05 1 MailScanner
15842 root 15 0 36024 2848 1316 S 0.0 0.1 0:05 3 MailScanner
19138 root 15 0 812 812 528 S 0.0 0.0 0:16 0 exclog
19146 root 18 0 7328 6856 4052 S 0.0 0.3 0:00 3 httpd
19160 apache 15 0 16084 15M 4392 S 0.0 0.7 1:15 0 httpd
19163 apache 15 0 16152 15M 4392 S 0.0 0.7 1:20 3 httpd
19164 apache 15 0 15572 14M 4392 S 0.0 0.7 1:04 2 httpd
19165 apache 15 0 15280 14M 4392 S 0.0 0.7 1:10 2 httpd
19166 apache 15 0 16072 15M 4392 S 0.0 0.7 1:09 2 httpd
19170 apache 15 0 15836 15M 4392 S 0.0 0.7 1:13 2 httpd
19172 apache 15 0 15916 15M 4392 S 0.0 0.7 1:08 1 httpd
19173 apache 15 0 15644 14M 4388 S 0.0 0.7 1:08 2 httpd
19178 apache 15 0 15120 14M 4392 S 0.0 0.7 1:17 2 httpd
19182 apache 15 0 15848 15M 4392 S 0.0 0.7 1:17 3 httpd
19184 apache 15 0 14076 13M 4384 S 0.0 0.6 1:13 0 httpd
19191 apache 16 0 15740 14M 4392 S 0.0 0.7 1:06 3 httpd
19195 apache 15 0 15248 14M 4392 S 0.0 0.7 1:05 3 httpd
19196 apache 15 0 15208 14M 4392 S 0.0 0.7 1:20 0 httpd
19250 apache 15 0 15172 14M 4392 S 0.0 0.7 1:10 2 httpd
19254 apache 15 0 15660 14M 4392 S 0.0 0.7 1:09 2 httpd
19266 apache 15 0 16084 15M 4392 S 0.0 0.7 1:05 1 httpd
19267 apache 15 0 16136 15M 4392 S 0.0 0.7 1:11 0 httpd
19279 apache 15 0 15612 14M 4392 S 0.0 0.7 1:17 0 httpd
19281 apache 15 0 16232 15M 4404 S 0.0 0.7 1:14 2 httpd
19285 apache 15 0 15460 14M 4392 S 0.0 0.7 1:23 2 httpd
19292 apache 15 0 15572 14M 4396 S 0.0 0.7 1:11 3 httpd
19294 apache 15 0 16076 15M 4392 S 0.0 0.7 1:19 0 httpd
19316 apache 15 0 16476 15M 4392 S 0.0 0.7 1:06 3 httpd
19319 apache 15 0 16172 15M 4392 S 0.0 0.7 1:11 2 httpd
19325 apache 15 0 15832 15M 4392 S 0.0 0.7 1:13 3 httpd
19326 apache 15 0 16008 15M 4392 S 0.0 0.7 1:06 2 httpd
19328 apache 15 0 14884 14M 4392 S 0.0 0.7 1:13 0 httpd
19329 apache 15 0 15276 14M 4392 S 0.0 0.7 1:02 1 httpd
19339 apache 15 0 16160 15M 4392 S 0.0 0.7 1:13 3 httpd
19340 apache 15 0 15804 14M 4400 S 0.0 0.7 1:04 3 httpd
19377 apache 15 0 33096 31M 4392 S 0.0 1.5 1:18 1 httpd
19381 apache 15 0 15776 14M 4392 S 0.0 0.7 1:07 2 httpd
19385 apache 15 0 16080 15M 4392 S 0.0 0.7 1:13 1 httpd
19387 apache 15 0 14864 14M 4392 S 0.0 0.7 1:17 0 httpd
19393 apache 15 0 15284 14M 4392 S 0.0 0.7 1:16 3 httpd
19395 apache 15 0 15296 14M 4392 S 0.0 0.7 1:11 3 httpd
19398 apache 15 0 12724 11M 4384 S 0.0 0.5 1:13 2 httpd
19400 apache 15 0 16072 15M 4392 S 0.0 0.7 1:11 3 httpd
19402 apache 15 0 15856 15M 4392 S 0.0 0.7 1:09 0 httpd
19403 apache 15 0 15272 14M 4392 S 0.0 0.7 1:16 2 httpd
19543 apache 15 0 15072 14M 4392 S 0.0 0.7 1:10 3 httpd
19544 apache 15 0 15864 15M 4392 S 0.0 0.7 1:04 0 httpd
19545 apache 15 0 16064 15M 4392 S 0.0 0.7 1:00 0 httpd
22093 apache 15 0 15232 14M 4392 S 0.0 0.7 1:08 1 httpd
23578 apache 16 0 16176 15M 4392 S 0.0 0.7 0:59 2 httpd
24071 apache 15 0 16228 15M 4392 S 0.0 0.7 1:01 2 httpd
24072 apache 15 0 15660 14M 4392 S 0.0 0.7 1:02 3 httpd
30476 apache 15 0 15028 14M 4392 S 0.0 0.7 0:52 2 httpd
30478 apache 15 0 16184 15M 4392 S 0.0 0.7 0:59 1 httpd
1065 apache 15 0 16200 15M 4392 S 0.0 0.7 0:51 1 httpd
1071 apache 15 0 16064 15M 4392 S 0.0 0.7 0:51 2 httpd
1612 apache 15 0 15520 14M 4392 S 0.0 0.7 0:56 1 httpd
1775 apache 15 0 15084 14M 4392 S 0.0 0.7 0:51 2 httpd
1776 apache 15 0 13592 12M 4392 S 0.0 0.6 0:55 0 httpd
1983 apache 15 0 15924 15M 4388 S 0.0 0.7 0:46 1 httpd
1994 apache 15 0 38516 37M 4392 S 0.0 1.8 0:50 1 httpd
1995 apache 15 0 15776 14M 4392 S 0.0 0.7 0:51 1 httpd
2001 apache 15 0 15640 14M 4392 S 0.0 0.7 0:38 2 httpd
2004 apache 15 0 15316 14M 4388 S 0.0 0.7 0:45 0 httpd
2247 apache 15 0 15024 14M 4392 S 0.0 0.7 0:49 0 httpd
3673 apache 15 0 15572 14M 4392 S 0.0 0.7 0:45 3 httpd
3684 apache 15 0 12632 11M 4384 S 0.0 0.5 0:44 3 httpd
3685 apache 15 0 14248 13M 4384 S 0.0 0.6 0:51 3 httpd
5370 apache 15 0 16120 15M 4392 S 0.0 0.7 0:42 2 httpd
6069 apache 15 0 15840 15M 4392 S 0.0 0.7 0:45 3 httpd
6072 apache 15 0 15868 15M 4392 S 0.0 0.7 0:46 2 httpd
6073 apache 15 0 16124 15M 4392 S 0.0 0.7 0:47 0 httpd
6230 apache 15 0 15696 14M 4392 S 0.0 0.7 0:42 1 httpd
6401 apache 15 0 15216 14M 4392 S 0.0 0.7 0:41 3 httpd
6704 root 17 0 1960 1896 1492 S 0.0 0.0 0:00 1 sshd
6719 admin1 15 0 2228 2168 1704 S 0.0 0.1 0:00 1 sshd
6721 admin1 16 0 1488 1488 1160 S 0.0 0.0 0:00 2 bash
9287 apache 15 0 12648 11M 4384 S 0.0 0.5 0:32 0 httpd
9288 apache 15 0 16076 15M 4392 S 0.0 0.7 0:35 1 httpd
9289 apache 15 0 15484 14M 4392 S 0.0 0.7 0:43 2 httpd
10668 apache 15 0 16036 15M 4392 S 0.0 0.7 0:33 2 httpd
10669 apache 15 0 15956 15M 4392 S 0.0 0.7 0:33 3 httpd
12453 apache 15 0 12528 11M 4384 S 0.0 0.5 0:32 3 httpd
12454 apache 15 0 15860 15M 4392 S 0.0 0.7 0:29 3 httpd
12510 apache 15 0 15940 15M 4392 S 0.0 0.7 0:37 1 httpd
17584 apache 15 0 15768 14M 4388 S 0.0 0.7 0:27 2 httpd
17587 apache 15 0 15896 15M 4392 S 0.0 0.7 0:23 0 httpd
17588 apache 15 0 15172 14M 4392 S 0.0 0.7 0:27 1 httpd
20642 apache 15 0 12732 11M 4380 S 0.0 0.5 0:19 0 httpd
20646 apache 15 0 16164 15M 4388 S 0.0 0.7 0:22 2 httpd
20647 apache 15 0 13040 12M 4384 S 0.0 0.6 0:27 1 httpd
22197 apache 15 0 15492 14M 4396 S 0.0 0.7 0:19 1 httpd
24836 apache 15 0 13024 12M 4384 S 0.0 0.6 0:12 2 httpd
24855 apache 15 0 12556 11M 4384 S 0.0 0.5 0:14 3 httpd
24863 apache 15 0 13488 12M 4380 S 0.0 0.6 0:13 1 httpd
24868 apache 16 0 13036 12M 4384 S 0.0 0.6 0:12 2 httpd
24869 apache 15 0 13336 12M 4384 S 0.0 0.6 0:12 3 httpd
24870 apache 15 0 13572 12M 4376 S 0.0 0.6 0:15 1 httpd
24871 apache 15 0 15604 14M 4388 S 0.0 0.7 0:18 1 httpd
27632 root 19 0 1960 1896 1492 S 0.0 0.0 0:00 0 sshd
27638 admin1 15 0 2200 2140 1696 S 0.0 0.1 0:00 3 sshd
27639 admin1 15 0 1420 1420 1156 S 0.0 0.0 0:00 1 bash
31323 apache 15 0 15760 14M 4388 S 0.0 0.7 0:04 2 httpd
31564 apache 15 0 12128 11M 4368 S 0.0 0.5 0:06 3 httpd
7. /etc/my.cnf


[mysqld]
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock
datadir=/var/lib/mysql
set-variable=max_connections=400
ft_min_word_len=3

[myisamchk]
ft_min_word_len=3

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[client]
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock

[mysql_fix_privilege_tables]
8. mysqladmin -u root -p var ext stat ver


+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value |
+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| back_log | 50 |
| basedir | / |
| binlog_cache_size | 32768 |
| bulk_insert_buffer_size | 8388608 |
| character_set | latin1 |
| character_sets | latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 latin5 |
| concurrent_insert | ON |
| connect_timeout | 5 |
| convert_character_set | |
| datadir | /var/lib/mysql/ |
| default_week_format | 0 |
| delay_key_write | ON |
| delayed_insert_limit | 100 |
| delayed_insert_timeout | 300 |
| delayed_queue_size | 1000 |
| flush | OFF |
| flush_time | 0 |
| ft_boolean_syntax | + -><()~*:""&| |
| ft_min_word_len | 3 |
| ft_max_word_len | 254 |
| ft_max_word_len_for_sort | 20 |
| ft_stopword_file | (built-in) |
| have_bdb | NO |
| have_crypt | YES |
| have_innodb | YES |
| have_isam | YES |
| have_raid | NO |
| have_symlink | YES |
| have_openssl | NO |
| have_query_cache | YES |
| init_file | |
| innodb_additional_mem_pool_size | 1048576 |
| innodb_buffer_pool_size | 8388608 |
| innodb_data_file_path | ibdata1:10M:autoextend |
| innodb_data_home_dir | |
| innodb_file_io_threads | 4 |
| innodb_force_recovery | 0 |
| innodb_thread_concurrency | 8 |
| innodb_flush_log_at_trx_commit | 1 |
| innodb_fast_shutdown | ON |
| innodb_flush_method | |
| innodb_lock_wait_timeout | 50 |
| innodb_log_arch_dir | ./ |
| innodb_log_archive | OFF |
| innodb_log_buffer_size | 1048576 |
| innodb_log_file_size | 5242880 |
| innodb_log_files_in_group | 2 |
| innodb_log_group_home_dir | ./ |
| innodb_mirrored_log_groups | 1 |
| innodb_max_dirty_pages_pct | 90 |
| innodb_max_purge_lag | 0 |
| innodb_table_locks | ON |
| interactive_timeout | 28800 |
| join_buffer_size | 131072 |
| key_buffer_size | 8388600 |
| language | /usr/share/mysql/english/ |
| large_files_support | ON |
| license | GPL |
| local_infile | ON |
| locked_in_memory | OFF |
| log | OFF |
| log_update | OFF |
| log_bin | OFF |
| log_slave_updates | OFF |
| log_slow_queries | OFF |
| log_warnings | 1 |
| long_query_time | 10 |
| low_priority_updates | OFF |
| lower_case_file_system | OFF |
| lower_case_table_names | 0 |
| max_allowed_packet | 1048576 |
| max_binlog_cache_size | 4294967295 |
| max_binlog_size | 1073741824 |
| max_connections | 400 |
| max_connect_errors | 10 |
| max_delayed_threads | 20 |
| max_insert_delayed_threads | 20 |
| max_heap_table_size | 16777216 |
| max_join_size | 4294967295 |
| max_relay_log_size | 0 |
| max_seeks_for_key | 4294967295 |
| max_sort_length | 1024 |
| max_user_connections | 0 |
| max_tmp_tables | 32 |
| max_write_lock_count | 4294967295 |
| myisam_max_extra_sort_file_size | 268435456 |
| myisam_max_sort_file_size | 2147483647 |
| myisam_repair_threads | 1 |
| myisam_recover_options | OFF |
| myisam_sort_buffer_size | 8388608 |
| net_buffer_length | 16384 |
| net_read_timeout | 30 |
| net_retry_count | 10 |
| net_write_timeout | 60 |
| new | OFF |
| open_files_limit | 2010 |
| pid_file | /var/run/mysqld_app_init/mysqld.pid |
| log_error | |
| port | 3306 |
| protocol_version | 10 |
| query_alloc_block_size | 8192 |
| query_cache_limit | 1048576 |
| query_cache_size | 0 |
| query_cache_type | ON |
| query_prealloc_size | 8192 |
| range_alloc_block_size | 2048 |
| read_buffer_size | 131072 |
| read_only | OFF |
| read_rnd_buffer_size | 262144 |
| rpl_recovery_rank | 0 |
| server_id | 0 |
| slave_net_timeout | 3600 |
| skip_external_locking | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slow_launch_time | 2 |
| socket | /home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock |
| sort_buffer_size | 2097144 |
| sql_mode | 0 |
| table_cache | 64 |
| table_type | MYISAM |
| thread_cache_size | 0 |
| thread_stack | 126976 |
| tx_isolation | REPEATABLE-READ |
| timezone | CDT |
| tmp_table_size | 33554432 |
| tmpdir | /tmp/ |
| transaction_alloc_block_size | 8192 |
| transaction_prealloc_size | 4096 |
| version | 4.0.23-standard |
| version_comment | Official MySQL RPM |
| version_compile_os | pc-linux |
| wait_timeout | 28800 |
+---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 0 |
| Aborted_connects | 7 |
| Bytes_received | 773206236 |
| Bytes_sent | 1679597171 |
| Com_admin_commands | 0 |
| Com_alter_table | 318 |
| Com_analyze | 0 |
| Com_backup_table | 0 |
| Com_begin | 0 |
| Com_change_db | 195032 |
| Com_change_master | 0 |
| Com_check | 33 |
| Com_commit | 0 |
| Com_create_db | 0 |
| Com_create_function | 0 |
| Com_create_index | 0 |
| Com_create_table | 55 |
| Com_delete | 104945 |
| Com_delete_multi | 0 |
| Com_drop_db | 0 |
| Com_drop_function | 0 |
| Com_drop_index | 0 |
| Com_drop_table | 36 |
| Com_flush | 0 |
| Com_grant | 0 |
| Com_ha_close | 0 |
| Com_ha_open | 0 |
| Com_ha_read | 0 |
| Com_insert | 63042 |
| Com_insert_select | 36 |
| Com_kill | 0 |
| Com_load | 0 |
| Com_load_master_data | 0 |
| Com_load_master_table | 0 |
| Com_lock_tables | 0 |
| Com_optimize | 33 |
| Com_purge | 0 |
| Com_rename_table | 0 |
| Com_repair | 0 |
| Com_replace | 9536 |
| Com_replace_select | 0 |
| Com_reset | 0 |
| Com_restore_table | 0 |
| Com_revoke | 0 |
| Com_rollback | 0 |
| Com_savepoint | 0 |
| Com_select | 1716389 |
| Com_set_option | 0 |
| Com_show_binlog_events | 0 |
| Com_show_binlogs | 0 |
| Com_show_create | 138 |
| Com_show_databases | 0 |
| Com_show_fields | 175 |
| Com_show_grants | 0 |
| Com_show_keys | 175 |
| 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 | 195 |
| Com_show_variables | 60 |
| Com_slave_start | 0 |
| Com_slave_stop | 0 |
| Com_truncate | 37 |
| Com_unlock_tables | 0 |
| Com_update | 306503 |
| Connections | 195041 |
| Created_tmp_disk_tables | 12881 |
| Created_tmp_tables | 95368 |
| Created_tmp_files | 38 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_commit | 0 |
| Handler_delete | 31771 |
| Handler_read_first | 403687 |
| Handler_read_key | 52319382 |
| Handler_read_next | 217627222 |
| Handler_read_prev | 1605820 |
| Handler_read_rnd | 10705935 |
| Handler_read_rnd_next | 207995260 |
| Handler_rollback | 0 |
| Handler_update | 710970 |
| Handler_write | 9374747 |
| Key_blocks_used | 7793 |
| Key_read_requests | 223582133 |
| Key_reads | 2698727 |
| Key_write_requests | 3781834 |
| Key_writes | 263772 |
| Max_used_connections | 130 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 64 |
| Open_files | 111 |
| Open_streams | 0 |
| Opened_tables | 21855 |
| Questions | 2591811 |
| 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 | 184 |
| Select_full_range_join | 0 |
| Select_range | 485332 |
| Select_range_check | 0 |
| Select_scan | 119951 |
| Slave_open_temp_tables | 0 |
| Slave_running | OFF |
| Slow_launch_threads | 0 |
| Slow_queries | 95 |
| Sort_merge_passes | 1 |
| Sort_range | 371890 |
| Sort_rows | 18807083 |
| Sort_scan | 54713 |
| Table_locks_immediate | 3520771 |
| Table_locks_waited | 4144 |
| Threads_cached | 0 |
| Threads_created | 195040 |
| Threads_connected | 2 |
| Threads_running | 1 |
| Uptime | 136801 |
+--------------------------+------------+
Uptime: 136801 Threads: 2 Questions: 2591812 Slow queries: 95 Opens: 21855 Flush tables: 1 Open tables: 64 Queries per second avg: 18.946
mysqladmin Ver 8.40 Distrib 4.0.23, for pc-linux on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 4.0.23-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock
Uptime: 1 day 14 hours 1 sec

Threads: 2 Questions: 2591812 Slow queries: 95 Opens: 21855 Flush tables: 1 Open tables: 64 Queries per second avg: 18.946
9. VB (and possibly Ensim admin web GUI) is the only program utilizing PHP and MySQL10.
Average: 450
Max: 750
Cookies Timeout: 1800
11. http://www.canadiangunnutz.com/phpinfo.php

12. httpd.conf


KeepAlive = On
MaxKeepAliveRequests = 1000
KeepAliveTimeout = 15
MinSpareServers = 5
MaxSpareServers = 75
StartServers = 50
MaxClients = 256
MaxRequestsPerChild = 1500
13. find / -size +2000000k
None14.

uname -a
Linux hosting 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linuxulimit -aH

core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
cat /proc/cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.40GHz
stepping : 5
cpu MHz : 2392.137
cache size : 512 KB
physical id : 2
siblings : 2
runqueue : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 4771.02

processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.40GHz
stepping : 7
cpu MHz : 2392.137
cache size : 512 KB
physical id : 0
siblings : 2
runqueue : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 4771.02

processor : 2
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.40GHz
stepping : 7
cpu MHz : 2392.137
cache size : 512 KB
physical id : 0
siblings : 2
runqueue : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 4771.02

processor : 3
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Xeon(TM) CPU 2.40GHz
stepping : 5
cpu MHz : 2392.137
cache size : 512 KB
physical id : 2
siblings : 2
runqueue : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 4771.02

Steve Machol
Wed 27th Jun '07, 4:46pm
Your max_connections is set to 400:

set-variable=max_connections=400

Yet:

Average: 450
Max: 750

Try increasing max_connections to 800.

sparhawk
Wed 27th Jun '07, 5:08pm
Roger that

eva2000
Thu 28th Jun '07, 11:40am
Hi you don't need to up max_connections considering you're only using around 130 max_used_connections according to your status output

Try the following in this exact order. You can ignore any of the suggestions that you have already done.


1. Upgrade MySQL server to 4.0.27
2. Upgrade PHP to 4.4.7 and/or recompile PHP 4.4.7 after upgrading MySQL
3. Edit /etc/my.cnf and place the following mysql server settings in /etc/my.cnf and restart mysql server afterwards


[client]
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock

[mysqld]
safe-show-database
socket=/home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock
datadir=/var/lib/mysql
ft_min_word_len=3
max_connections = 500
key_buffer = 64M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1800
thread_cache_size = 384
wait_timeout = 45
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 10
thread_concurrency = 4
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 3M
query_cache_size = 80M
query_cache_type = 1
query_prealloc_size = 131072
query_alloc_block_size = 65536

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
nice = -5
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

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

[mysqlhotcopy]
interactive-timeout


4. Install APC Cache lastest version from http://pecl.php.net/package/APC. Read install guide at http://www.vbulletin.com/forum/showthread.php?t=165367 - please remove Zend Optimizer from php.ini before installing APC Cache. OR try the alternative PHP caching software, Xcache which seems to be a bit faster than APC Cache - http://www.vbulletin.com/forum/showthread.php?t=213267

5. Upgrade to vB 3.6.7 http://www.vbulletin.com/forum/showthread.php?t=229950 if you're on vB 3.6.x

6. If you just upgraded to vB 3.5.x/3.6.x try to disable these 4 options:

Admin CP -> vBulletin Options -> Forums Home Page Options -> Display Logged in Users?

Admin CP -> vBulletin Options -> Forum Display Options (forumdisplay) -> Show Users Browsing Forums

Admin CP -> vBulletin Options -> Thread Display Options -> Show Users Browsing Thread

Admin CP -> vBulletin Options -> Message Searching Options -> Automatic Similar Thread search

7. Edit httpd.conf values from

KeepAlive = On
MaxKeepAliveRequests = 1000
KeepAliveTimeout = 15
MinSpareServers = 5
MaxSpareServers = 75
StartServers = 50
MaxClients = 256
MaxRequestsPerChild = 1500

to

KeepAlive = On
MaxKeepAliveRequests = 100
KeepAliveTimeout = 1
MinSpareServers = 15
MaxSpareServers = 25
StartServers = 20
MaxClients = 200
MaxRequestsPerChild = 1000

restart apache

8. Ensure vB admincp gzip is disabled since you already have Apache with mod_deflate which does the same thing

9. Lastly, if all above doesn't help upgrade linux kernel to latest stable 2.6.x smp linux kernel