• Dev
  • Flarum Stress test with Nginx + Php-fpm

I thought I'd run some tests on my flarum install. Results may vary.
Parameters:

  • Apache HTTP server benchmarking tool - ab
  • Nginx
  • Php5-fpm with ondemand pool with 4 max children just for flarum to serve php requests (to minimize interfering with other parts of the server and other requests)

I'm sitting at 90MB of memory with a debian 7 install


  • A initial visit takes 4s (lot of *.js loading)

  • A refresh (F5) takes 1.36sec

  • A reload (clicking on logo or clicking refresh button) takes 222ms

  • A page visit takes 240ms

  • A single isolated request to a page called up a single 12MB php-fpm process

  • 1000 connections (50 concurrent) calls up the other 3 processes (12mb each) with these connection times (doubling max children didn't greatly help this)

ab -n 1000 -c 50 link

Connection Times (ms)
min mean[+/-sd] median max
Connect: 41 137 118.4 89 1289
Processing: 257 1502 383.0 1444 3967
Waiting: 251 1484 366.7 1434 2702
Total: 495 1639 341.1 1549 4123

  • Attempt to pull a page while this is going on (in a separate test) 1.24s

This doesn't simulate a real world load scenario but it's certainly promising!

    Nice! 50 concurrent calls is quite a lot actually. Looking good.

    Kulga A page visit takes 240ms

    I like that part a lot.
    Oh, the joys of single-page applications. 🙂

    I optimized the server a little bit more and enabled opcache
    I also wanted to stay within the realm of the cheapest node ramnode has (128MB)
    Server sitting at 73MB

    ab -n 1000 -c 30 http://www.singularidea.org/d/2-info
    -n == max connections -c == concurrent connections
    • Cache size of flarum scripts - 7MB (wow!)
    • Page visit - 180ms (average)
    • With stress test - 700ms (average)
    • During stress test my memory stayed below 120MB (optimized max children of php5-fpm)

    For reference, a blink is supposed to be around 100-150ms

      Kulga 30 concurrent connections with only 73mb? That's amazing <3

        Wombat Almost 😛 That was the resting MB usage. It jumped to about 120MB during the test.
        It's also just a single connection (so I don't know how valid it is, I'll need a actual popular forum to test that lol)
        -- But it's a indicator you can run a popular forum with a extremely bare bone VPS.

        Additionally, here's some visualizations of RAM usage by flarums scripts

        Main
        main

        Extensions
        Extension

        6 years later

        can This test is be applicable for V1.0.0.

        How can we compare 6 years 🙂 ?

        This is quite a old thread with my last response being 6 years ago
        But! I still have and use the same VPS I ran this test on haha