Learn about Centmin Mod LEMP Stack today
Become a Member

Separate WordPress database into a different vps

Discussion in 'Blogs & CMS usage' started by Tinkerd10, Jan 2, 2022.

  1. Tinkerd10

    Tinkerd10 New Member

    27
    3
    3
    Sep 28, 2016
    Ratings:
    +15
    Local Time:
    9:58 PM
    1.11
    5.5
    Hi everyone

    My current setup is wordpress on small vps with 2.5gb ram 2vcpu
    Although my website is still frensh 250v/day the crawlers alone do slow the website

    Event load test from GT/Google sometimes less then 0.8 sometimes 4s

    I was thinking of renting another vps on the same datacenter/Location and use it only for database, it is also cheaper than upgrading in my situation.

    But from past experience with google sql cloud, that didn't help on speed load.


    Any thoughts, suggestions ?

    Thank you for reading.
     
  2. Jay Chen

    Jay Chen Active Member

    171
    53
    28
    Sep 10, 2017
    Ratings:
    +104
    Local Time:
    3:58 PM
    I think you have a bigger problem than what you described.

    Wordpress install with 250v/day should not take 4 seconds to load. Without looking at your site, its hard to see what is the problem. It could be slow theme, too many plugins, poor vps performance and etc.

    One of my image heavy site is able to fully loaded in 1.4s, and one of my non-image heavy site is doing 1.1s. They are all on the same budget vps, both doing around 5k visitor/day.

    Are you using cache and cloudflare?
     
  3. cloud9

    cloud9 Premium Member Premium Member

    227
    69
    28
    Oct 6, 2015
    England
    Ratings:
    +106
    Local Time:
    8:58 PM
    1.21.5
    10.3.32
    Id agree - 250v/pd and 4 secs - there is definitely a problem

    Have you run your site through GTMetrix to see the waterfall and load times

    What Theme and plugins have you got and whats the WP version ? ie all up to date and current or older ?

    I have a lot of sites on WP and have done a lot over the years, in the end I gave up with all themes and plugins as most are not fit for purpose, dont get upgraded, break sites on a wp upgrade etc The only themes I use now along with the plugins for the themes are StudioPress/Genesis framework....
     
  4. eva2000

    eva2000 Administrator Staff Member

    47,851
    10,920
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,961
    Local Time:
    6:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    That highly depends also on VPS server hardware as not all VPS servers are created equal https://community.centminmod.com/th...talocean-vs-linode-vs-vultr-vs-hetzner.17742/

    Probably best to keep all your file/databases on same server as these days rarely is MySQL database server the bottleneck (unless you have unoptimised server/php/cache setup).
     
  5. Tinkerd10

    Tinkerd10 New Member

    27
    3
    3
    Sep 28, 2016
    Ratings:
    +15
    Local Time:
    9:58 PM
    1.11
    5.5
    Thank you for you replay

    I'm using latest wp version 5.8 and 23 more plugin which are essential and also whitelisted them in nginx
    Template Blocksy (Which is great and fast )

    List of plugins:


    **************
    The main core of the website
    **************
    Directories
    Directories - Frontend
    Directories - Reviews
    Directories Pro

    ********************
    the rest are just features
    ********************
    Asset CleanUp Pro: Page Speed Booster
    Blocksy Companion (Premium)
    Code Snippets
    DIGITS: Wordpress Mobile Number Signup and Login
    Gravity Forms
    Kadence Blocks – Gutenberg Blocks for Page Builder Features
    Kadence Blocks –
    Link Whisper
    Nginx Helper
    Rank Math SEO
    Rank Math SEO PRO
    Redirection
    (Is used to redirect users to login page)
    Redis Object Cache
    Relevanssi
    SVG Support
    TranslatePress - Business
    TranslatePress - Multilingual
    WP Show Posts
    (Short code for TranslatePress)
    WebP Express
    WP Rocket
    (It helped a lot dropping load by 60%)

    * The server part i have followed tutorials from here, although i don't think any think can be done on centmin part
    * There is no error on logs from server side nor front-end side

    and yet
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    gtmetrix.com
    GTmetrix Performance Report
    GTmetrix Performance Report
    GTmetrix Performance Report

    That's why i thought maybe separating database from from-end it may help or like @eva2000 said just buy a better vps

    thank you.
     
  6. Jay Chen

    Jay Chen Active Member

    171
    53
    28
    Sep 10, 2017
    Ratings:
    +104
    Local Time:
    3:58 PM
    Did you benchmark your vps and see what is the performance?
    Not sure what others are using here, but I usually use the below script to test the VPS performance for Centos]
    Code:
    curl -s https://raw.githubusercontent.com/masonr/yet-another-bench-script/master/yabs.sh | bash
    Run this and share the result
     
  7. Tinkerd10

    Tinkerd10 New Member

    27
    3
    3
    Sep 28, 2016
    Ratings:
    +15
    Local Time:
    9:58 PM
    1.11
    5.5
    Benchmark result:


    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
    # Yet-Another-Bench-Script #
    # v2021-12-28 #
    # GitHub - masonr/yet-another-bench-script: YABS - a simple bash script to estimate Linux server performance using fio, iperf3, & Geekbench #
    # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

    Wed Jan 5 17:42:54 UTC 2022

    Basic System Information:
    ---------------------------------
    Processor : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
    CPU cores : 3 @ 2799.998 MHz
    AES-NI : ✔ Enabled
    VM-x/AMD-V : ❌ Disabled
    RAM : 2.3 GiB
    Swap : 2.5 GiB
    Disk : 57.4 GiB

    fio Disk Speed Tests (Mixed R/W 50/50):
    ---------------------------------
    Block Size | 4k (IOPS) | 64k (IOPS)
    ------ | --- ---- | ---- ----
    Read | 58.36 MB/s (14.5k) | 428.17 MB/s (6.6k)
    Write | 58.47 MB/s (14.6k) | 430.43 MB/s (6.7k)
    Total | 116.84 MB/s (29.2k) | 858.60 MB/s (13.4k)
    | |
    Block Size | 512k (IOPS) | 1m (IOPS)
    ------ | --- ---- | ---- ----
    Read | 792.73 MB/s (1.5k) | 919.60 MB/s (898)
    Write | 834.85 MB/s (1.6k) | 980.85 MB/s (957)
    Total | 1.62 GB/s (3.1k) | 1.90 GB/s (1.8k)

    iperf3 Network Speed Tests (IPv4):
    ---------------------------------
    Provider | Location (Link) | Send Speed | Recv Speed
    | | |
    Clouvider | London, UK (10G) | busy | busy
    Online.net | Paris, FR (10G) | busy | busy
    WorldStream | The Netherlands (10G) | busy | busy
    WebHorizon | Singapore (400M) | busy | busy
    Clouvider | NYC, NY, US (10G) | busy | busy
    Velocity Online | Tallahassee, FL, US (10G) | busy | busy
    Clouvider | Los Angeles, CA, US (10G) | busy | busy
    Iveloz Telecom | Sao Paulo, BR (2G) | busy busy

    Geekbench 5 Benchmark Test:
    ---------------------------------
    Test | Value
    |
    Single Core | 510
    Multi Core | 1082
    Full Test | https://browser.geekbench.com/v5/cpu/12003512
     
  8. Jay Chen

    Jay Chen Active Member

    171
    53
    28
    Sep 10, 2017
    Ratings:
    +104
    Local Time:
    3:58 PM
    Its not a slow vps, then its something else that is causing the slowness.
    Install Query Monitor plugin, and check the pages that are slow, it will show you what queries are being ran and how much time they took
     
  9. tininho

    tininho Active Member

    155
    37
    28
    May 22, 2019
    Finland
    Ratings:
    +116
    Local Time:
    10:58 PM
    You have three different caching plugins, could that cause the random super delayed TTFB?
    I would start by disabling Redis Object Cache and Nginx Helper, and only go with WP Rocket.

    Be sure to configure WP Rocket correctly, as explained here.

    For Centminmod: WP Rocket installation on Nginx

    This guide assumes you have chosen Wordpress Super Cache when creating the site on Centminmod.
    From your plugins I would say you chose Fastcgi cache, so you need to adjust
    • the comment out line and
    • sed -i 's/php-wpsc/php/g'