Welcome to Centmin Mod Community
Register Now

Xenforo Xenforo forum performance issues: how to diagnose problem?

Discussion in 'Forum software usage' started by brainlet2000, May 19, 2020.

  1. brainlet2000

    brainlet2000 Member

    42
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    8:37 PM
    1.17.7
    10.3.21
    Hi all,

    recently my forum has been having hiccups, being generally slow at times and issues loading some pages. I'm sure that this is not related to the server specs, since I have a dedicated server that is way overpowered for its purpose. My forum is quite active but CPU usage is only around 10-20%. My forum has been DDoSed a few times, but since then it has been having a few performance issues even while not being attacked.

    Are there any steps I can take to find out where the problem lies?


    Thanks!
     
  2. brainlet2000

    brainlet2000 Member

    42
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    8:37 PM
    1.17.7
    10.3.21
    I have noticed high mariaDB cpu usage at times spiking up to 20%. I have not changed the settings from out the box centminmod.
     
  3. brainlet2000

    brainlet2000 Member

    42
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    8:37 PM
    1.17.7
    10.3.21
    Server restart appears to have resolved for now.. Not sure what this is related to.
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,931
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,812
    Local Time:
    5:37 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    If running Centmin Mod 123.09beta01 or higher, you will have access to a cminfo top command which can also provide a summary of statistics - some of which are explained in info and linked articles below.

    FYI, CPU load optimal is 1.0 per cpu thread so 8 cpu thread normal = 8x1 = 8.0. 16 cpu server normal is 16x1 = 16.0

    so cpu load of 8 for
    • 2 cpu server = 8/2 = 4.0 load average
    • 4 cpu server = 8/4 = 2.0 load average
    • 8 cpu server = 8/8 = 1.0 load average
    When you type top command, hit number 1 to break down per cpu stats

    Centmin Mod is provided as is, so troubleshooting load issues is left to end user to do. However, there's many linux tools and scripts that can help you figure out what was causing the load issues and when.

    If you're providing info on this forum, more info might be helpful
    1. What version of Centmin Mod ? .08 stable or .09 beta ? If .09 beta when was it installed and when was last time you updated ?
    2. What's your VPS/Server hardware specifications ? cpu type ? memory available ? disk space ?
    3. Who's your web host ? Different hosts have different limits for server resource usage and some are more restrictive that others so it could just be their resource usage policy you tripped which may or may not be restrictive. If restrictive, then real solution would be finding a better web host. If not restrictive, then it's finding out what caused high cpu load.
    4. If running Centmin Mod 123.09beta01 or higher, you will have access to a cminfo top command which can also provide a summary of statistics - some of which are explained in info and linked articles below.
    Tools and commands you will want to read up on and learn for basic system admin tasks and troubleshooting.
    Notes:
    For example some commands which are also available automatically when you run cminfo top command
    Code (Text):
    top -bn1
    

    Code (Text):
    ps aufxw
    

    Code (Text):
    sar -q
    

    Code (Text):
    sar -r
    

    Code (Text):
    sar -q -f /var/log/sa/sa$(date +%d -d yesterday)
    

    Code (Text):
    sar -r -f /var/log/sa/sa$(date +%d -d yesterday)
    

    If you want to look at per process usage stats use pidstat run pidstat every 1 sec for 5 runs and sed is just to replace your main hostname with word hostname so mask your domain for posting on public places
    Code (Text):
    pidstat -durh 1 5 | sed -e "s|$(hostname)|hostname|g"
    

    for posting code you might want to use CODE tags for code How to use forum BBCODE code tags :)
     
  5. brainlet2000

    brainlet2000 Member

    42
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    8:37 PM
    1.17.7
    10.3.21
    Hi again @eva2000. My server has 23 cores, with a load average of 0.18-0.30 so that should be fine.

    1. I am running centminmod 123.09beta01. Centminmod was installed around 6 months ago, last update a few days ago.
    2. It is a dedicated server. The specs are:
    Code:
    P Proliant BL460c G7     2x Intel Xeon X5650 6-Core 2.67 GHz
    (11379)     32 GB ECC RAM     1x250GB SSD     
    I believe that is more than adequate for running a single Xenforo forum.
    3. Web host is not the issue, I have contacted them and they said they found no issues.
    4. I've attached output of cminfo top command since it was too long to post and I wasn't sure what parts are most relevant.


    As far as I can see there are no issues. The only thing I can see is 73% of the home partition being used. Could that be causing issues? The forum has sudden lag issues seemingly out of nowhere, helped by a shutdown -r now reboot command. Is there anything that stands out from this log?

    Thanks.
     

    Attached Files:

  6. Dnyan

    Dnyan Member

    106
    24
    18
    Sep 16, 2017
    Ratings:
    +36
    Local Time:
    1:07 AM
    1.17.8
    10.3.22
    You should also consider looking at recently installed addon at xf system.
    I had performance issue in past when i had installed one of the addon which literally made my site offline for few days. Later, the dev rectified whatever wrong codes were there in his addon.

    So if you added any addon recently which does alteration of your database, then kindly do also look at that too.
     
  7. brainlet2000

    brainlet2000 Member

    42
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    8:37 PM
    1.17.7
    10.3.21
    I've just went ahead and updated all the addons + updated importers. Also ran updates yesterday. Let's see if it continues.
     
  8. brainlet2000

    brainlet2000 Member

    42
    4
    8
    Jan 21, 2020
    Ratings:
    +7
    Local Time:
    8:37 PM
    1.17.7
    10.3.21
    I also deleted the backups hosted on the server, freeing unnecessary taken space. Site seems to be performing better now, I suppose the filesystem being full of files can slow down the system somehow?
     
  9. STN

    STN CentMaxMod

    9
    4
    3
    Jun 9, 2020
    Ratings:
    +7
    Local Time:
    12:37 AM
    1.19.0
    Mariadb 10.3
    No. Are you sure there's no malicious traffic eating away resources?

    Do you use cloudflare? If so i, suggest putting your login/register and search pages under cloudflare under attack mode using page rules. It's crazy how much bots eat cpu/memory trying to register and login.

    Also look at Google analytics if it's spike in traffic since you say it happens rarely.

    By the way, having spent a lot of time with phpbb, i have to say xenforo is really unoptimised and sucks with resource usage. If you're not already, use caching.

    I had my mysql memory usage at less than 5% with phpbb for years. Converted to xenforo and it's constantly 19% now at half the traffic phpbb had (suffered traffic loss after conversion to xenforo).
     
  10. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    9:37 PM
    1.9.10
    10.1.11