Welcome to Centmin Mod Community
Become a Member

Nginx using linode block storage

Discussion in 'Install & Upgrades or Pre-Install Questions' started by moshbit, Jul 23, 2017.

  1. moshbit

    moshbit Member

    41
    10
    8
    Jun 15, 2014
    Ratings:
    +10
    Local Time:
    3:46 PM
    1.5.8
    MariaDB 5.5
    Please fill in any relevant information that applies to you:
    • CentOS Version: 7
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.11.10
    • PHP Version Installed: 7.0.15
    • MariaDB MySQL Version Installed: 10.1.21
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config: no
    Forgive me if this is a bit of a newbish question, but I'm trying to set up a new centminmod install on a new server using linode. I'd like to take advantage of linode's new block storage. I've got everything set up, but I'm not sure how to use the block storage with centminmod. Do I just edit the vhost for that website to point to the new location? Is there anything I should specifically keep in mind when doing so?

    Thanks!
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,035
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,784
    Local Time:
    8:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    Depends on how the block storage works, haven't used Linode's yet. If it's like DigitalOcean's block storage and you can mount the block storage to any directory, then you can be very creative as to how you configure it. i.e. you could mount the block storage as a new /home/nginx mount prior to centmin mod install so all /home/nginx/domain sites are on block storage and have mysql data on local disk in /var/lib/mysql if there is enough room on /var. Or have separate block storage mounts for /home/nginx, /var/lib/mysql and even /svr-setup if you want.

    If you mount them as existing known directories prior to centmin mod install, then you don't have to do anything centmin mod alteration wise.

    Note block storage will be slower than local disk most of the time i.e. o DigitalOcean's block storage was around 40-50% the performance of local disks.
     
    • Informative Informative x 1
  3. eva2000

    eva2000 Administrator Staff Member

    29,035
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,784
    Local Time:
    8:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    just did a quick $5 Linode VPS test with 20GB block storage mounted as /home/nginx

    full benchmarks at Linode - Linode Block Storage - Early Access
    Code (Text):
    ---------------------------------------------------------------------------
    Total Curl Installer YUM or DNF Time: 111.7093 seconds
    Total YUM Time: 12.132566469 seconds
    Total YUM or DNF + Source Download Time: 40.5412
    Total Nginx First Time Install Time: 409.5826
    Total PHP First Time Install Time: 719.5636
    Download Zip From Github Time: 3.7432
    Total Time Other eg. source compiles: 391.3836
    Total Centmin Mod Install Time: 1561.0710
    ---------------------------------------------------------------------------
    Total Install Time (curl yum + cm install + zip download): 1676.5235 seconds
    ---------------------------------------------------------------------------
    

    Code (Text):
    df -hT
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/root      ext4       20G  5.3G   13G  29% /
    devtmpfs       devtmpfs  493M  4.0K  493M   1% /dev
    tmpfs          tmpfs     495M     0  495M   0% /dev/shm
    tmpfs          tmpfs     495M  7.7M  488M   2% /run
    tmpfs          tmpfs     495M     0  495M   0% /sys/fs/cgroup
    tmpfs          tmpfs      99M     0   99M   0% /run/user/0
    /dev/sdc       ext4       20G   45M   19G   1% /home/nginx
    /dev/loop0     ext4      976M  2.6M  907M   1% /tmp
    

    Code (Text):
    ls -lah /home/nginx/domains/
    total 12K
    drwxr-s--- 3 nginx nginx 4.0K Jul 23 00:09 .
    drwxr-sr-x 4 nginx nginx 4.0K Jul 23 00:09 ..
    drwxr-x--- 6 nginx nginx 4.0K Jul 23 00:09 demodomain.com
    
     
    Last edited: Jul 23, 2017
  4. moshbit

    moshbit Member

    41
    10
    8
    Jun 15, 2014
    Ratings:
    +10
    Local Time:
    3:46 PM
    1.5.8
    MariaDB 5.5
    hmm yeah those are all good points. i'm only hosting a xenforo forum so i decided to keep everything but the /data and /internal_data folders on the main drive and put those on the block storage. most of that is images that get served via KeyCDN anyways. i figure this way i won't run out of room for storing images anytime soon while keeping the cost of my linode pretty cheap.

    thank you for the advice and benchmarks!
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    29,035
    6,589
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,784
    Local Time:
    8:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah that would work too

    though haven't checked if linode backup's include block storage ?

    ah from Linode Forum :: Linode Block Storage (beta)
     
    • Like Like x 1