Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
Wordpress site on a 512 MB RAM VPS - Need Server Configuration.
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

Wordpress site on a 512 MB RAM VPS - Need Server Configuration.

Hello friends, back in 2015 one of the guys on my FB list optimised my Digital Ocean 512 MB RAM VPS. I was using frotier theme & minimal plugins. I have tested it at around 3000+ concurrent vistors. Today i have 512 MB VPS & i want to test it once again, I don't have his contact unfortunately. May i know which NGINX configuration can handle that much traffic???? Pls. share your personal experience as well.

For ex: NGINX + Mysql + PHP-FPM + Redis

Like this i need your expert advice on what all needs to be installed & optimised. Thanks :smile:

Comments

  • dedipromodedipromo Member

    I think Debian OS + OpenLitespeed + LSCache + MariaDB + LsPHP in this case; RAM is so limited in your case so I won't try to use object cache.

    Thanked by 1vladimirlenin

    Easy Website Backup Script: easybackup Extremely affordable FTP backup storage: 1Fichier

  • But I don’t think OLS work well on a 512 RAM VPS.

  • bdlbdl Member

    @vladimirlenin said:
    ... what all needs to be installed & optimised. Thanks :smile:

    More RAM needs to be installed :lol:

    Thanked by 1jetchirag
  • cazrzcazrz Member
    edited June 1

    I would rather up my budget for a dollar or two and get 1gb or 2gb ram. Then i would remove redis. Nginx, mysql, php-fpm is enough.

    If you really need to make it work on 512mb, just try installing vestacp/hestiacp/myvesta.

  • AK_KWHAK_KWH Member, Provider

    Hi,
    Ols only can help you to survive with it :) bcz NGINX + Mysql + PHP-FPM + Redis itself consume almost 250+mb ram it dont expect any thing more from it to performs better however if we check it on OLS its only consume 100MB

    KhanWebHost Cheap Shared Hosting | Cheap KVM VPS (DE,UK,US,FR) | KVM Sale - LET Offers

  • iqbaliqbal Member

    use centminmod :)

  • RedSoxRedSox Member
    edited June 1

    Nginx + MariaDB + PHP7.4-FPM + OPcache

  • vyas11vyas11 Member
    edited June 1

    @cazrz said:

    If you really need to make it work on 512mb, just try installing vestacp/hestiacp/myvesta.

    Wouldn’t that add overhead?

    @RedSox said:
    Nginx + MariaDB + PHP7.4-FPM + OPcache

    Or webinoly to automate all of the above. It Ran well on Ubuntu 18.04 256 MB Ram on tinykvm (Ramnode)

    Post below [email protected] reminded me

    Thanked by 1RedSox
  • JordJord Moderator, Provider

    I have a WordPress site running on a 256MB VPS seems to be working fine 😂

    BillingServ - Easy, simple, and hassle-free online invoicing solution. Contact us today.
    BaseServ Certified to ISO/IEC 27001:2013

  • pbxpbx Member

    bdl said: More RAM needs to be installed

    Not needed if full page caching is enabled!

    iqbal said: use centminmod

    Exactly.

    https://centminmod.com/ @eva2000 - can't go wrong.

    Another solution would be your own nginx with full caching & modpagespeed / mariadb / php-fpm setup.

  • Thanks everyone for your valuable comments. I already have other VPS servers running with more RAM & Traffic but personally want to test this & see how it actually works. Currently using LEMP Stack via wordops.net & working fine. @vyas11 yes bro I want to try Webinoly as well and see what works best with lowend specs VPS :smile:

  • ardaarda Member

    Oh and I'd increase the swap partition, or if not possible I'd create a swapfile and tell to my fstab file use that file as swap.

  • Mr_TomMr_Tom Member, Provider

    I'd give control panels a miss and go for a clean Debian install, with nginx, php-fpm and mariadb. If it's SSD/NVMe you could do some disk caching as you might not have enough RAM for in memory caching.

  • LTnigerLTniger Member

    512MB RAM for WP is premium. You will easily fit in 256 or max on 384 MB.

    Lighttpd, PHP and MySQL.

    Everything else also must be optimized: Dropbear for SSH (there is no SFTP support, be aware),vsftpd for FTP, exim-light instead of postfix etc. You can do this.

    Thanked by 4RedSox vyas11 Ympker pbx

    hostWP.net - Wordpress Hosting Platform.

  • fLoofLoo Member

    I'd go slightly different:

    Nginx, Nginx-Cache, PHP7-FPM, PHP-OC, MariaDB

    Reason is, that Nginx caches most of your requests and will not consume any more ram to generate the content afterwards. Makes it pretty rock stable for me with ~ 10.000 visitors daily.

    Thanked by 1pbx
  • LTnigerLTniger Member

    fLoo said: Nginx-Cache

    For cache to build you must have RAM. And if you consume 100% RAM you begin to SWAP. Caching in this scenario is not viable.

    • Offload graphic content to CDN
    • Make pages as static as possible

    hostWP.net - Wordpress Hosting Platform.

  • vyas11vyas11 Member
    edited June 1

    @LTniger said:

    • Offload graphic content to CDN
    • Make pages as static as possible

    +1 and +1

  • EdwardEdward Member
    edited June 1

    Once upon a time I read a cool article about setting up a similar server for 5$ (512MB RAM / 1 CPU) which can withstand a load of 42,735,587 hits per day on a Wordpress site.
    Here is the link to this article: https://habr.com/en/post/242011/, since the article is not in English, you may need a translator.

    You can also install Nginx + MariaDB + PHP7.4-FPM + OPcache for tests using the VestaCP panel.

  • cazrzcazrz Member

    @vyas11 said:

    @cazrz said:

    If you really need to make it work on 512mb, just try installing vestacp/hestiacp/myvesta.

    Wouldn’t that add overhead?

    @RedSox said:
    Nginx + MariaDB + PHP7.4-FPM + OPcache

    Or webinoly to automate all of the above. It Ran well on Ubuntu 18.04 256 MB Ram on tinykvm (Ramnode)

    Post below [email protected] reminded me

    Easyengine is another option. Conteol oanels like vestacp/hestiacp/myvesta will indeed add some overhead. However upon reading OP, looks like he needs some instant and easier way to setup things. He can fine tune nginx, mysql in the control panel and disable some cron stats to reduce load. It does run on 512mb.

    Ofcourse if it was me i will just use wp static and use cdn. Load it in s3.

  • fLoofLoo Member
    edited June 1

    @LTniger said:

    fLoo said: Nginx-Cache

    For cache to build you must have RAM. And if you consume 100% RAM you begin to SWAP. Caching in this scenario is not viable.

    Nginx-Cache is not held in Ram if you dont use a ramdisk. Instead its written to the FS so the RAM will only be used once to build the pages and freed afterwards.

    Thanked by 1kkrajk
  • JarryJarry Member

    @fLoo said:
    Nginx-Cache is not held in Ram

    It is true nginx-cache keeps files on disk, but iirc it still keeps pointers/hashes of those files in ram. So you might need a little more ram if you activate caching...

  • dpecadpeca Member
    edited June 19

    @vyas11 said:

    @cazrz said:

    If you really need to make it work on 512mb, just try installing vestacp/hestiacp/myvesta.

    Wouldn’t that add overhead?

    [email protected]:~# free -h
                  total        used        free      shared  buff/cache   available
    Mem:          1.9Gi       329Mi       944Mi        21Mi       673Mi       1.4Gi
    

    so, we see here 2GB RAM

    i turned off system nginx and system php-fpm, so they are not in RAM.

    now let's see myvesta-nginx percents of RAM usages:

    [email protected]:~# ps aux | awk '{print $2, $4, $11}' | sort -k2rn | grep nginx
    693 0.0 nginx:
    695 0.0 nginx:
    

    both processes are under 0.1% of RAM, so in worst scenario it uses 4 MB of RAM, and probably less.

    now let's see myvesta-php-fpm percents of RAM usages:

    [email protected]:~# ps aux | awk '{print $2, $4, $11}' | sort -k2rn | grep fpm
    705 0.4 php-fpm:
    706 0.4 php-fpm:
    703 0.2 php-fpm:
    

    sum is 1%, which is 20 MB of RAM.

    So, there is very little overhead.

    Anyway, you can turn-off both myvesta-nginx and myvesta-php-fpm once you setup hosting enviroment, so there will not be overhead at all.

  • raindog308raindog308 Moderator

    Those of you stating more memory is needed have forgotten our roots.

    For LET support, please visit the support desk.

  • vovlervovler Member

    I ran a few tests, mostly because I love doing this kind of thing. For the LiteSpeed side of things I went with CyberPanel and LSWS (instead of OLS) since it's free for one domain. Centminmod compiles Nginx and PHP to squeeze a few % in performance, but that isnt something I'll make a 512MB RAM/10GB SSD go through. Decided to go with EasyEngine4 just for the sake of it. Unfortunately I've just learned that EasyEngine 4 dockerizes everything, so there's some overhead.

    VPS (VMHAUS 512MB LV):
    CPU: 1x E5-2670
    RAM: 512MB
    SWAP: 1024MB (it really needed some)
    Disk: 10GB SSD

    1) CyberPanel (Enterprise LSWS- free 1x domain):
    Centos 7
    Wordpress
    Newspaper Theme + News Cafe DEMO
    tagDiv Cloud Library
    tagDiv Composer
    tagDiv Social Counter
    tagDiv Standard Pack
    Caching plugin: LSCache

    2) EasyEngine 4 (Docker'ed Nginx):
    Debian 9
    Wordpress
    Newspaper Theme + News Cafe DEMO
    tagDiv Cloud Library
    tagDiv Composer
    tagDiv Social Counter
    tagDiv Standard Pack
    Caching plugin: WP Super Cache (+ Autooptimize for js/css minification)

    ##### Loader.io Tests: #####

    1) CyberPanel (Enterprise LSWS) + LSCache:
    Could still push it to 550 probably... didnt bother trying.
    Load: 500 req/s for 60 seconds


    2.1) EasyEngine (Docker'ed Nginx) + WPSC Regular Cache (hits php before loading cached files):
    You can see that php-fpm being quite active in this one.
    Load: 100 req/s for 60 seconds


    2.2) EasyEngine (Docker'ed Nginx) + WPSC "Super Cache" (Doesnt hit php if file is cached):
    THIS WAS A HEADACHE. Docker messes up nginx variables for some reason, so the original nginx config wasnt working at all. $uri was and $scheme were messed up. Managed to find a workaround for $uri and hardcoded $scheme to https and forced website to load via https.

    Load: 300 req/s for 60 seconds


    Conclusion:
    Considering that this VPS has a single E5-2670 core and only 512mb of RAM and still managed to have a bandwidth throughput of 400~500mbps shows how effective wordpress caching is and if you got a core of better CPU or 2x cores and 1-2GB of RAM, you could most likely push 1gbps.

    If it's only for one domain, I'd go with CyberPanel + LSWS. Easy to install, great performance, you can use all LSCache features such as webp image optimization, critical css,...

    Nginx can be pushed to work as well as LSWS if you have the free time to build it and optimize it. In this case I could try to serve precompressed cached files which would surely improve performance but couldnt be arsed to try it at this point. If you are getting so many visitors, you can afford a better VPS.

    "They said it's RAID 5" - geekypixal

  • @vovler best insightful reply i have ever seen till date. Really impressive.... :) By the way if someone wants to run 5 wordpress blogs with a overall traffic of 10000 visitors per day. Which specific setup would you recommend to him on a 512MB RAM VPS if its feasible.

  • noamannoaman Member

    @vladimirlenin said:
    @vovler best insightful reply i have ever seen till date. Really impressive.... :) By the way if someone wants to run 5 wordpress blogs with a overall traffic of 10000 visitors per day. Which specific setup would you recommend to him on a 512MB RAM VPS if its feasible.

    Most of the time sustained rate isn't an issue as 10,000 visitors per day

    What matters is the burst max number of visitors per second?

    Thanked by 1raindog308
  • @vovler said:
    I ran a few tests, mostly because I love doing this kind of thing. For the LiteSpeed side of things I went with CyberPanel and LSWS (instead of OLS) since it's free for one domain. Centminmod compiles Nginx and PHP to squeeze a few % in performance, but that isnt something I'll make a 512MB RAM/10GB SSD go through. Decided to go with EasyEngine4 just for the sake of it. Unfortunately I've just learned that EasyEngine 4 dockerizes everything, so there's some overhead.

    VPS (VMHAUS 512MB LV):
    CPU: 1x E5-2670
    RAM: 512MB
    SWAP: 1024MB (it really needed some)
    Disk: 10GB SSD

    1) CyberPanel (Enterprise LSWS- free 1x domain):
    Centos 7
    Wordpress
    Newspaper Theme + News Cafe DEMO
    tagDiv Cloud Library
    tagDiv Composer
    tagDiv Social Counter
    tagDiv Standard Pack
    Caching plugin: LSCache

    2) EasyEngine 4 (Docker'ed Nginx):
    Debian 9
    Wordpress
    Newspaper Theme + News Cafe DEMO
    tagDiv Cloud Library
    tagDiv Composer
    tagDiv Social Counter
    tagDiv Standard Pack
    Caching plugin: WP Super Cache (+ Autooptimize for js/css minification)

    ##### Loader.io Tests: #####

    1) CyberPanel (Enterprise LSWS) + LSCache:
    Could still push it to 550 probably... didnt bother trying.
    Load: 500 req/s for 60 seconds


    2.1) EasyEngine (Docker'ed Nginx) + WPSC Regular Cache (hits php before loading cached files):
    You can see that php-fpm being quite active in this one.
    Load: 100 req/s for 60 seconds


    2.2) EasyEngine (Docker'ed Nginx) + WPSC "Super Cache" (Doesnt hit php if file is cached):
    THIS WAS A HEADACHE. Docker messes up nginx variables for some reason, so the original nginx config wasnt working at all. $uri was and $scheme were messed up. Managed to find a workaround for $uri and hardcoded $scheme to https and forced website to load via https.

    Load: 300 req/s for 60 seconds


    Conclusion:
    Considering that this VPS has a single E5-2670 core and only 512mb of RAM and still managed to have a bandwidth throughput of 400~500mbps shows how effective wordpress caching is and if you got a core of better CPU or 2x cores and 1-2GB of RAM, you could most likely push 1gbps.

    If it's only for one domain, I'd go with CyberPanel + LSWS. Easy to install, great performance, you can use all LSCache features such as webp image optimization, critical css,...

    Nginx can be pushed to work as well as LSWS if you have the free time to build it and optimize it. In this case I could try to serve precompressed cached files which would surely improve performance but couldnt be arsed to try it at this point. If you are getting so many visitors, you can afford a better VPS.

    Curious, what are you using for testing the first screenshot? Thanks

  • vovlervovler Member

    @CasualCanvas said: Curious, what are you using for testing the first screenshot? Thanks

    Loader.io

    @vladimirlenin said: best insightful reply i have ever seen till date. Really impressive.... By the way if someone wants to run 5 wordpress blogs with a overall traffic of 10000 visitors per day. Which specific setup would you recommend to him on a 512MB RAM VPS if its feasible.

    If you want a web based panel and everything configured for you, I'd consider using CyberPanel with OpenLiteSpeed (instead of LiteSpeed Enterprise) since it allows for unlimited domains.
    Not sure if it affects performance to change to the opensource version of LiteSpeed, never tested it.

    If not, you can install OLS yourself, or just go with nginx since its quite fast as well and has way more documentation out there.

    Thanked by 1CasualCanvas

    "They said it's RAID 5" - geekypixal

  • LexLex Member
    edited June 20

    @CasualCanvas said:
    Curious, what are you using for testing the first screenshot? Thanks

    Looks like loader.io

    Edit: Sorry, I didn't saw this was already answered!

    Thanked by 1CasualCanvas
  • Thanks for your detailed review.

    Thanked by 1RedSox
Sign In or Register to comment.