• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

High usage on index.php

Rho Delta

Well-known member
#3
Add Skimlinks Code 1.1

Add-on Installer 0.2

Avatar for Banned Users 1.0

BBcode MediaSites Pack 1.0.0

CustomImgCaptcha - Customise your own images for CAPTCHA 1.1.6

ForumRunner for XenForo 1.1.3

Guests And Invalid Users Thread View Limit 1.0

Instagram Media Site 1.1

Nodes As Tabs 1.1.3

Online Status 1.1

PinIt Share Button 1.0

Post Ratings 1.4.1

RCBD - What's New 1.1.0

TaigaChat Pro 1.0.2

Tapatalk 1.1.4

Thread Thumbnails by Waindigo 1.3.1

Thread Watchers 1.2

Twitter Auth 1.2.0

UrlRewriter 1

XenFans.com - Profile PC 1.0.0

XenFans.com - Welcome Blocks 1.0.1

XenFans.com - What's New Block 1.1.1

[8wayRun.Com] XenAtendo (Events) 1.4.6

[8wayRun.Com] XenMedio (Media) 1.5.0

[8wayRun.Com] XenPorta (Portal) 1.5.3

[bd] Anonymous Posting 2.0

[bd] Rotating Ads 1.6.2

[bd] Tag Me 1.6.5

[LN] Blog 1.0.0 Beta 3B

[SurreyForum] XenKingDir - Business / Links Directory 1.2.0.1

[xfr] User Albums 1.0.0 b7
 

Rho Delta

Well-known member
#6
My support ticket just replied with another issue:
You were using 100% of your table cache in mySQL. I bumped it up and restarted mySQL. Everything seems to be running smoothly now.

Thoughts?
 

Digital Doctor

Well-known member
#7
When discussing performance, people like Walter ask for:
(1) my.cnf
(2) nix commands:
  • nice top -c
  • free -m

Please post your my.cnf.
Parts of your high load are caused by IO (25% WA). Maybe there is no Innodb buffer in your my.cnf and Mysql struggles and has to read all from disk.
@OP Download mysqltunner script, run it and post the results. First run the script, then change settings and restart mysql and then again run the script. Post both the outputs.
https://raw.github.com/rackerhacker/MySQLTuner-perl/master/mysqltuner.pl
 

Rho Delta

Well-known member
#12
Hello,

I'm very familiar with the script you've noted above. I've ran it and tweaked mysql accordingly. We now need to leave mysql up/running for 24-48 hours before running it again.

The load on your server is not being caused by mysql, it's being caused by PHP. Specifically the index.php running under user rho delta. I'm not familiar with XenForo, but I recommend you looking into a page caching option within this software. If a page cache is not available in the software there may be a plugin which you can install.


PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21541 mike 16 0 102m 30m 15m R 10.9 1.5 0:00.83 /usr/bin/php /home/mike/public_html/index.php
21653 mike 17 0 100m 28m 14m R 9.7 1.4 0:00.48 /usr/bin/php /home/mike/public_html/index.php
21761 mike 20 0 99608 22m 12m R 9.7 1.1 0:00.23 /usr/bin/php /home/mike/public_html/index.php
21724 sorority 16 0 98840 20m 11m R 7.9 1.0 0:00.18 /usr/bin/php /home/sorority/public_html/index.php
21812 mike 18 0 95836 15m 8904 R 7.9 0.7 0:00.13 /usr/bin/php /home/mike/public_html/index.php
21773 mike 17 0 97504 18m 10m R 7.3 0.9 0:00.17 /usr/bin/php /home/mike/public_html/index.php
21536 mike 20 0 100m 28m 14m R 3.0 1.4 0:00.52 /usr/bin/php /home/mike/public_html/index.php
21559 mike 18 0 98.1m 22m 10m R 3.0 1.1 0:00.35 /usr/bin/php /home/mike/public_html/index.php
21756 mike 16 0 99096 21m 11m R 3.0 1.0 0:00.22 /usr/bin/php /home/mike/public_html/index.php
21650 mike 18 0 99892 22m 11m R 1.8 1.1 0:00.24 /usr/bin/php /home/mike/public_html/index.php
21711 root 17 0 32900 14m 7636 R 1.2 0.7 0:00.05 /usr/local/cpanel/whostmgr/bin/whostmgr roothtml


I've disabled APC on your server as you are running php as suphp which is not compatible with APC. Having it enabled causes additional resource usage which can now go elsewhere.

-Dom
Servint MST

Thoughts?
 

Chris D

XenForo developer
Staff member
#14
index.php is basically XenForo.

Every single page you see on your site is ultimately being included from index.php. (Think about URLs when Full Friendly URLs aren't enabled). So resource usage on it is probably not too out of the ordinary.

So with that in mind is it still using too many resources?
 

Rho Delta

Well-known member
#17
APC is not compatible with suPHP, we have not referenced Xenoforo in any way. There are no opcode cachers for suPHP.

If you wish to use APC, eAccelerator, Xcache, or memcache you would need to switch to DSO as your PHP handler.



---
Best Regards,

Anibal D.
ServInt MST.

Interesting, Should I have them enable APC and switch from suPHP to DSO?
 

Sadik B

Well-known member
#18
How much RAM do you have.

Here are a few things to do, or rather ask Servint guy to do (or hire someone)
- Switch to mod_fcgid for php while having apache run as prefork. This will allow you to use APC as well as use the benefits of fcgid
- Remove unnecessary modules from Apache. If you have WHM you can do this from Easy Apache config
- Configure Apache conf file and tweak settings. Specially configure your Max Servers limit depending on your apache memory usage
- Use caching with Xenforo. Using APC as the cache backend is desirable. If you are low on ram, instead use filecache with Xenforo
- There might be an addon which may be not be coded properly. Once you have done the above, disable addons one by one and note server load.

The above steps, if done properly, will significantly reduce your server's load. If the load is still high, then it means your RAM and CPU power is not sufficient for your traffic levels.