MyBB Community Forums

Full Version: High CPU usage!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
nginx would bring down CPU usage and memory usage. Apache is a monster if you don't optimise and look after it.
They always say optimize the code, that's not much of our problems, unless you're running some resource intensive plugins which you can cut off.

As I said, many hosts do provide shared extra cores or CPUs to VPS which helps stabilizing the load, so you can ask them.
(2012-11-07, 04:26 PM)crazy4cs Wrote: [ -> ]They always say optimize the code, that's not much of our problems, unless you're running some resource intensive plugins which you can cut off.

As I said, many hosts do provide shared extra cores or CPUs to VPS which helps stabilizing the load, so you can ask them.

So then are you saying that my server needs are normal for my traffic and that I can't fix this by optimizations?
No. It certainly is not normal. As I said before, you definitely should NOT need a dedicated server with these kind of stats. Have you tried disabling some of the more intensive options within the software such as the breadcrumb multipage and the users viewing this thread features?
(2012-11-07, 04:25 PM)euantor Wrote: [ -> ]nginx would bring down CPU usage and memory usage. Apache is a monster if you don't optimise and look after it.

Shouldn't I find the cause of the high server load (if it is unnormal for my conditions) and fix it instead of trying to lower CPU usage in other ways?

(2012-11-07, 04:38 PM)euantor Wrote: [ -> ]No. It certainly is not normal. As I said before, you definitely should NOT need a dedicated server with these kind of stats. Have you tried disabling some of the more intensive options within the software such as the breadcrumb multipage and the users viewing this thread features?

Yes I've disabled both those options. and I only have two plugins which I've both disable with no effects.

If this isn't normal what can be causing it?
Well, yes. Have you tried looking at the output of top? If you can't understand it, feel free to post it below.
(2012-11-07, 04:26 PM)crazy4cs Wrote: [ -> ]They always say optimize the code, that's not much of our problems, unless you're running some resource intensive plugins which you can cut off.

As I said, many hosts do provide shared extra cores or CPUs to VPS which helps stabilizing the load, so you can ask them.

I'm moving to a dedicated soon so hardware wise I shouldn't have to worry.

I just want to fix what's causing the high CPU usage incase it overcomes even the dedicated...

13976 neochi 18 0 138M 15800 7352 R 18.0 0.7 0:00.34 /usr/bin/php /home/neochi/public_html/newreply.php
13975 root 18 0 112M 3852 2988 R 17.0 0.2 0:00.30 /opt/suphp/sbin/suphp
13973 neochi 18 0 139M 17544 7944 S 12.0 0.7 0:00.32 /usr/bin/php /home/neochi/public_html/showthread.php
13974 neochi 18 0 112M 3852 2988 R 12.0 0.2 0:00.31 /usr/bin/php /home/neochi/public_html/showthread.php
13968 nobody 18 0 139M 17524 7916 S 9.0 0.7 0:00.35
1295 root 16 0 14276 2348 1184 R 9.0 0.1 10:43.10 htop
13967 neochi 17 0 139M 17556 7944 S 8.0 0.7 0:00.44 /usr/bin/php /home/neochi/public_html/showthread.php
1609 mysql 15 0 618M 302M 5392 S 7.0 13.1 19:11.06 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
13966 neochi 18 0 139M 17512 7912 S 7.0 0.7 0:00.45 /usr/bin/php /home/neochi/public_html/forumdisplay.php
24177 mysql 16 0 618M 302M 5392 D 6.0 13.1 0:06.16 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
13958 neochi 16 0 140M 19032 8140 S 5.0 0.8 0:00.61 /usr/bin/php /home/neochi/public_html/showthread.php
4008 nobody 18 0 429M 28420 2576 S 4.0 1.2 1:47.42 /usr/local/apache/bin/httpd -k start -DSSL
13953 neochi 16 0 140M 18336 8024 S 1.0 0.8 0:00.43 /opt/suphp/sbin/suphp
1651 nobody 18 0 426M 19616 2588 S 1.0 0.8 1:03.87 /usr/local/apache/bin/httpd -k start -DSSL
4055 nobody 15 0 429M 28420 2576 D 1.0 1.2 0:04.21 /usr/local/apache/bin/httpd -k start -DSSL
4021 nobody 15 0 429M 28420 2576 R 1.0 1.2 0:04.74 /usr/local/apache/bin/httpd -k start -DSSL
5208 mysql 15 0 618M 302M 5392 S 1.0 13.1 0:09.71 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
11268 mysql 16 0 618M 302M 5392 S 0.0 13.1 0:09.43 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
17900 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:08.77 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
17885 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:06.54 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
13897 root 20 0 59080 2876 2228 R 0.0 0.1 0:00.19 /usr/sbin/sendmail -t -i
24175 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:04.75 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
5137 nobody 15 0 429M 28420 2576 S 0.0 1.2 0:04.45

14061 neochi 18 0 137M 14196 7136 R 18.0 0.6 0:00.42 /usr/bin/php /home/neochi/public_html/private.php
14063 neochi 18 0 70948 596 356 R 18.0 0.0 0:00.33 /usr/bin/php /home/neochi/public_html/forumdisplay.php
14062 neochi 18 0 124M 6816 4852 R 13.0 0.3 0:00.34 /usr/bin/php /home/neochi/public_html/forumdisplay.php
4008 nobody 18 0 429M 28420 2576 S 13.0 1.2 1:49.18 /usr/local/apache/bin/httpd -k start -DSSL
1295 root 15 0 14276 2348 1184 R 5.0 0.1 10:44.88 htop
32642 nobody 18 0 422M 12220 2280 S 5.0 0.5 0:12.16 /usr/local/apache/bin/httpd -k start -DSSL
4056 nobody 15 0 429M 28420 2576 S 3.0 1.2 0:04.12 /usr/local/apache/bin/httpd -k start -DSSL
1609 mysql 15 0 618M 302M 5392 S 1.0 13.1 19:17.20 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
4033 nobody 15 0 429M 28420 2576 S 1.0 1.2 0:04.16 /usr/local/apache/bin/httpd -k start -DSSL
4027 nobody 15 0 429M 28420 2576 S 1.0 1.2 0:04.50 /usr/local/apache/bin/httpd -k start -DSSL
4019 nobody 15 0 429M 28420 2576 S 1.0 1.2 0:04.45 /usr/local/apache/bin/httpd -k start -DSSL
4061 nobody 16 0 429M 28420 2576 S 1.0 1.2 0:04.40 /usr/local/apache/bin/httpd -k start -DSSL
4023 nobody 16 0 429M 28420 2576 S 1.0 1.2 0:04.07 /usr/local/apache/bin/httpd -k start -DSSL
32722 nobody 15 0 422M 12220 2280 S 1.0 0.5 0:00.44 /usr/local/apache/bin/httpd -k start -DSSL
32715 nobody 16 0 422M 12220 2280 S 1.0 0.5 0:00.41 /usr/local/apache/bin/httpd -k start -DSSL
32701 nobody 15 0 422M 12220 2280 S 1.0 0.5 0:00.60 /usr/local/apache/bin/httpd -k start -DSSL
17914 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:07.71 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
14040 root 20 0 10464 900 696 R 0.0 0.0 0:00.36 netstat -anp
24232 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:05.96 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
14037 neochi 19 0 56548 1980 1504 R 0.0 0.1 0:00.05 /usr/bin/php /home/neochi/public_html/private.php
4060 nobody 15 0 429M 28420 2576 S 0.0 1.2 0:03.72 /usr/local/apache/bin/httpd -k start -DSSL
14044 root 19 0 59084 2596 2020 S 0.0 0.1 0:00.23 /usr/sbin/sendmail -t -i
13378 mysql 16 0 618M 302M 5392 S 0.0 13.1 0:10.05 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
24197 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:05.40 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
10224 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:08.64 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
1651 nobody 18 0 426M 19640 2588 S 0.0 0.8 1:04.48 /usr/local/apache/bin/httpd -k start -DSSL
4021 nobody 15 0 429M 28420 2576 S 0.0 1.2 0:04.79 /usr/local/apache/bin/httpd -k start -DSSL
24208 mysql 16 0 618M 302M 5392 S 0.0 13.1 0:06.15 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
11265 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:10.67 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/m

14178 neochi 18 0 138M 16164 7660 R 11.0 0.7 0:00.34 /usr/bin/php /home/neochi/public_html/showthread.php
14175 neochi 18 0 112M 3852 2988 R 11.0 0.2 0:00.20 /opt/suphp/sbin/suphp
1609 mysql 15 0 618M 302M 5392 S 10.0 13.1 19:23.50 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
14179 root 19 0 59084 2884 2228 R 10.0 0.1 0:00.25 /usr/sbin/sendmail -t -i
24189 mysql 17 0 618M 302M 5392 S 8.0 13.1 0:06.25 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
1295 root 15 0 14276 2348 1184 R 6.0 0.1 10:47.36 htop
1651 nobody 18 0 426M 19640 2588 S 2.0 0.8 1:04.75 /usr/local/apache/bin/httpd -k start -DSSL
32643 nobody 18 0 421M 11336 2264 S 2.0 0.5 0:10.79 /usr/local/apache/bin/httpd -k start -DSSL
4008 nobody 18 0 269M 27956 2580 S 1.0 1.2 1:50.51 /usr/local/apache/bin/httpd -k start -DSSL
14174 neochi 16 0 140M 18684 8108 S 0.0 0.8 0:00.52 /usr/bin/php /home/neochi/public_html/index.php
14170 neochi 15 0 140M 19128 8148 S 0.0 0.8 0:00.63 /usr/bin/php /home/neochi/public_html/newreply.php
24196 mysql 15 0 618M 302M 5392 R 0.0 13.1 0:05.20 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
17879 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:08.50 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
24215 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:06.16 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
20155 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:08.16 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
1664 nobody 15 0 426M 19640 2588 S 0.0 0.8 0:02.47 /usr/local/apache/bin/httpd -k start -DSSL
24232 mysql 16 0 618M 302M 5392 S 0.0 13.1 0:06.52 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
24187 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:07.00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
10237 mysql 16 0 618M 302M 5392 S 0.0 13.1 0:09.84 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
32644 nobody 18 0 869M 15616 2264 S 0.0 0.7 0:18.17 /usr/local/apache/bin/httpd -k start -DSSL
13378 mysql 16 0 618M 302M 5392 S 0.0 13.1 0:10.18 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
24175 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:04.83 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
20148 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:05.94 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
10224 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:09.01 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
3090 mysql 15 0 618M 302M 5392 S 0.0 13.1 0:15.67 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
1067 nobody 18 0 428M 22856 2576 S 0.0 1.0 0:39.45 /usr/local/apache/bin/httpd -k start -DSSL
1619 mysql 15 0 618M 302M
Yeah, as I suspected apache seems to be causing the issue. I really do advise taking nginx for a whirl.
ok so how do i do that exactly?

keep in mind I'm on a vps
Obviously you want to try it out in a local environment first. Do you have VirtualBox or anything similar installed? If not, I highly recommend setting up a VM with the same setup as your VPS. It comes in useful in circumstances like this where you wish to test new software.
Pages: 1 2 3 4