Welcome to Centmin Mod Community
Register Now

Slow performance under LOAD

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by joshuah, Apr 14, 2017.

  1. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    • CentOS Version: CentOS 7
    • Centmin Mod Version Installed: Centmin Mod 1.2.3-eva2000.08
    • Nginx Version Installed: 1.11.10
    • PHP Version Installed: 7.0.0 - Zend opcache v7.0.6-dev
    • Persistent Config: No.
    As per our chat on lowendtalk, i am having some issues when under high load.

    I have installed wordpress via option 22 and went in and disabled all plugins; changed theme to default wordpress theme; enabled w3 total cache.

    This is the result of centmin under load: Screenshot

    This is the EXACT same VM from Vultr with same spec, standard wordpress install with same plugins and theme. The result is different: Screenshot
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    Best place to ask as pretty sure it ain't normal for Centmin Mod installed Wordpress to average 8+ seconds per page load ;)
    • What are your server specs for cpu cores, ram, disk and web host ? Location of your server geographically ?
    • loader.io test parameters used ?
    • as wordpress was installed via centmin.sh menu option 22, you would of got outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL)
      • Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf
      • Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf
      • Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com
      • Vhost public web root will be at /home/nginx/domains/newdomain.com/public
      • Vhost log directory will be at /home/nginx/domains/newdomain.com/log
      Please post the contents of /usr/local/nginx/conf/conf.d/newdomain.com.conf and if applicable /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf wrapped in CODE tags (outlined at How to use forum BBCODE code tags)
    • which wp plugins did you remove ? and which wp plugins did you add yourself ?
    You can find out via the below commands too which wp plugins are installed where newdomain.com is yourdomain.com name

    if you installed wordpress in web root
    Code (Text):
    cd /home/nginx/domains/newdomain.com/public
    wp plugin status --allow-root
    

    and post output wrapped in CODE tags.
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    oh i see you're using 123.08stable Centmin Mod, it's centmin.sh menu option 22 isn't as optimised as 123.09beta01 branch too. But still 8+ seconds isn't normal.

    if you want to double check, you can do a fresh CentOS 7 install and try 123.09beta01 install Centmin Mod LEMP Stack Install Nginx on CentOS
    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh

    Or with PHP 7 default as per https://community.centminmod.com/threads/centmin-mod-09-beta-branch-testing.4128/
    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller7.sh && chmod 0700 betainstaller7.sh && bash betainstaller7.sh

    then run centmin.sh menu option 22 for wordpress install
     
  4. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    Thanks for the quick reply mate. Do you think you'll be around in a few hours?
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yup.. :)

    what server specs ? i can try to reproduce it on vultr too
     
  6. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    Code:
    [root@syd2 public]# cat /usr/local/nginx/conf/conf.d/vultr.domain.net.au.conf
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name vultr.domain.net.au;
    #            return 301 $scheme://www.vultr.domain.net.au$request_uri;
    #       }
    
    server {
      server_name vultr.domain.net.au www.vultr.domain.net.au;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/vultr.domain.net.au/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/vultr.doamin.net.au/log/error.log;
    
      root /home/nginx/domains/vultr.dmaoin.net.au/public;
    
      include /usr/local/nginx/conf/wpsupercache_vultr.domain.net.au.conf;
    
      location / {
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # Wordpress Permalinks
      #try_files $uri $uri/ /index.php?q=$uri&$args;
    
      }
    
    location ~* /(wp-login\.php) {
        limit_req zone=xwplogin burst=1 nodelay;
        #limit_conn xwpconlimit 30;
        auth_basic "Private";
        auth_basic_user_file /home/nginx/domains/vultr.domain.net.au/htpasswd_wplogin;
        include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwprpc burst=45 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
    d include /usr/local/nginx/conf/wpsecure_vultr.domain.net.au.conf;
      include /usr/local/nginx/conf/php-wpsc.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
     
  7. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    Code:
    25 installed plugins:
      I wp-security-scan                4.0.5
      I akismet                         3.3
      I autoptimize                     2.1.0
      I db-cache-reloaded-fix           2.3
      I disable-xml-rpc                 1.0.1
      I go-newrelic                     0.3
      I google-analytics-for-wordpress  6.1.7
      I google-authenticator            0.48
      I gtmetrix-for-wordpress          0.4.2
      I hello                           1.6
      I limit-login-attempts            1.7.1
      I no-longer-in-directory          1.0.60
      I p3-profiler                     1.5.3.9
      I query-monitor                   2.13.4
      I rocket-lazy-load                1.1.1
      I search-regex                    1.4.16
      I addthis-smart-layers            3.0.0
      I sucuri-scanner                  1.8.3
      I tpc-memory-usage                0.9.1
      A w3-total-cache                  0.9.5.2
      I wp-optimize                     2.1.1
      I wp-super-cache                  1.4.9
      I wp-super-cache-clear-cache-menu 1.4
      I wp-updates-notifier             1.4.4
      I wordpress-seo                   4.6
    
    Legend: I = Inactive, A = Active
     
  8. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    I am on the Vultr Sydney 2GB RAM / 40GB SSD ($10USD per month).
     
  9. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    And just to be clear on something, this is under any of the high end load testing.. if I simply do individual load testing from my local connection, page loads are around 0.5-0.8s each page.
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    how high end load testing ? paramaters ?
     
  11. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    I don't have them infront of me right now as I am not infront of a computer for a few hours. However, off the top of my head it was the first option where it was spread out evenly over 1 minute and min 500 connections is where it started to die. You can do up to 10k connections per minute.

    Both serverpilot and centmin had exact test setup.
     
  12. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    I was just using their free testing option.
     
  13. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    i assume same location too in Sydney for both serverpilot and centmin mod ?

    i suspect could partially be related to 123.08stable vs 123.09beta01 differences too as out of box nginx config is more optimised in 123.09beta01 as 123.08stable out of box is configured for 512 connections/s per cpu thread while 123.09beta01 is configured for now 3,000 connections/s per cpu thread
     
    Last edited: Apr 14, 2017
  14. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    Yeah correct. I just reinstalled and put centminmod over the sever pilot (obviously fresh install).
     
  15. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    Okay interesting. I will test out once I get back. Because this only has 1 core - most likely the issue!
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah, i just backported 123.09beta01 nginx.conf settings to 123.08stable too so both branches should in theory support 3,000 connections/sec per cpu thread. Centmin Mod does auto optimise out of box, but end users will have to further optimise beyond that for their specific web app requirements usually. Centmin mod 123.09beta01 just has a better starting config for this + better centmin.sh menu option 22 wordpress installer :)
     
  17. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM

    Awesome. Thanks mate. Can't wait to test it out. Curious, from the stable to beta, what are the biggest bugs which still need ironing out before going into a production environment?
     
  18. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
    honestly nothing right now - 123.09beta01 has been in development for 18+ months and only thing it's waiting for stable release is me updating all centminmod.com official documentation and faq and guides with 123.09beta01 relevant documentation as right now only the forums have most relevant info for 123.09beta01. As you can imagine that's alot of updating to do when I only work on Centmin Mod in my free time :)

    That doesn't mean there isn't any bugs, just nothing major - I've been running 120+ servers with 123.09beta01 for past 18+ months now - including this very forum and centminmod.com official site's servers :)

    even added a mention of this fact on official install page Centmin Mod LEMP Stack Install Nginx on CentOS
     
    • Optimistic Optimistic x 2
  19. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:48 AM
    Nginx 1.13.x
    MariaDB 5.5
  20. joshuah

    joshuah Member

    116
    14
    18
    Apr 3, 2017
    Ratings:
    +16
    Local Time:
    11:48 AM
    Yep, the BETA fixed it :) That's awesome! And you are 100% right regarding the cache enabler plugin, made a big difference.

    P.S - from your own testing, which do you prefer? Cache enabler or redis caching?
     
    • Like Like x 1