Howdy, Stranger!

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


What's your trick to run sites successfully?
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.

What's your trick to run sites successfully?

Here we all run our own servers mostly, so we setup for various purpose. I think most of us config server in there own way.

For a production server to serve 4-5 wordpress and custom site, I use nginx, php74 and php56, and mariadb. Daily 1200-1500 Unique visitor and around 6k-8k pageviews for all sites. I have around 200mb mysql data,all of them innodb type.
Its a tiny vps run in centos 7 with 1.5gb ram and 1 core cpu and 10gb ssd.
No additional configuration i made on php.in or my.cnf . But I cant run a database with 250mb+ size, its make cpu 100 until remove the database. so i use remote dedicated kimsufi server with 4gb ram for mysql over 50mb. Work fine but too slow as low benchmarked box.

What is your custom configuration for php and mysql or nginx ?

any other custom configuration for your server environment like apache, nginx-reverse proxy or cache server or separate mysql server or load balancing ?

what kind of hardware you use? etc etc..

Just share your server environment details so everyone can improvise or get idea to maintain server smoothly and run website.

Comments

  • no need custom config on tiny vps
    ===> use ryzen + nvme or other high performance (for example : terrahost vps) :D

    Thanked by 1terrahost
  • @pedagang said:
    no need custom config on tiny vps
    ===> use ryzen + nvme or other high performance (for example : terrahost vps) :D

    no matter how high performance server you use, you have to configure it once your site grow. like separate database server from file server and load balance file server. its happen maybe you dont know yet

  • @bdspice said:

    @pedagang said:
    no need custom config on tiny vps
    ===> use ryzen + nvme or other high performance (for example : terrahost vps) :D

    no matter how high performance server you use, you have to configure it once your site grow. like separate database server from file server and load balance file server. its happen maybe you dont know yet

    As your site grows, you need to upgrade your vps too.

    Thanked by 1yoursunny
  • @jcarlo9 said:

    @bdspice said:

    @pedagang said:
    no need custom config on tiny vps
    ===> use ryzen + nvme or other high performance (for example : terrahost vps) :D

    no matter how high performance server you use, you have to configure it once your site grow. like separate database server from file server and load balance file server. its happen maybe you dont know yet

    As your site grows, you need to upgrade your vps too.

    its not only about upgrade box, its about environment the box have.

  • @jcarlo9 said:
    As your site grows, you need to upgrade your vps too.

    and need adjust mysql and nginx config too

    Thanked by 1bdspice
  • Well MySQL database and Webserver together will perform much better on a NVME disk than regular HDD. The reason is a lot of disk operations happen when you constantly read-write to the disk.

    For a similar setup that you have I would go with something that has the following specs:
    2 vCPU (Ryzen)
    4GB RAM
    50GB NVMe

    That would give you without major configuration at least 50% better performance depending of course on the host you chose.

    Try using PHP 7.4 or newer it will speed up your websites further.

    So as the other guys said it is worth upgrading your VPS when your site grows larger.

    Thanked by 1bdspice
  • @Vita said:
    Well MySQL database and Webserver together will perform much better on a NVME disk than regular HDD. The reason is a lot of disk operations happen when you constantly read-write to the disk.

    For a similar setup that you have I would go with something that has the following specs:
    2 vCPU (Ryzen)
    4GB RAM
    50GB NVMe

    That would give you without major configuration at least 50% better performance depending of course on the host you chose.

    Try using PHP 7.4 or newer it will speed up your websites further.

    So as the other guys said it is worth upgrading your VPS when your site grows larger.

    its not about my vps only. guys share your server enlivenment how it work.

  • no
    It's useless
    because it always depends on the environment

  • @pedagang said:
    no
    It's useless
    because it always depends on the environment

    just share what type of software, distro you use on your server and what is the environment

  • Tim_kwakmanTim_kwakman Member
    edited February 2022

    There are way to many variables to consider to have a "one size fits all" kind of answer.

    Out of the box Nginx / PHP are pretty good, I don't think you'd get a lot of performance out of tweaking it (you can disable access logs, or do things like that, but that won't do a lot really).

    I do think that using a Kimsufi server is not a great idea for a database server. For example: I had a Zabbix server running on there (getting monitoring information from ~100 VM's) and it was slow, and the CPU usage was always around 80%). Moved it to a VPS with modern hardware (Newer intel + SSD) using the same database (exported it). CPU usage is <10% and it's always fast. The VPS is just a 2 cores + 2GB RAM VPS that costs ~5-6 EUR/month, so nothing special. The Kimsufi server was more expensive.

    So if you're running on Kimsufi or a very slow VPS, then that is the first thing I'd look towards as others have stated. HDD's are just slow especially on VPS providers (shared with other users) or at providers like Kimsufi where you get pretty old hardware.

    After that, I'd start looking at why CPU usage is so high. I had an issue with my database indexes (did not have any on column that was being read often). The database server was sitting at around 30-40% CPU usage all the time with ~500-700 queries/second. After creating the indexes, it went down to around 5-10%.

    Also, sites are never the same. Saying 5-6 Wordpress sites does not mean anything really. I've seen Wordpress sites that will hammer a VPS to the ground due to bad plugins. While the server was running fine with 20 other Wordpress sites before that one site was added. They had similar traffic levels.

    Just caching where possible using Varnish or even Nginx (it can cache static assets) should also make a big difference, but is not always possible, and cache invalidating can be hard. There are also Wordpress cache plugins, but having something before PHP will be faster.

    tl;dr would be:

    • Use modern hardware (SSD's, modern CPU, etc.)
    • Make sure that everything at the Application layer is optimized, Nginx/PHP are pretty performant out of the box. Look for possible database issues (missing indexes). Bad plugins/code, etc.
    • And if you want to go further, look at caching.

    Those would make the biggest impact for what I've seen. What OS you use, or if you changed your Nginx/PHP configuration does not matter if its running on bad hardware or if there are issues with the application itself (code/plugins/database design).

    -Tim

    Thanked by 3pedagang bdspice mrTom
  • @jcarlo9 said:
    As your site grows, you need to upgrade your vps too.

    But if you follow my method and procrastinate so that you never get anything finished to the point of publishing for all to see, you never have such scaling issues.

  • The hardware can be as good as it is, if the developer of the site programs only bullshit it will not boom.

  • I use direct admin on a 4gb vps with around 2gb free (plenty of wiggle room)

    However I use apache with nginx as a reverse proxy and redis to cache some mysql queries(mariadb) and save hammering the mysql server all the time for my WordPress site (it helps that I already have redis installed on the server for rspamd)

    Many moons ago I used to tune mysql's my.cnf to use ram caches to save disk read and writes (it made a difference at the time)

    Thanked by 1bdspice
  • yoursunnyyoursunny Member, IPv6 Advocate

    @MeAtExampleDotCom said:

    @jcarlo9 said:
    As your site grows, you need to upgrade your vps too.

    But if you follow my method and procrastinate so that you never get anything finished to the point of publishing for all to see, you never have such scaling issues.

    My site used to have 10 pages.
    It's on Windows 2003 dedicated server using 30% CPU.

    Then it grew to 50 pages.
    It's on 2GB VPS using 10% CPU.

    Now there are about 200 pages.
    It's on 1GB VPS using 1% CPU.

    What changed?
    Delete the database and make everything static.

  • Have you tried static page caching on your WordPress sites? As quoted from "Optimization - Caching" on wordpress.org:

    Plugins like W3 Total Cache, WP Super Cache and Cache Enabler can be easily installed and will cache your WordPress posts and pages as static files. These static files are then served to users, reducing the processing load on the server. This can improve performance several hundred times over for fairly static pages.

  • SaahibSaahib Host Rep, Veteran

    Pretty much everything is already said here.
    In your case, first start optimizing your wordpress installations and then look into hardware side. Wordpress can be sometimes tricky to optimize, once I had to fix a WP website with almost no traffic but yet it was able to get down a 4 core / SSD VPS only with few page requests. Turns out theme was bad and was causing 100+ request to new pages with each page load.

    Thanked by 1Talistech
  • bdspicebdspice Member
    edited February 2022

    @chip said:
    I use direct admin on a 4gb vps with around 2gb free (plenty of wiggle room)

    However I use apache with nginx as a reverse proxy and redis to cache some mysql queries(mariadb) and save hammering the mysql server all the time for my WordPress site (it helps that I already have redis installed on the server for rspamd)

    Many moons ago I used to tune mysql's my.cnf to use ram caches to save disk read and writes (it made a difference at the time)

    This type of comment i expected from the post. But most of you just suggesting me to optimise my server my site. Listen i run all my site perfectly till now. But i just want to hear whats your scenario to everyone. Btw thanks for all comments everyone. And specially thanks to @Tim_kwakman for such briefly comment

  • LordSpockLordSpock Member, Host Rep

    This is an interesting question.

    For all large sites I do for clients/work purposes - we've moved to "serverless" and complementing technologies.

    For the more old-school L{A,E}MP stack, I no longer have the burden pleasure of maintaing anything like this anymore (at least not on a large scale, I still have a cPanel server kicking around for a few small sites). When I last did it a few years ago though (vB site & a few XenForo ones) - we used a load balancer running nginx, passing through to web servers running nginx, with MySQL on a Galera cluster spread across a few machines (all NVMe for the database, just SATA SSDs on the web servers).

    We experimented for a while with caching database requests, prior to us clustering SQL we used memcached - but we found with improvements in the DB server and us clustering, those benefits weren't as helpful.

    Towards the end of my time doing that sort of thing, we'd keep static assets in an S3 bucket and serve them via a CDN, didn't reduce load by much but reduced the amount of data we needed to keep on our web servers by a ton.

    Thanked by 1bdspice
  • @yoursunny said: What changed? Delete the database and make everything static.

    That and CPU speeds increased a lot since 2003.

    Though agreed: going static or mostly static (assuming “mostly static” is designed well enough that the dynamic bits don't affect apparent responsiveness more than they have to) makes good content responsiveness much easier to achieve, even on non-low-end gear.

  • yoursunnyyoursunny Member, IPv6 Advocate

    @MeAtExampleDotCom said:

    @yoursunny said: What changed? Delete the database and make everything static.

    That and CPU speeds increased a lot since 2003.

    Though agreed: going static or mostly static (assuming “mostly static” is designed well enough that the dynamic bits don't affect apparent responsiveness more than they have to) makes good content responsiveness much easier to achieve, even on non-low-end gear.

    The dynamic bits in "mostly static" refer to a PHP script to render static Markdown into static templates.
    This could have been a static site generator but it's not currently coded that way.
    Nevertheless, these pages are cached in tmpfs by nginx.

    Then I have a small number of really dynamic scripts, such as:

    • display bus maps from GTFS feeds: this one always causes a CPU spike because I wrote a very complex SQLite query. On the laptop it takes 15 seconds to run this script, but the server runs much faster.
    • deduplicate bibtex entries: this one is pretty fast because it only uses PHP built-in functions to process uploaded data.
  • cybertechcybertech Member
    edited February 2022

    use a production grade multicore vps with GB5 1000 score and above per core from reputable provider running on redundant A+B power supply and network, and local NVMe RAID 10.

    then php8.1 maybe if its even just a little better than 7.4, with 999 caching mechanisms (opcache, redis, etc)

    optimize php sessions / caching according to ram

    optimize mariadb according to available ram

    nginx works, test with litespeed to compare.

    single core i dont think enough for high visitor and php. especially if its a shitty cpu.

    of course remote backup intervals according to your risk appetite. weekly/daily/hourly

    Thanked by 2bdspice yoursunny
  • @LordSpock @cybertech thanks for such information. Knowledge is interesting to me

  • ehabehab Member
    edited February 2022

    @bdspice said: Knowledge is interesting to me

    woman are more is fascinating to me

Sign In or Register to comment.