1. 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

Discussion in 'Troubleshooting and Problems' started by Rho Delta, Dec 10, 2012.

  1. Rho Delta

    Rho Delta Well-Known Member

    This is using up crazy resources on my VPS... is there a way to narrow down what it could be? Possibly an add on?
  2. BamaStangGuy

    BamaStangGuy Well-Known Member

    List your addons
    Jake Bunce likes this.
  3. Rho Delta

    Rho Delta Well-Known Member

    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

    [xfr] User Albums 1.0.0 b7
    HWS likes this.
  4. Brandon Sheley

    Brandon Sheley Well-Known Member

    Does the load go down if you disable xenportal, since it's the one using your index.php file now.
    Jake Bunce likes this.
  5. Rho Delta

    Rho Delta Well-Known Member

    I will test this. Even if it does, is there any way to optimize xenporta? I really don't want to not have a portal...
  6. Rho Delta

    Rho Delta Well-Known Member

    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.

  7. Digital Doctor

    Digital Doctor Well-Known Member

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

  8. Rho Delta

    Rho Delta Well-Known Member

  9. Digital Doctor

    Digital Doctor Well-Known Member

    It's low risk potentially high reward ... sure ! :)
  10. Rho Delta

    Rho Delta Well-Known Member

    Should I wait until peak hours to do this?
  11. Digital Doctor

    Digital Doctor Well-Known Member

    Not sure.
    Run it a few times.
    Rho Delta likes this.
  12. Rho Delta

    Rho Delta Well-Known Member


    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.

    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.

    Servint MST

  13. Digital Doctor

    Digital Doctor Well-Known Member

  14. Chris D

    Chris D XenForo Developer Staff Member

    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?
  15. Digital Doctor

    Digital Doctor Well-Known Member

    You need APC.
    can you ditch suphp ?
    maybe index.php is slow because you have no page caching ?
  16. Rho Delta

    Rho Delta Well-Known Member

    I don't think suphp was the issue before, I'm not even sure what it is to be honest. Are there any alternatives to APC?
  17. Rho Delta

    Rho Delta Well-Known Member

    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?
  18. Sadik B

    Sadik B Well-Known Member

    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.
  19. Rho Delta

    Rho Delta Well-Known Member

    I currently have 1 gb ram with 2 gb burst ram. Should I upgrade to the 2gb ram w 4gb burst ram package?
  20. Rho Delta

    Rho Delta Well-Known Member

    Also it looks like I was using File Back End caching and not ACP caching in my library/config.php file

Share This Page