SMF forum uses a large amount of CPU resources

Started by jholla, September 29, 2016, 05:27:55 PM

Previous topic - Next topic

jholla

I'm running an SMF forum on a SiteGround shared server, and the logs are showing over 60,000 CPU executions within a 24 hour time period. The forum is: hxxp:unofficialwarmoth.com [nonactive]. I updated the robots file, optimized the db tables and updated some SMF settings to try to make an impact. Here's a list of the current mods (I'm really not running much extra):

SMF 1.1.19 / 2.0.6 Update 1.0
SMF 2.0.8 Update  1.0
SMF 1.1.20 / 2.0.9 Update 1.0
SMF 2.0.12 Update 1.0
SMF 2.0.11 Update 1.0
reCAPTCHA for SMF 0.9.8a
Google Analytics Code 1.4
SMF 1.1.21 / 2.0.10 Update  1.0
Like Posts  2.0.5
SMF 2.0.7 Update  1.0
Soundcloud BBcode 1.7
Akismet Spam Blocking 1.2
Custom BBCodes Manager  2.1
httpBL  2.5.1
Misc Anti Spam  1.0

Does anyone have any suggestions for ways that I can optimize this and reduce the CPU usage?

jholla

Just saw one of the sticky posts, so here is an update:


  • PHPinfo: hxxp:www.unofficialwarmoth.com/phpinfo.php [nonactive]
  • Status: hxxp:www.unofficialwarmoth.com/status.php [nonactive]
  • This is a shared server hosted by SiteGround
  • Posts: 362,886
  • Users: usually 75-100 members and guests
  • Posts: 362,886

Matthew K.

I would remove the link to your PHPInfo file, could be dangerous to expose.

jholla

I deleted the phpinfo file for now, just trying to provide any resources that might help with a solution. Any ideas?

vbgamer45

You might need to upgrade to a VPS 75-100 members online at a time is a lot for shared hosting

Check out this topic for tips
http://www.simplemachines.org/community/index.php?topic=293441.0
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

LiroyvH

75-100 members online is not that bad for shared (depending on mods...), but the amount of requests is a bit strange if it's usually not that high...
Other than that; 60.000 in 24 hours would be 1.830.000 pageviews per month. 60.000/24hr = 41 pageviews per minute. Not too shocking.
(SiteGround usually implies a limit of 60K/month IIRC... Which is *really* low.)

According to SiteGround's calculations, that is. It states that everytime a PHP script is loaded it's a "CPU execution".
Bit of a vague way to calculate things. The important question here is: is 60.000/24 hour abnormal for your site; or do you for example get 50K/24hr normally? Or do you usually get less than 60K in an entire month?

A bit more statistics make it easier.
But to give some lead; according to SiteGround the CPU Executions are based on a PHP script executing. So if that's suddenly a lot: you might want to look in cPanel at the access log for that day to see if, for example, you see a searchbot hitting your website and requesting thousands of pages... That can certainly cause such peaks.

The "CPU Executions" is not really saying your forum is causing a high load or anything, all it's really saying is that you had a lot of visitors visiting .php files...
If someone would request the phpinfo.php 60.000 times: you'd be on 60K executions.
However, if someone loads a forum with an insane amount of mods and executing 100 SQL queries on each load, and load it 60.000 times: it's still 60K executions. :')
... At least, that's what I extract from the explanation in their FAQ.
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Matthew K.

And for the record, SMF does a pretty darn good job at minimizing intensive processes. If there are some, probably from mods.

Advertisement: