New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Wordpress site on a 512 MB RAM VPS - Need Server Configuration.
vladimirlenin
Member
in Tutorials
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
Comments
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.
But I don’t think OLS work well on a 512 RAM VPS.
More RAM needs to be installed
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.
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
use centminmod
Nginx + MariaDB + PHP7.4-FPM + OPcache
Wouldn’t that add overhead?
Or webinoly to automate all of the above. It Ran well on Ubuntu 18.04 256 MB Ram on tinykvm (Ramnode)
Post below buv@Jord reminded me
I have a WordPress site running on a 256MB VPS seems to be working fine 😂
Not needed if full page caching is enabled!
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
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.
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.
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.
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.
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.
+1 and +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.
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.
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.
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...
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:
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:
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.
Those of you stating more memory is needed have forgotten our roots.
https://openlitespeed.org/kb/1-click-install/
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.
@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?
Curious, what are you using for testing the first screenshot? Thanks
Loader.io
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.
Looks like loader.io
Edit: Sorry, I didn't saw this was already answered!