Results 1 to 15 of 15
  1. #1
    Join Date
    Aug 2005
    Location
    Puerto Rico
    Posts
    4

    Post Help to Optimized my server!!

    i need help from somebody, my server load is too high over 50,50,50 in peak times.

    i have a P4 2.6 GHZ with 1 GB RAM

    my website receive over 10,000 visits a day is a php-nuke site my database have over 25mb data

    and this is the status of mysqladmin

    Threads: 2 Questions: 29081 Slow queries: 0 Opens: 250 Flush tables: 1 Open tables: 64 Queries per second avg: 15.258

    i need help to tunning my server please help me, because my web in peak time goes down

  2. #2
    Join Date
    Apr 2003
    Posts
    356
    Do you have a php cache if not install eaccelerator.

    http://eaccelerator.net/HomeUk

    Good howto, dont mind vps it works most if not all linux OS
    http://forums.deftechgroup.com/showthread.php?t=45

  3. #3
    Join Date
    Aug 2005
    Location
    Puerto Rico
    Posts
    4
    i have RHE ES3 in my box installed with plesk 7.5.1

  4. #4
    Join Date
    Apr 2003
    Posts
    356
    I'm sure it'll work just fine. If apache is already doing content compression then set eaccelerator.compress="0"

  5. #5
    Join Date
    Apr 2004
    Location
    Australia
    Posts
    419
    Hi, at peak time can you ps -aux for me as well as top.
    Most likely a rogue mysql, which would be my best guess, some simple configuration will fix this.

  6. #6
    Join Date
    Aug 2005
    Location
    Puerto Rico
    Posts
    4
    Originally posted by Matt -Seeksadmin
    Hi, at peak time can you ps -aux for me as well as top.
    Most likely a rogue mysql, which would be my best guess, some simple configuration will fix this.
    this load is 2 hours before the peak time, i post this time because at the peak time im not stay in my house, im go to my work now you see this load, this numbers increase by hours.

    now see "ps aux"

    USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
    root 1 0.0 0.0 1516 284 ? S Aug03 0:10 init [3]
    root 2 0.0 0.0 0 0 ? SW Aug03 0:00 [migration/0]
    root 3 0.0 0.0 0 0 ? SW Aug03 0:00 [keventd]
    root 4 0.0 0.0 0 0 ? SW Aug03 0:01 [kapmd]
    root 5 0.0 0.0 0 0 ? SWN Aug03 0:00 [ksoftirqd/0]
    root 8 0.0 0.0 0 0 ? SW Aug03 0:00 [bdflush]
    root 6 0.1 0.0 0 0 ? SW Aug03 3:56 [kswapd]
    root 7 0.2 0.0 0 0 ? SW Aug03 7:21 [kscand]
    root 9 0.0 0.0 0 0 ? SW Aug03 0:06 [kupdated]
    root 10 0.0 0.0 0 0 ? SW Aug03 0:00 [mdrecoveryd]
    root 14 0.0 0.0 0 0 ? SW Aug03 2:10 [kjournald]
    root 294 0.0 0.0 0 0 ? SW Aug03 0:00 [kjournald]
    root 675 0.0 0.0 1600 212 ? R Aug03 0:48 syslogd -m 0
    root 679 0.0 0.0 1532 160 ? S Aug03 0:00 klogd -x
    root 698 0.0 0.0 1572 144 ? S Aug03 0:00 mdadm --monitor --scan -f
    root 724 0.0 0.0 83564 236 ? S Aug03 0:08 /sbin/auditd
    root 807 0.0 0.0 1624 128 ? S Aug03 0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlogger=/u
    root 810 0.0 0.0 1520 284 ? S Aug03 0:00 /usr/lib/courier-imap/sbin/courierlogger imapd
    root 819 0.0 0.0 1636 4 ? S Aug03 0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlogger=/u
    root 821 0.0 0.0 1376 4 ? S Aug03 0:00 /usr/lib/courier-imap/sbin/courierlogger imapd-ssl
    root 829 0.0 0.0 1612 108 ? S Aug03 0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlogger=/u
    root 835 0.0 0.0 1508 220 ? S Aug03 0:00 /usr/lib/courier-imap/sbin/courierlogger pop3d
    root 840 0.0 0.0 1620 4 ? S Aug03 0:00 /usr/lib/courier-imap/libexec/couriertcpd -address=0 -stderrlogger=/u
    root 843 0.0 0.0 1396 4 ? S Aug03 0:00 /usr/lib/courier-imap/sbin/courierlogger pop3d-ssl
    root 882 0.0 0.0 0 0 ? SW Aug03 0:00 [khubd]
    named 899 0.0 0.1 37380 1440 ? S Aug03 0:14 /usr/sbin/named -u named -c /etc/named.conf -u named -t /var/named/ru
    root 912 0.0 0.0 3668 244 ? S Aug03 0:01 /usr/sbin/sshd
    root 926 0.0 0.0 2152 472 ? S Aug03 0:04 xinetd -stayalive -pidfile /var/run/xinetd.pid
    root 1052 0.0 0.0 26476 4 ? S Aug03 0:00 /usr/bin/spamd -d -c -a -m5 -H
    popuser 1131 0.0 0.0 26384 4 ? S Aug03 0:00 /usr/bin/spamd --username=popuser --daemonize --helper-home-dir=/var/
    popuser 1138 0.0 0.0 26388 4 ? S Aug03 0:00 /usr/bin/spamd --username=popuser --daemonize --helper-home-dir=/var/
    drweb 1244 0.0 0.5 12436 5720 ? S Aug03 0:38 /opt/drweb/drwebd
    root 1281 0.0 0.0 1604 376 ? S Aug03 0:01 crond
    xfs 1309 0.0 0.0 5356 60 ? S Aug03 0:00 xfs -droppriv -daemon
    root 1320 0.0 0.0 4620 120 ? S Aug03 0:00 rhnsd --interval 240
    mailman 1378 0.0 0.0 7124 188 ? S Aug03 0:00 /usr/bin/python /var/mailman/bin/mailmanctl -s -q start
    mailman 1380 0.0 0.1 7256 1092 ? S Aug03 0:25 /usr/bin/python /var/mailman/bin/qrunner --runner=ArchRunner:0:1 -s
    mailman 1383 0.0 0.1 7204 1076 ? S Aug03 0:27 /usr/bin/python /var/mailman/bin/qrunner --runner=BounceRunner:0:1 -s
    mailman 1384 0.0 0.0 7192 968 ? S Aug03 0:25 /usr/bin/python /var/mailman/bin/qrunner --runner=CommandRunner:0:1 -
    root 1388 0.0 0.0 1504 4 tty1 S Aug03 0:00 /sbin/mingetty tty1
    root 1389 0.0 0.0 1504 4 tty2 S Aug03 0:00 /sbin/mingetty tty2
    root 1390 0.0 0.0 1504 4 tty3 S Aug03 0:00 /sbin/mingetty tty3
    root 1391 0.0 0.0 1504 4 tty4 S Aug03 0:00 /sbin/mingetty tty4
    root 1392 0.0 0.0 1504 4 tty5 S Aug03 0:00 /sbin/mingetty tty5
    root 1393 0.0 0.0 1504 4 tty6 S Aug03 0:00 /sbin/mingetty tty6
    mailman 1395 0.0 0.1 7240 1096 ? S Aug03 0:24 /usr/bin/python /var/mailman/bin/qrunner --runner=IncomingRunner:0:1
    mailman 1396 0.0 0.1 7272 1036 ? S Aug03 0:26 /usr/bin/python /var/mailman/bin/qrunner --runner=NewsRunner:0:1 -s
    mailman 1397 0.0 0.1 7336 1088 ? S Aug03 0:28 /usr/bin/python /var/mailman/bin/qrunner --runner=OutgoingRunner:0:1
    mailman 1398 0.0 0.0 7244 980 ? S Aug03 0:25 /usr/bin/python /var/mailman/bin/qrunner --runner=VirginRunner:0:1 -s
    mailman 1399 0.0 0.0 7232 572 ? S Aug03 0:00 /usr/bin/python /var/mailman/bin/qrunner --runner=RetryRunner:0:1 -s
    root 31524 0.0 0.0 8672 952 ? S Aug04 0:05 cupsd
    root 25600 0.0 0.0 5332 928 ? S 02:07 0:00 /bin/sh /usr/bin/safe_mysqld --defaults-file=/etc/my.cnf --pid-file=/
    mysql 25629 25.8 1.0 29672 10876 ? S 02:07 181:01 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --data
    root 25673 0.0 0.4 21900 4292 ? S 02:08 0:07 /usr/sbin/httpd
    root 25681 0.0 0.4 21844 4168 ? S 02:08 0:00 /usr/sbin/httpd
    root 32754 0.0 0.1 12972 1548 ? S 04:32 0:01 /usr/local/psa/admin/bin/httpsd
    psaadm 32758 0.0 0.1 15484 1548 ? S 04:32 0:02 /usr/local/psa/admin/bin/httpsd
    psaadm 32759 0.0 0.1 15420 1564 ? S 04:32 0:02 /usr/local/psa/admin/bin/httpsd
    psaadm 32760 0.0 0.1 16160 1548 ? S 04:32 0:02 /usr/local/psa/admin/bin/httpsd
    psaadm 32761 0.0 0.1 15992 1564 ? S 04:32 0:02 /usr/local/psa/admin/bin/httpsd
    psaadm 32762 0.0 0.5 16128 5540 ? S 04:32 0:01 /usr/local/psa/admin/bin/httpsd
    psaadm 326 0.0 0.1 15872 1568 ? S 04:34 0:02 /usr/local/psa/admin/bin/httpsd
    psaadm 406 0.0 0.1 16592 1580 ? S 04:35 0:01 /usr/local/psa/admin/bin/httpsd
    psaadm 472 0.0 0.1 16156 1548 ? S 04:35 0:01 /usr/local/psa/admin/bin/httpsd
    psaadm 473 0.0 0.1 16164 1572 ? S 04:35 0:02 /usr/local/psa/admin/bin/httpsd
    psaadm 474 0.0 0.1 13116 1528 ? S 04:35 0:00 /usr/local/psa/admin/bin/httpsd
    qmails 1259 2.2 0.3 8140 3652 ? S 04:42 12:08 qmail-send
    qmaill 1261 0.0 0.0 1528 440 ? S 04:42 0:15 splogger qmail
    root 1262 0.0 0.0 1568 352 ? S 04:42 0:00 qmail-lspawn ./Maildir/
    qmailr 1263 0.0 0.0 1552 352 ? S 04:42 0:09 qmail-rspawn
    qmailq 1264 0.0 0.0 1524 312 ? S 04:42 0:11 qmail-clean
    apache 16681 0.4 0.8 24948 9212 ? S 13:24 0:06 /usr/sbin/httpd
    apache 16698 0.6 0.8 24772 8612 ? D 13:24 0:08 /usr/sbin/httpd
    root 16889 0.0 0.1 6868 1652 ? S 13:27 0:00 sshd: jaimito [priv]
    jaimito 16945 0.0 0.1 7016 1952 ? S 13:28 0:00 sshd: [email protected]/0
    qmailr 16960 0.0 0.0 3432 980 ? S 13:28 0:00 qmail-remote yahoo.com.tw [email protected] [email protected]
    jaimito 17004 0.0 0.1 5340 1320 pts/0 S 13:28 0:00 -bash
    root 17131 0.0 0.0 5304 972 pts/0 S 13:29 0:00 su -
    root 17200 0.0 0.1 5336 1348 pts/0 S 13:29 0:00 -bash
    qmailr 17298 0.0 0.0 3440 980 ? S 13:29 0:00 qmail-remote yahoo.com.tw [email protected] [email protected]
    qmailr 17677 0.0 0.0 3428 980 ? S 13:30 0:00 qmail-remote yahoo.com.tw [email protected] [email protected]
    apache 17787 0.4 0.8 24892 8888 ? S 13:30 0:04 /usr/sbin/httpd
    qmailr 17906 0.0 0.0 3436 980 ? S 13:31 0:00 qmail-remote yahoo.com.tw [email protected] [email protected]
    apache 18216 0.7 0.8 24448 8304 ? D 13:34 0:05 /usr/sbin/httpd
    apache 18556 0.6 0.8 24668 8844 ? S 13:36 0:04 /usr/sbin/httpd
    apache 18746 0.9 0.8 25000 8844 ? S 13:37 0:05 /usr/sbin/httpd
    apache 18854 0.9 0.8 25024 8880 ? S 13:38 0:05 /usr/sbin/httpd
    apache 18874 0.8 3.3 50792 34612 ? S 13:38 0:05 /usr/sbin/httpd
    apache 18895 0.5 0.8 24812 8680 ? S 13:38 0:02 /usr/sbin/httpd
    qmaild 19249 0.0 0.0 3284 808 ? S 13:40 0:00 /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/tr
    qmailr 19266 0.0 0.0 3436 980 ? S 13:40 0:00 qmail-remote yahoo.com.tw [email protected] eaintg618cat@
    apache 19368 1.1 0.7 24340 8180 ? S 13:41 0:05 /usr/sbin/httpd
    qmailr 19415 0.0 0.0 3420 976 ? S 13:41 0:00 qmail-remote yahoo.com.tw [email protected] [email protected]
    apache 19492 0.2 0.8 24796 8520 ? S 13:42 0:00 /usr/sbin/httpd
    apache 19494 0.9 0.8 24620 8440 ? D 13:42 0:03 /usr/sbin/httpd
    qmaild 19495 0.0 0.0 3292 804 ? S 13:42 0:00 /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/tr
    apache 19500 1.3 0.8 24432 8284 ? D 13:42 0:04 /usr/sbin/httpd
    qmaild 19550 0.0 0.0 3276 808 ? S 13:42 0:00 /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/tr
    apache 19669 0.1 0.8 24808 8600 ? S 13:42 0:00 /usr/sbin/httpd
    apache 19671 0.5 3.3 50640 34452 ? S 13:42 0:01 /usr/sbin/httpd
    apache 19674 0.2 0.8 24600 8536 ? S 13:43 0:00 /usr/sbin/httpd
    apache 19836 0.7 0.8 24468 8304 ? D 13:43 0:02 /usr/sbin/httpd
    apache 19837 0.6 0.8 24660 8456 ? S 13:43 0:01 /usr/sbin/httpd
    apache 19847 0.8 0.8 24960 8800 ? S 13:43 0:02 /usr/sbin/httpd
    apache 19849 0.6 0.8 24972 8812 ? S 13:43 0:01 /usr/sbin/httpd
    apache 20014 0.1 0.7 24088 7784 ? S 13:44 0:00 /usr/sbin/httpd
    drweb 20122 0.0 0.0 1652 796 ? S 13:44 0:00 bin/qmail-queue
    apache 20147 0.7 0.8 24828 8648 ? S 13:44 0:01 /usr/sbin/httpd
    apache 20148 0.1 0.7 23868 7604 ? S 13:44 0:00 /usr/sbin/httpd
    drweb 20217 0.0 0.0 1784 840 ? D 13:44 0:00 bin/qmail-queue
    drweb 20234 0.0 0.0 1652 796 ? S 13:45 0:00 bin/qmail-queue
    qmaild 20238 0.0 0.0 3284 808 ? S 13:45 0:00 /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/tr
    drweb 20252 0.0 0.0 1656 804 ? S 13:45 0:00 bin/qmail-queue
    apache 20267 0.9 0.7 23676 7344 ? D 13:45 0:01 /usr/sbin/httpd
    apache 20271 1.6 0.7 23784 7528 ? S 13:45 0:02 /usr/sbin/httpd
    apache 20273 1.6 0.7 23804 7552 ? S 13:45 0:02 /usr/sbin/httpd
    apache 20276 0.2 0.8 25392 9176 ? S 13:45 0:00 /usr/sbin/httpd
    apache 20277 0.7 3.3 50532 34212 ? S 13:45 0:01 /usr/sbin/httpd
    apache 20278 0.9 0.8 24864 8672 ? S 13:45 0:01 /usr/sbin/httpd
    apache 20279 0.9 3.3 50244 33984 ? S 13:45 0:01 /usr/sbin/httpd
    apache 20280 0.2 0.8 24552 8324 ? D 13:45 0:00 /usr/sbin/httpd
    apache 20284 0.8 0.7 23812 7552 ? S 13:45 0:01 /usr/sbin/httpd
    apache 20285 0.2 0.7 24376 8160 ? S 13:45 0:00 /usr/sbin/httpd
    apache 20286 0.8 0.8 24932 8772 ? S 13:45 0:01 /usr/sbin/httpd
    apache 20292 0.9 0.8 24960 8784 ? S 13:45 0:01 /usr/sbin/httpd
    drweb 20301 0.0 0.0 1648 680 ? S 13:45 0:00 bin/qmail-queue
    apache 20313 1.9 3.3 50556 34280 ? S 13:45 0:02 /usr/sbin/httpd
    apache 20325 0.0 0.7 24288 7864 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20326 0.0 0.7 24140 7756 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20335 0.1 0.8 24868 8620 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20336 0.0 0.7 24096 7716 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20344 0.2 0.0 0 0 ? Z 13:46 0:00 [httpd <defunct>]
    apache 20345 0.0 0.6 23044 6612 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20346 0.1 0.7 24276 7844 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20352 0.0 0.6 23480 6988 ? S 13:46 0:00 /usr/sbin/httpd
    qmailq 20371 0.0 0.0 1404 284 ? R 13:46 0:00 /var/qmail/bin/qmail-queue.origin
    apache 20377 0.1 0.7 24312 7964 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20378 0.1 0.7 24276 7844 ? S 13:46 0:00 /usr/sbin/httpd
    apache 20386 0.0 0.4 22032 4664 ? D 13:47 0:00 /usr/sbin/httpd
    qmailq 20387 0.0 0.0 1384 284 ? D 13:47 0:00 /var/qmail/bin/qmail-queue.origin
    root 20390 0.0 0.0 5172 968 ? R 13:47 0:00 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/sm
    apache 20393 0.0 0.4 21900 4540 ? S 13:47 0:00 /usr/sbin/httpd
    apache 20394 0.0 0.4 21900 4540 ? S 13:47 0:00 /usr/sbin/httpd
    apache 20395 0.3 0.8 25080 8700 ? S 13:47 0:00 /usr/sbin/httpd
    qmaild 20399 0.0 0.1 5304 1664 ? S 13:47 0:00 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/sm
    apache 20400 0.0 0.4 21900 4540 ? S 13:47 0:00 /usr/sbin/httpd
    qmailq 20418 0.0 0.0 1384 284 ? R 13:47 0:00 /var/qmail/bin/qmail-queue.origin
    root 20421 0.1 0.0 2864 844 pts/0 R 13:47 0:00 ps aux
    apache 20422 0.0 0.4 21900 4540 ? S 13:47 0:00 /usr/sbin/httpd
    apache 20425 0.0 0.4 22032 4668 ? D 13:48 0:00 /usr/sbin/httpd
    apache 20427 0.0 0.4 22032 4664 ? D 13:48 0:00 /usr/sbin/httpd
    root 20429 0.0 0.1 5268 1396 ? R 13:48 0:00 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/sm
    root 20431 0.0 0.0 2544 432 ? R 13:48 0:00 /usr/lib/courier-imap/sbin/pop3login /usr/lib/courier-imap/libexec/au
    root 20433 0.0 0.4 21904 4348 ? R 13:48 0:00 /usr/sbin/httpd
    apache 20434 0.0 0.4 22032 4664 ? D 13:48 0:00 /usr/sbin/httpd
    apache 20435 0.0 0.4 22032 4664 ? S 13:48 0:00 /usr/sbin/httpd
    root 20436 0.0 0.0 0 0 ? Z 13:48 0:00 [pop3login <defunct>]
    apache 20441 0.0 0.4 22032 4664 ? R 13:48 0:00 /usr/sbin/httpd
    apache 20442 0.2 0.4 22032 4664 ? S 13:48 0:00 /usr/sbin/httpd
    apache 20443 0.0 0.4 22032 4668 ? S 13:48 0:00 /usr/sbin/httpd
    apache 20444 0.2 0.4 22032 4668 ? R 13:48 0:00 /usr/sbin/httpd
    apache 20445 0.0 0.4 22032 4664 ? S 13:48 0:00 /usr/sbin/httpd
    apache 20446 0.2 0.4 22032 4664 ? S 13:48 0:00 /usr/sbin/httpd
    apache 20447 0.0 0.4 22032 4664 ? S 13:48 0:00 /usr/sbin/httpd
    root 20448 0.0 0.0 1524 528 ttyS0 S 13:48 0:00 /sbin/agetty -L 9600 ttyS0 vt100

    now see the "top"

    13:47:54 up 2 days, 8:00, 1 user, load average: 37.21, 25.04, 20.89
    197 processes: 170 sleeping, 27 running, 0 zombie, 0 stopped
    CPU states: cpu user nice system irq softirq iowait idle
    total 86.8% 0.0% 12.7% 0.0% 0.3% 0.0% 0.0%
    Mem: 1025392k av, 604440k used, 420952k free, 0k shrd, 93124k buff
    515672k actv, 28304k in_d, 2896k in_c
    Swap: 2048276k av, 143472k used, 1904804k free 105512k cached

    PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
    20271 apache 16 0 35768 33M 4044 S 11.3 3.3 0:02 0 httpd
    20328 mysql 16 0 22064 14M 1964 S 7.5 1.4 0:00 0 mysqld
    20381 mysql 16 0 22064 14M 1964 S 7.5 1.4 0:00 0 mysqld
    20369 mysql 15 0 22064 14M 1964 S 7.3 1.4 0:00 0 mysqld
    20384 mysql 16 0 22064 14M 1964 S 7.3 1.4 0:00 0 mysqld
    20391 mysql 16 0 22064 14M 1964 S 7.3 1.4 0:00 0 mysqld
    20405 mysql 16 0 22064 14M 1964 S 6.9 1.4 0:00 0 mysqld
    20374 mysql 16 0 22064 14M 1964 S 6.7 1.4 0:01 0 mysqld
    20367 mysql 16 0 22064 14M 1964 R 4.5 1.4 0:01 0 mysqld
    20372 mysql 16 0 22064 14M 1964 R 4.5 1.4 0:01 0 mysqld
    20414 mysql 16 0 22064 14M 1964 R 2.9 1.4 0:00 0 mysqld
    19847 apache 16 0 10688 9092 4136 S 1.5 0.8 0:02 0 httpd
    19843 apache 15 0 10080 8484 4096 S 1.1 0.8 0:03 0 httpd
    20326 apache 15 0 9336 7736 3960 S 1.1 0.7 0:00 0 httpd
    20346 apache 16 0 9424 7816 4000 S 1.1 0.7 0:00 0 httpd
    19836 apache 15 0 10416 8820 4136 S 0.9 0.8 0:02 0 httpd
    20147 apache 16 0 10352 8756 4120 S 0.9 0.8 0:01 0 httpd
    20335 apache 16 0 9440 7832 3956 S 0.9 0.7 0:00 0 httpd
    20344 apache 16 0 9384 7776 3960 S 0.9 0.7 0:00 0 httpd
    18895 apache 16 0 10264 8696 4136 S 0.7 0.8 0:02 0 httpd
    20276 apache 16 0 10208 8608 4072 S 0.7 0.8 0:00 0 httpd
    20279 apache 15 0 35596 33M 4044 S 0.7 3.3 0:01 0 httpd
    20286 apache 15 0 10660 9064 4136 S 0.7 0.8 0:01 0 httpd
    20324 apache 16 0 9196 7596 3956 S 0.7 0.7 0:00 0 httpd
    20337 mysql 16 0 22064 14M 1964 S 0.7 1.4 0:00 0 mysqld
    20377 apache 15 0 10132 8524 3960 S 0.7 0.8 0:00 0 httpd
    19837 apache 15 0 9760 8164 4096 S 0.5 0.7 0:01 0 httpd
    20313 apache 15 0 9388 7780 3968 S 0.5 0.7 0:01 0 httpd
    20362 mysql 16 0 22064 14M 1964 S 0.5 1.4 0:00 0 mysqld
    20382 mysql 15 0 22064 14M 1964 S 0.5 1.4 0:00 0 mysqld
    20383 apache 15 0 8960 7352 3948 S 0.5 0.7 0:00 0 httpd
    20411 mysql 16 0 22064 14M 1964 R 0.5 1.4 0:00 0 mysqld
    18216 apache 15 0 9900 8304 4140 S 0.3 0.8 0:05 0 httpd
    18746 apache 15 0 10144 8552 4136 S 0.3 0.8 0:05 0 httpd
    20273 apache 15 0 9148 7552 4044 S 0.3 0.7 0:02 0 httpd
    20392 root 15 0 1228 1228 896 R 0.3 0.1 0:00 0 top
    20401 mysql 15 0 22064 14M 1964 S 0.3 1.4 0:00 0 mysqld
    20402 mysql 15 0 22064 14M 1964 S 0.3 1.4 0:00 0 mysqld
    20407 mysql 15 0 22064 14M 1964 S 0.3 1.4 0:00 0 mysqld
    14 root 15 0 0 0 0 SW 0.1 0.0 2:10 0 kjournald
    16698 apache 15 0 10688 9092 4136 S 0.1 0.8 0:08 0 httpd
    19368 apache 15 0 9776 8180 4132 S 0.1 0.7 0:03 0 httpd

  7. #7
    Join Date
    Dec 2001
    Location
    Netherlands
    Posts
    780
    submit the output of this command:

    pstree

    furthermore, run

    netstat -an | grep :80

    and see if all those http are comming from a single IP (some proxy, single IP or different IP) to determine if those traffic are for real or if you have someone attacking you .. a probable DOS..


    how many sites are you hosting in your server ? your top memory usage shows above that memory is not the issue . Its definately CPU .. one/more of your site <probably with php> has some custom queries going into mysql .. perhaps too much joins and inner joins.
    A probablity might be a portal/busy site which index.php is custom made, with too many php queries going on via the single page.

    using vmstat 1 will also give you a real time detail of your system i/o and perhaps point to the bottleneck.

    Experienced OpenStack Admin For Hire
    regular as admin0 on freenode IRC on #openstack and #openstack-ansible channels

  8. #8
    Join Date
    Apr 2004
    Location
    Australia
    Posts
    419
    Do as admin0 said to see if it is a DDOS, if not then you need to configure apache and mysql better than it currently is, so that it doesn't use that many resources. Lots of articles can be found about that on the internet.

    On a side note: You should be disabling services such as cups

  9. #9
    Join Date
    Aug 2005
    Location
    Puerto Rico
    Posts
    4
    Im hosted 3 sites but 1 site only is run, and have over 10,000 visits per day is a PHP-Nuke site the domain name is Reggaeton.net, and the load average is only in peak times, for this reason i dont think is a DDoS attack, because afect only in peak times and this situations is every day. i have installed APF Firewall with BFD. continue with the command admin0 request.

    pstree command show this:

    [[email protected] root]# pstree
    init─┬─auditd
    ├─bdflush
    ├─4*[courierlogger]
    ├─4*[couriertcpd]
    ├─crond
    ├─cupsd
    ├─drwebd
    ├─httpd───119*[httpd]
    ├─httpsd───10*[httpsd]
    ├─kapmd
    ├─keventd
    ├─khubd
    ├─2*[kjournald]
    ├─klogd
    ├─kscand
    ├─ksoftirqd/0
    ├─kswapd
    ├─kupdated
    ├─mdadm
    ├─mdrecoveryd
    ├─6*[mingetty]
    ├─named
    ├─python───8*[python]
    ├─qmail-send─┬─qmail-clean
    │ ├─qmail-lspawn
    │ ├─qmail-rspawn───2*[qmail-remote]
    │ └─splogger
    ├─rhnsd
    ├─safe_mysqld───mysqld
    ├─3*[spamd]
    ├─sshd───sshd───sshd───bash───su───bash───pstree
    ├─syslogd
    ├─xfs
    └─xinetd─┬─qmail-smtpd───qmail-queue
    ├─qmail-smtpd
    └─tcp-env

    netstat -an | grep :80 show this:

    [[email protected] root]# netstat -an | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    tcp 0 0 64.246.18.197:80 66.98.79.157:2244 SYN_RECV
    tcp 0 0 64.246.18.197:80 200.112.63.75:34680 SYN_RECV
    tcp 0 0 64.246.18.197:80 200.121.217.164:19744 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.121.217.164:19747 TIME_WAIT
    tcp 0 6855 64.246.18.197:80 66.50.3.94:2743 FIN_WAIT1
    tcp 0 0 64.246.18.197:80 201.240.164.173:10449 TIME_WAIT
    tcp 0 0 64.246.18.197:80 201.240.164.173:10450 TIME_WAIT
    tcp 0 0 64.246.18.197:80 201.240.164.173:10445 TIME_WAIT
    tcp 0 0 64.246.18.197:80 201.240.95.252:21074 ESTABLISHED
    tcp 0 0 64.246.18.197:80 200.121.217.164:19735 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.121.217.164:19740 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.121.217.164:19736 TIME_WAIT
    tcp 1 0 64.246.18.197:80 85.137.66.203:3936 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 201.243.177.100:1710 TIME_WAIT
    tcp 1 0 64.246.18.197:80 68.142.251.62:38862 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 201.230.37.252:50032 ESTABLISHED
    tcp 0 0 64.246.18.197:80 162.83.161.240:3159 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.78.59.218:63481 TIME_WAIT
    tcp 1 0 64.246.18.197:80 62.15.205.146:4088 CLOSE_WAIT
    tcp 1 0 64.246.18.197:80 62.15.205.146:4072 CLOSE_WAIT
    tcp 1 0 64.246.18.197:80 62.15.205.146:4079 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 201.240.78.99:15298 ESTABLISHED
    tcp 0 0 64.246.18.197:80 200.87.150.205:3044 ESTABLISHED
    tcp 0 0 64.246.18.197:80 200.90.69.2:3598 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.90.69.2:3596 TIME_WAIT
    tcp 1 0 64.246.18.197:80 164.77.191.212:1232 CLOSE_WAIT
    tcp 1 13140 64.246.18.197:80 67.104.104.151:3425 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 200.90.69.2:3617 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.25.151.10:3760 TIME_WAIT
    tcp 1 0 64.246.18.197:80 200.75.46.75:54021 CLOSE_WAIT
    tcp 1 0 64.246.18.197:80 201.243.93.29:65125 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 200.121.45.221:25765 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.121.45.221:25766 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.121.45.221:25786 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.121.45.221:25787 TIME_WAIT
    tcp 1 0 64.246.18.197:80 207.218.157.243:1670 CLOSE_WAIT
    tcp 0 6433 64.246.18.197:80 81.41.99.57:1203 FIN_WAIT1
    tcp 0 0 64.246.18.197:80 201.246.205.197:58365 ESTABLISHED
    tcp 0 5655 64.246.18.197:80 200.62.183.81:1058 FIN_WAIT1
    tcp 0 0 64.246.18.197:80 201.240.254.78:11191 TIME_WAIT
    tcp 0 0 64.246.18.197:80 201.240.254.78:11189 TIME_WAIT
    tcp 0 13140 64.246.18.197:80 201.246.205.193:2548 ESTABLISHED
    tcp 1 0 64.246.18.197:80 24.128.26.10:3960 CLOSE_WAIT
    tcp 1 0 64.246.18.197:80 24.128.26.10:3958 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 200.121.57.113:11694 FIN_WAIT2
    tcp 0 0 64.246.18.197:80 216.241.28.164:1066 ESTABLISHED
    tcp 1 0 64.246.18.197:80 68.32.109.11:14301 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 201.246.205.193:10643 ESTABLISHED
    tcp 1 0 64.246.18.197:80 196.3.88.166:19349 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 200.121.28.70:16822 TIME_WAIT
    tcp 1 0 64.246.18.197:80 201.243.93.29:65339 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 201.240.254.78:11207 TIME_WAIT
    tcp 1 0 64.246.18.197:80 64.76.82.34:55992 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 201.240.254.78:11205 TIME_WAIT
    tcp 1 0 64.246.18.197:80 200.69.136.146:4131 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 201.240.254.78:11200 TIME_WAIT
    tcp 0 0 64.246.18.197:80 201.246.205.197:57767 ESTABLISHED
    tcp 0 0 64.246.18.197:80 66.98.52.184:3917 TIME_WAIT
    tcp 0 0 64.246.18.197:80 66.98.52.184:3915 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.120.37.93:4685 ESTABLISHED
    tcp 0 0 64.246.18.197:80 213.66.247.41:3029 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.90.228.240:60913 ESTABLISHED
    tcp 0 0 64.246.18.197:80 200.121.57.113:11599 FIN_WAIT2
    tcp 1 0 64.246.18.197:80 69.203.127.27:2009 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1710 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1708 FIN_WAIT2
    tcp 0 0 64.246.18.197:80 200.62.183.81:1705 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1727 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1724 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.121.57.113:11603 FIN_WAIT2
    tcp 0 0 64.246.18.197:80 200.62.183.81:1734 TIME_WAIT
    tcp 0 0 64.246.18.197:80 66.50.106.122:3901 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1735 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1732 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1733 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1730 TIME_WAIT
    tcp 0 1 64.246.18.197:80 200.62.183.81:1731 CLOSING
    tcp 0 0 64.246.18.197:80 200.62.183.81:1743 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1740 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1741 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1738 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1739 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1736 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.62.183.81:1737 TIME_WAIT
    tcp 0 0 64.246.18.197:80 66.50.25.21:1074 ESTABLISHED
    tcp 0 1 64.246.18.197:80 200.62.183.81:1744 CLOSING
    tcp 0 1 64.246.18.197:80 200.62.183.81:1745 CLOSING
    tcp 0 0 64.246.18.197:80 200.52.195.3:1264 ESTABLISHED
    tcp 0 0 64.246.18.197:80 200.118.103.103:3918 TIME_WAIT
    tcp 0 0 64.246.18.197:80 200.118.103.103:3919 TIME_WAIT
    tcp 0 0 64.246.18.197:80 201.246.117.227:18863 ESTABLISHED
    tcp 0 0 64.246.18.197:80 168.226.237.173:35437 ESTABLISHED
    tcp 1 0 64.246.18.197:80 68.142.250.14:59478 CLOSE_WAIT
    tcp 0 0 64.246.18.197:80 200.105.21.23:33100 ESTABLISHED

  10. #10
    Join Date
    Jan 2003
    Posts
    1,715
    PHP Nuke is a horrible hunk of crap. It doesn't index any queries, so a large or busy install will take a box down in a hurry. You also have something spawning a lot of processes -- you shouldn't have 400 MB free like that.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

  11. #11
    Join Date
    Dec 2001
    Location
    Netherlands
    Posts
    780
    To fix what you are getting when you are using pstree,
    enter
    LANG=en_US

    then run the pstree and it will give the corrent font, and a readable output. Turns out that your PHP Nuke is to be blamed for all this.
    Perhaps you can have the site owner change to postnuke, or drupal or even mambo, though postnuke will be the closest and an easy upgrade. Postnuke offers caching, so your mysql won't be hammered as hard as it is being now.

    Maybe you can also set mysql to skip table locking, if that is not already set to improve performance a bit! .

    Experienced OpenStack Admin For Hire
    regular as admin0 on freenode IRC on #openstack and #openstack-ansible channels

  12. #12
    Join Date
    Jun 2004
    Location
    Federal Way, WA
    Posts
    22
    Mysql is fast. However it is SLOW AS HELL if you do not index A LOT of your tables and important FIELDs in the tables.

    I am not sure if PHP NUKE has indexed properly their Tables but it is VERY easy to do using phpmyadmin... index all 'id' and Primary Key fields just by selecting the table and clicking INDEX link for which every field you want to index.

    Once indexed MySQL is VERY fast, otherwise it will eat up your CPU like no tomorrow.

    Trust me. I believe that is your solution. I had similar problem because of bad INDEXing on my MySQL tables.
    DigiPanel - Web Host Control Panel
    http://digipanel.com
    Offering Free Licenses to ISP's and Hosting Companies!

  13. #13
    Join Date
    Feb 2004
    Posts
    322
    just by selecting the table and clicking INDEX link for which every field you want to index.
    ----------------
    Hi nulled , what do u mean it ? Could you explain it more ? I am a newbie in mysql .

  14. #14
    Join Date
    Feb 2004
    Posts
    322
    anyone else know about this 'index' things ? Please help !

  15. #15
    I would suggest you drop PHPNuke and go with CPGNuke, they have really cleaned up the PHPNuke code, optimized it a lot more, dropped more than 1/2 the queries, and it is a lot more secure, it loads about 2-3 times faster. It will take your database and convert it over. You also look at using something like JPCache to cache some of your content for a couple of minutes or more if you can that will speed things up also.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •