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
I'm not very tech savvy...what your describing is out of my scope...
High loads are also often caused due to DDOS attacks. Have you checked your SSH logs? Or you can check real time connections to your server with number of connections and IP address by using this command:

netstat -ntu | grep 127.0.0.1| awk '{print $5}' | sed 's/::ffff://' | cut -d: -f1 | sort | uniq -c | sort -n

where 127.0.0.1 is your server IP.
sometimes it seems like its mysql thats causing the issue:


1609 mysql 15 0 618M 303M 5392 S 36.0 13.2 21:03.98 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
5204 mysql 16 0 618M 303M 5392 S 30.0 13.2 0:14.96 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
19836 neochi 18 0 136M 13516 7136 R 19.0 0.6 0:00.31 /usr/bin/php /home/neochi/public_html/forumdisplay.php
19835 root 18 0 138M 15820 7268 R 18.0 0.7 0:00.30 /opt/suphp/sbin/suphp
19833 neochi 17 0 139M 17540 7928 S 9.0 0.7 0:00.44 /usr/bin/php /home/neochi/public_html/showthread.php
19834 root 19 0 59088 2884 2228 R 7.0 0.1 0:00.26 /usr/sbin/sendmail -t -i
1295 root 15 0 14276 2348 1184 R 5.0 0.1 11:52.57 htop
20156 mysql 15 0 618M 303M 5392 R 5.0 13.2 0:07.17 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var
1651 nobody 18 0 428M 25964 2588 S 4.0 1.1 1:39.37 /usr/local/apache/bin/httpd -k start -DSSL
19832 root 18 0 0 0 0 Z 3.0 0.0 0:00.46 php
19830 neochi 15 0 140M 18
http://lifehacker.com/5204434/the-beginn...virtualbox

Create a new VM using the same OS you use on your VPS using the above guide.
MySQL can be a resource hog too. There are a ton of optimisation guides for it on the internet though. Check out this stack overflow post: http://stackoverflow.com/questions/12822...-cpu-usage
(2012-11-07, 04:59 PM)crazy4cs Wrote: [ -> ]High loads are also often caused due to DDOS attacks. Have you checked your SSH logs? Or you can check real time connections to your server with number of connections and IP address by using this command:

netstat -ntu | grep 127.0.0.1| awk '{print $5}' | sed 's/::ffff://' | cut -d: -f1 | sort | uniq -c | sort -n

where 127.0.0.1 is your server IP.

where can i check my logs?

i typed
netstat -ntu | grep 127.0.0.1| awk '{print $5}' | sed 's/::ffff://' | cut -d: -f1 | sort | uniq -c | sort -n
five times and got:

1st time:1 127.0.0.1
2nd time:1 127.0.0.1
3rd time:2 127.0.0.1
4th time:3 127.0.0.1
5th time:3 127.0.0.1

(2012-11-07, 05:02 PM)euantor Wrote: [ -> ]MySQL can be a resource hog too. There are a ton of optimisation guides for it on the internet though. Check out this stack overflow post: http://stackoverflow.com/questions/12822...-cpu-usage

So then your not sure if it's apache or mysql?
It's likely a combination of the two. If you haven't taken any steps to optimise them then you're going to have a bad time in a production environment.
You entered that command for local IP, you need to replace it with your server IP.

And I will recommend installing some firewall on server which keeps logs.

And many messages are often recorded in /var/log.
(2012-11-07, 05:08 PM)euantor Wrote: [ -> ]It's likely a combination of the two. If you haven't taken any steps to optimise them then you're going to have a bad time in a production environment.

But the average joe using mybb wouldn't have done these optimizations either...

I just don't understand why I'm having issues...again is this considered normal for my scenario (apache, no sql optimizations, etc)?

I just assumed everything out of the box should be pretty good...
It's not up to MyBB to tell you how to run a server...

If you didn't know what you were doing, you should have chosen a managed service or found somebody willing to manage your server for you.
Pages: 1 2 3 4