Post Reply  Post Thread 
Please help need optimization
Vam
Junior Member
**

Posts: 1
Group: Registered
Joined: Jan 2007
Status: Offline
Reputation: 0
Post: #1
Please help need optimization

5 Domains

1 very busy forum, database is almost 1Gb, invision power board forums. Server seems very sluggish during peak time, please help =)

We have memcache, eaccelerator and zend optimizer running, not much help

Server:
AMD Athlon 3000 Processor
1 GB Memory
2 x 80 GB Hard Drives


Peak time:
top - 23:10:03 up 124 days, 30 min, 3 users, load average: 0.14, 0.40, 0.79
Tasks: 175 total, 1 running, 174 sleeping, 0 stopped, 0 zombie
Cpu(s): 11.0% us, 1.3% sy, 0.0% ni, 85.7% id, 1.7% wa, 0.3% hi, 0.0% si
Mem: 1035572k total, 1019336k used, 16236k free, 14528k buffers
Swap: 2096472k total, 148152k used, 1948320k free, 596524k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29316 apache 15 0 50448 29m 17m S 3.3 2.9 0:03.39 httpd
29337 apache 15 0 48608 27m 16m S 1.0 2.7 0:02.61 httpd
30011 mekmatch 16 0 292m 34m 9828 S 0.7 3.4 44:56.99 java
30432 root 16 0 2084 1028 768 R 0.7 0.1 0:00.05 top
2440 root 15 0 1600 524 436 S 0.3 0.1 2:56.19 syslogd
25610 mysql 16 0 209m 80m 4620 S 0.3 7.9 402:29.91 mysqld
28019 apache 16 0 44488 22m 13m S 0.3 2.2 0:03.70 httpd
28321 apache 16 0 51372 29m 16m S 0.3 3.0 0:05.88 httpd
29274 apache 16 0 44456 22m 13m S 0.3 2.2 0:03.01 httpd
29328 apache 15 0 50424 28m 15m S 0.3 2.8 0:02.04 httpd
29349 apache 15 0 49516 26m 14m S 0.3 2.6 0:01.96 httpd
1 root 16 0 1696 368 336 S 0.0 0.0 0:04.86 init
2 root 34 19 0 0 0 S 0.0 0.0 0:02.90 ksoftirqd/0
3 root 10 -5 0 0 0 S 0.0 0.0 0:01.18 events/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
5 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
7 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid

ps -aux
[root@server2 vmcmulli]# ps -aux
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 1696 368 ? S 2006 0:04 init [3]
root 2 0.0 0.0 0 0 ? SN 2006 0:02 [ksoftirqd/0]
root 3 0.0 0.0 0 0 ? S< 2006 0:01 [events/0]
root 4 0.0 0.0 0 0 ? S< 2006 0:00 [khelper]
root 5 0.0 0.0 0 0 ? S< 2006 0:00 [kthread]
root 7 0.0 0.0 0 0 ? S< 2006 0:00 [kacpid]
root 83 0.0 0.0 0 0 ? S< 2006 0:00 [kblockd/0]
root 135 0.0 0.0 0 0 ? S< 2006 0:00 [aio/0]
root 134 0.0 0.0 0 0 ? S 2006 91:05 [kswapd0]
root 86 0.0 0.0 0 0 ? S 2006 0:00 [khubd]
root 222 0.0 0.0 0 0 ? S 2006 0:00 [kseriod]
root 379 0.0 0.0 0 0 ? S< 2006 0:00 [ata/0]
root 385 0.0 0.0 0 0 ? S 2006 0:00 [scsi_eh_0]
root 386 0.0 0.0 0 0 ? S 2006 0:00 [scsi_eh_1]
root 394 0.0 0.0 0 0 ? S 2006 13:24 [kjournald]
root 1380 0.0 0.0 1588 336 ? S<s 2006 0:00 udevd
root 1893 0.0 0.0 0 0 ? S 2006 0:00 [kjournald]
root 2440 0.0 0.0 1600 524 ? Ss 2006 2:56 syslogd -m 0
root 2444 0.0 0.0 1544 388 ? Ss 2006 0:00 klogd -x
root 2486 0.0 0.0 4060 392 ? Ss 2006 0:02 rpc.idmapd
root 2498 0.0 0.0 2724 464 ? Ss 2006 2:47 nifd -n
nobody 2530 0.0 0.0 13388 476 ? Ssl 2006 0:00 mDNSResponder
root 2542 0.0 0.0 1828 540 ? S 2006 0:02 /usr/sbin/smartd
root 2563 0.0 0.0 1544 340 ? Ss 2006 0:00 /usr/sbin/acpid
root 2679 0.0 0.0 3996 704 ? Ss 2006 0:23 /usr/sbin/sshd
ntp 2701 0.0 0.4 4464 4456 ? SLs 2006 0:20 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root 2707 0.0 0.0 3996 1020 ? Ss 2006 0:00 /usr/sbin/sbadm -f /etc/ssh/.sbadm_config
popuser 2950 0.0 0.1 26832 1316 ? Ss 2006 0:04 /usr/bin/spamd --username=popuser --daemonize --helper-home-dir
popuser 2954 0.0 0.1 26764 1312 ? Ss 2006 0:04 /usr/bin/spamd --username=popuser --daemonize --helper-home-dir
popuser 2956 0.0 0.1 26832 1112 ? S 2006 0:00 spamd child
popuser 2957 0.0 0.1 26832 1116 ? S 2006 0:00 spamd child
popuser 2958 0.0 0.1 26832 1116 ? S 2006 0:00 spamd child
popuser 2959 0.0 0.1 26832 1116 ? S 2006 0:00 spamd child
popuser 2969 0.0 0.1 26832 1116 ? S 2006 0:00 spamd child
popuser 2972 0.0 0.1 26764 1116 ? S 2006 0:00 spamd child
popuser 2973 0.0 0.1 26764 1120 ? S 2006 0:00 spamd child
popuser 2974 0.0 0.1 26764 1120 ? S 2006 0:00 spamd child
popuser 2975 0.0 0.1 26764 1120 ? S 2006 0:00 spamd child
popuser 2976 0.0 0.1 26764 1120 ? S 2006 0:00 spamd child
root 3192 0.0 0.0 4672 960 ? Ss 2006 0:02 crond
root 3209 0.0 0.0 1708 568 ? Ss 2006 0:00 /usr/sbin/atd
dbus 3218 0.0 0.0 2316 924 ? Ss 2006 0:00 dbus-daemon-1 --system
root 3227 0.0 0.2 6704 2428 ? Ss 2006 0:45 hald
root 3241 0.0 0.0 1536 360 tty1 Ss+ 2006 0:00 /sbin/mingetty tty1
root 3242 0.0 0.0 1532 360 tty2 Ss+ 2006 0:00 /sbin/mingetty tty2
root 3243 0.0 0.0 1532 360 tty3 Ss+ 2006 0:00 /sbin/mingetty tty3
root 3244 0.0 0.0 1536 360 tty4 Ss+ 2006 0:00 /sbin/mingetty tty4
root 3245 0.0 0.0 1532 360 tty5 Ss+ 2006 0:00 /sbin/mingetty tty5
root 3246 0.0 0.0 1532 360 tty6 Ss+ 2006 0:00 /sbin/mingetty tty6
root 2079 0.0 0.3 9756 4104 ? S 2006 17:05 python /usr/bin/denyhosts.py --daemon --config=/usr/share/denyh
mekmatch 2188 0.0 0.0 4824 548 ? Ss 2006 0:19 SCREEN
mekmatch 2189 0.0 0.0 4516 580 pts/4 Ss+ 2006 0:00 /bin/sh
root 7909 0.0 0.0 4824 996 ? Ss 2006 0:00 SCREEN
root 7910 0.0 0.0 4648 588 pts/2 Ss 2006 0:00 /bin/bash
root 7929 0.0 0.1 6384 1108 pts/2 S+ 2006 0:32 rtorrent
root 29907 0.0 0.2 6952 2240 ? Ss 2006 0:02 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/minis
mekmatch 18109 0.0 0.0 4824 604 ? Ss 2006 0:03 SCREEN
mekmatch 18110 0.0 0.0 4512 584 pts/0 Ss+ 2006 0:00 /bin/sh
mekmatch 3946 0.0 0.0 4828 604 ? Ss 2006 0:25 SCREEN
mekmatch 3947 0.0 0.0 4512 584 pts/10 Ss+ 2006 0:00 /bin/sh
root 3080 0.0 0.1 47932 1144 ? Ss 2006 0:10 /usr/local/psa/admin/bin/httpsd
mekmatch 32027 0.0 0.0 4824 604 ? Ss 2006 0:00 SCREEN
mekmatch 32028 0.0 0.0 4516 600 pts/9 Ss+ 2006 0:00 /bin/sh
mekmatch 7533 0.0 0.0 4828 668 ? Ss 2006 0:00 SCREEN
mekmatch 7534 0.0 0.0 4512 596 pts/11 Ss+ 2006 0:00 /bin/sh
root 19418 0.0 0.0 0 0 ? S 2006 0:51 [pdflush]
root 19448 0.0 0.0 0 0 ? S 2006 0:36 [pdflush]
mekmatch 20817 0.0 0.0 4824 672 ? Ss 2006 0:00 SCREEN
mekmatch 20818 0.0 0.0 4516 600 pts/13 Ss+ 2006 0:00 /bin/sh
mekmatch 21091 0.0 0.0 4828 672 ? Ss 2006 0:00 SCREEN
mekmatch 21092 0.0 0.0 4512 600 pts/14 Ss+ 2006 0:00 /bin/sh
mekmatch 20079 0.0 0.0 4824 692 ? Ss 2006 0:00 SCREEN
mekmatch 20082 0.0 0.0 4516 596 pts/12 Ss+ 2006 0:00 /bin/sh
mekmatch 22208 0.0 0.0 4828 936 ? Ss 2006 0:13 SCREEN
mekmatch 22209 0.0 0.0 4512 908 pts/15 Ss+ 2006 0:00 /bin/sh
root 25578 0.0 0.0 4468 576 ? S 2006 0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/my.cnf --pid-
mysql 25610 1.3 7.9 214676 82000 ? Sl 2006 402:30 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr
nobody 29595 0.0 0.2 48256 2212 ? Ss 2006 11:42 /usr/local/bin/memcached -u nobody -d -m 64 -l 127.0.0.1 -p 112
root 27835 0.0 0.0 0 0 ? S 2006 1:05 [kjournald]
root 29221 0.0 0.0 2152 860 ? Ss 2006 0:04 xinetd -stayalive -pidfile /var/run/xinetd.pid
root 29702 0.0 0.1 4960 1460 ? Ss 2006 0:00 SCREEN
root 29703 0.0 0.1 4648 1420 pts/3 Ss 2006 0:00 /bin/bash
root 18878 0.0 0.0 4696 880 pts/3 S+ 2006 0:00 screen -r
mekmatch 30010 0.0 0.1 4516 1396 ? S Jan01 0:00 -sh
mekmatch 30011 0.2 3.4 299720 35344 ? Sl Jan01 44:57 /usr/local/java/jre1.5.0_06/bin/java -Xmx96m net.mektek.j2k.mer
tomcat4 9089 0.0 3.3 244284 34192 ? Sl Jan06 1:31 /usr/java/j2sdk1.4.2/bin/java -Djava.endorsed.dirs= -classpath
root 15495 0.0 0.2 8068 2232 ? Ss Jan07 0:00 cupsd
psaadm 17657 0.0 1.5 52332 16456 ? S Jan07 0:02 /usr/local/psa/admin/bin/httpsd
mailman 14945 0.0 0.5 10416 5440 ? Ss Jan08 0:00 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -s -q start
mailman 14950 0.0 0.5 10212 5456 ? S Jan08 0:01 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=ArchRunne
mailman 14951 0.0 0.5 10272 5460 ? S Jan08 0:01 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=BounceRun
mailman 14952 0.0 0.5 10220 5460 ? S Jan08 0:01 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=CommandRu
mailman 14953 0.0 0.5 10220 5452 ? S Jan08 0:01 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=IncomingR
mailman 14954 0.0 0.5 10220 5484 ? S Jan08 0:01 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=NewsRunne
mailman 14955 0.0 0.5 10260 5576 ? S Jan08 0:02 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=OutgoingR
mailman 14956 0.0 0.5 10208 5452 ? S Jan08 0:01 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=VirginRun
mailman 14957 0.0 0.5 10212 5496 ? S Jan08 0:00 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=RetryRunn
psaadm 15442 0.0 1.3 52092 13528 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18206 0.0 1.1 51848 11728 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18207 0.0 1.3 52232 14320 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18348 0.0 1.3 52720 14128 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18361 0.0 1.2 52448 13216 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18364 0.0 0.6 50640 6532 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18373 0.0 1.4 52024 15500 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18415 0.0 1.5 52724 16092 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
psaadm 18429 0.0 1.1 52328 11928 ? S Jan08 0:00 /usr/local/psa/admin/bin/httpsd
root 23502 0.0 1.3 41600 13620 ? Ss Jan09 0:01 /usr/sbin/httpd
root 23510 0.0 1.3 41544 13556 ? S Jan09 0:00 /usr/sbin/httpd
drweb 24914 0.0 0.7 12416 7748 ? Ss Jan09 0:00 /opt/drweb/drwebd
drweb 24915 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24916 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24917 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24918 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24919 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24922 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24923 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24924 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24925 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24926 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24927 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24928 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24929 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24931 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24932 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
drweb 24933 0.0 0.7 12416 7748 ? S Jan09 0:00 /opt/drweb/drwebd
root 20206 0.0 0.1 6852 2052 ? Ss 20:13 0:00 sshd: vmcmulli [priv]
vmcmulli 20210 0.0 0.2 7008 2128 ? S 20:13 0:00 sshd: vmcmulli@pts/6
vmcmulli 20211 0.0 0.1 4520 1388 pts/6 Ss 20:13 0:00 -bash
root 20242 0.0 0.1 4536 1096 pts/6 S 20:13 0:00 su
root 20243 0.0 0.1 4520 1376 pts/6 S+ 20:13 0:00 bash
apache 26241 0.1 3.1 51952 32456 ? S 22:08 0:06 /usr/sbin/httpd
apache 27432 0.2 2.8 50408 29656 ? S 22:31 0:06 /usr/sbin/httpd
apache 27468 0.2 2.6 49704 27660 ? S 22:32 0:04 /usr/sbin/httpd
apache 28019 0.1 2.2 44488 22972 ? S 22:36 0:03 /usr/sbin/httpd
apache 28321 0.3 2.9 51372 31028 ? S 22:40 0:06 /usr/sbin/httpd
apache 28329 0.2 2.9 50964 30768 ? S 22:40 0:04 /usr/sbin/httpd
apache 29269 0.1 2.5 48572 26736 ? S 22:55 0:01 /usr/sbin/httpd
apache 29274 0.3 2.1 44456 22544 ? S 22:55 0:03 /usr/sbin/httpd
apache 29276 0.2 2.7 50412 28620 ? S 22:56 0:02 /usr/sbin/httpd
apache 29316 0.4 2.9 50448 30244 ? S 22:56 0:03 /usr/sbin/httpd
apache 29322 0.4 2.9 51920 30328 ? S 22:56 0:03 /usr/sbin/httpd
apache 29328 0.2 2.7 50424 28772 ? S 22:56 0:02 /usr/sbin/httpd
apache 29337 0.3 2.6 48608 27900 ? S 22:56 0:02 /usr/sbin/httpd
apache 29349 0.2 2.5 49516 26756 ? S 22:56 0:02 /usr/sbin/httpd
apache 29352 0.2 2.8 50436 29352 ? S 22:56 0:02 /usr/sbin/httpd
apache 29354 0.1 2.6 48560 26952 ? S 22:56 0:01 /usr/sbin/httpd
apache 29359 0.2 2.5 47060 25956 ? S 22:57 0:01 /usr/sbin/httpd
apache 29366 0.2 2.5 50420 26868 ? S 22:57 0:02 /usr/sbin/httpd
apache 29375 0.2 2.6 48572 27540 ? S 22:57 0:01 /usr/sbin/httpd
apache 29397 0.3 2.7 50448 28384 ? S 22:57 0:02 /usr/sbin/httpd
apache 29399 0.2 2.2 44424 23468 ? S 22:57 0:01 /usr/sbin/httpd
root 29410 0.0 0.1 6856 2052 ? Ss 22:57 0:00 sshd: vmcmulli [priv]
vmcmulli 29424 0.0 0.2 7012 2120 ? R 22:58 0:00 sshd: vmcmulli@pts/5
vmcmulli 29427 0.0 0.1 4520 1384 pts/5 Ss 22:58 0:00 -bash
root 29458 0.0 0.1 4540 1096 pts/5 S 22:58 0:00 su
root 29465 0.0 0.1 4520 1360 pts/5 S 22:58 0:00 bash
root 29700 0.0 0.1 5220 1252 ? S 23:01 0:00 crond
root 29701 0.0 0.0 2172 908 ? Ss 23:01 0:00 /bin/bash /usr/bin/run-parts /etc/cron.hourly
root 29705 0.0 0.0 1948 608 ? S 23:01 0:00 awk -v progname=/etc/cron.hourly/mail.cron progname {????? pr
qmails 29721 0.0 0.0 1580 528 ? S 23:01 0:00 qmail-send
qmaill 29723 0.0 0.0 1540 432 ? S 23:01 0:00 splogger qmail
root 29724 0.0 0.0 1568 364 ? S 23:01 0:00 qmail-lspawn ./Maildir/
qmailr 29725 0.0 0.0 1568 372 ? S 23:01 0:00 qmail-rspawn
qmailq 29726 0.0 0.0 1532 320 ? S 23:01 0:00 qmail-clean
root 29785 0.0 0.0 3564 864 ? S 23:01 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr
root 29787 0.0 0.0 3340 428 ? S 23:01 0:00 /usr/sbin/courierlogger imapd
root 29797 0.0 0.0 3564 864 ? S 23:01 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr
root 29799 0.0 0.0 3340 432 ? S 23:01 0:00 /usr/sbin/courierlogger imapd-ssl
root 29809 0.0 0.0 3568 872 ? S 23:01 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr
root 29811 0.0 0.0 3468 620 ? S 23:01 0:00 /usr/sbin/courierlogger pop3d
root 29820 0.0 0.0 3564 864 ? S 23:01 0:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr
root 29822 0.0 0.0 3340 432 ? S 23:01 0:00 /usr/sbin/courierlogger pop3d-ssl
mektek 30408 0.0 0.1 4508 2040 ? Ss 23:09 0:00 proftpd: mektek - 156.34.176.86: IDLE
root 30457 0.0 0.0 1628 480 ? Ss 23:10 0:00 tcp-env /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /va
root 30466 0.0 0.0 2384 768 pts/5 R+ 23:10 0:00 ps -aux


[root@server2 vmcmulli]# free -m
total used free shared buffers cached
Mem: 1011 996 15 0 14 582
-/+ buffers/cache: 398 612
Swap: 2047 144 1902

my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
max_connections = 200
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 = 10M
query_cache_type = 1

[mysqld_safe]
err-log=/var/log/mysqld.log
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

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

[mysql.server]
user=mysql

httpd.conf

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 64
MaxRequestsPerChild 2000
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
# StartServers 2
# MaxClients 150
# MinSpareThreads 25
# MaxSpareThreads 75
# ThreadsPerChild 25
# MaxRequestsPerChild 0
StartServers 8
MaxClients 64
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 2000

01-12-2007 05:22 AM
Find all posts by this user Quote this message in a reply
Pacifier
Administrator
*******

Posts: 214
Group: Administrators
Joined: May 2006
Status: Offline
Reputation: 0
Post: #2
RE: Please help need optimization

Make the following changes in httpd.conf: (I assume you're using prefork MPM)

Code:
<IfModule prefork.c>
StartServers 15
MinSpareServers 15
MaxSpareServers 40
MaxClients 175
MaxRequestsPerChild 2000
</IfModule>


Make the following changes in my.cnf:

Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
max_connections = 200
key_buffer = 96M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 50
interactive_timeout = 60
wait_timeout = 60
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 10M
query_cache_type = 1


Please post stats from peak time if possible, and if you have 2 hard drives, move MySQL to a second hard disk as per my tutorial in Articles area.

01-12-2007 01:13 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: