Join the community today
Become a Member

Benchmarks Weird plateau in benchmarks + timeouts

Discussion in 'Virtual Private Server (VPS) hosting' started by JMX, May 13, 2023.

  1. JMX

    JMX New Member

    10
    1
    3
    Mar 5, 2022
    Ratings:
    +6
    Local Time:
    5:28 PM
    10
    Hey Community,


    I'm currently running a few benchmarks, on one hand for fun and to learn something, but on the other hand also to decide if I want to switch from VPS back to bare metal.

    I'm getting these weird plateaus with timeouts (10 sec) and latency
    FireShot Capture 082 - doctype.blog_ A load test by loader.io - loader.io.jpg
    FireShot Capture 083 - doctype.blog_ A load test by loader.io - loader.io.jpg

    Do you have any idea, what I can tweak to fix the timeouts and latency spikes?

    Also, I did a cyberpanel / litespeed install, just for fun and to compare these two, and it gets worse times, but no timeouts at all what results in overall more connections...
    cyberpanel.jpg
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,341
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    2:28 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Are you benchmarking Nginx static files/html page or a standalone PHP file or a PHP file connected to a MariaDB MySQL database?
    • If you're benchmarking Nginx static HTML page, then you'll need to tune your Nginx configuration settings.
    • If testing standalone PHP file, you need to tune both Nginx and specifically PHP-FPM settings. You can start at https://community.centminmod.com/threads/how-to-troubleshoot-optimize-php-fpm-server.15317/
    • If testing PHP connected to MariaDB MySQL database, need to tune Nginx, PHP-FPM settings and MariaDB MySQL
    • In all cases, you may also tune system level server settings like TCP settings
    • Centmin Mod auto optimizes Nginx, PHP-FPM and MariaDB MySQL based on server hardware detected settings and resources like CPU cores, memory and disk I/O performance. But at very high traffic and concurrency levels, you also need to tune your settings for your actual specific web app traffic requirements. That is left up to you to do and/or to hire someone to do it for you. FYI, that is my day job for past 20+ yrs is paid consulting for clients to optimize their servers and improve their sites page load metric/times - so that's where Centmin Mod development experience and know-how comes from :)
    • Tuning can't always help as it could be a limitation of the server resources, CPU, memory and disk I/O and/or your benchmarking parameters used too. So always benchmark at different levels of load to see how your server and also your web application respond. For example also test at 250, 500, 1000, 2000, 3,000 and 5,000 user loads too and compare.
    Also you misinterpreting the benchmark results slightly. Here's a numbers look

    Centmin Mod Nginx has:
    • Faster average, min and max latency response times. That is close equivalent to your Time To First Byte (TTFB) metric which is ultimately responsible for some of Google Core Web Vital metrics like Largest Contentful Paint (LCP) - while you can also have slow LCP with fast TTFB depending on your web app's HTML structure and layout, you still need fast TTFB for fast LCP (https://csswizardry.com/2019/08/time-to-first-byte-what-it-is-and-why-it-matters/) - Google suggest TTFB accounts for ~40% of LCP times while ~40% is for resource loading/HTML so 50/50 importance. Centmin Mod Nginx and PHP-FPM are specifically tuned for optimal response times and scalability.
    • Has ~26.5% more successful response request count 424,720 vs 335,832 so served more good requests at faster min, avg and max latency response times (TTFB) despite having more timeouts.
    • If you compare the charts, Centmin Mod spends majority of requests up to 55 seconds into benchmark at below 1000ms latency response times and 1/2 that time under 500ms latency response times with spikes in latency due to how Nginx and PHP-FPM would be optimized for latency compared to CyberPanel spending 1/2 it's time below 1000ms and 1/2 above 1000ms latency response times.
    • So in non-synthetic benchmarks real world, more likely at under your benchmark load parameters, all you would experience is faster page load times and response times. Then if/when you start experiencing timeouts in real world, you'd tune your settings specifically for your web app's requirements.

    Centmin Mod Nginx
    • average latency = 677ms
    • min latency = 87ms
    • max latency = 10413ms
    • successful response count = 424,720
    • timeouts = 21575
    CyberPanel/Litespeed
    • average latency = 990ms
    • min latency = 126ms
    • max latency = 14632ms
    • successful response count = 335,832
    • timeouts = 0
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,341
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    2:28 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    on related note, bare metal dedicated server depending on server hardware and CPU used will always be more performant than a VPS. I just did some h2load HTTP/2 HTTPS benchmarks on Centmin Mod 130.00beta01 with private beta AlmaLinux 8.7 operating system using my h2load-bench.sh script GitHub - centminmod/h2load-benchmarks

    comparing VPS benchmarks vs dedicated server benchmarks via comparison Charts - notice the requests/s and average and max latency response time differences for VPS vs dedicated server

    • VPS = 2 CPU KVM VPS with 2GB memory, 50GB NVMe disk for US$26/yr
    • Dedicated = Intel Xeon E-2276G 6 cores / 12 threads with 32GB memory, 2x960GB NVMe raid 1 for US$90/month Black Friday special with Clouvider which costs ~41.5x times more than VPS over 12 months :D
    Only tested single thread as more than that would overwhelm VPS. So dedicated would have more headroom with more threaded h2load tests

    compared-output.png