Neos/Flow Site Performance

Hi I am just wondering what sort of performance I could expect with Neos 3.0 running with apache 2, using mod_deflate, a Redis cache for Neos_Fusion_Content, Flow_Mvc_Routing_Resolve, Flow_Mvc_Routing_Route (3 in total) on a cloud server running Centos with 2gb ram?

At the moment my page loads with images (home page) are about 3.182s with TTFB 0.880s, start render 1.286s . An empty site page with only the menu and footer the numbers are : 2.249s, 0.940s, 1.385s . A page with just some formatted html and menu and footer 2.225. 0.889s & 1.285s. I also run the test with phpinfo.php so not using Neos and I get 0.591s, 0.441s, 0.688s.

Now I realise that Neos & Flow do some heavy lifting but I am wondering if there is anyway that I can get these numbers down still using apache and php71 closer to the magic 1s ? What is recommended ?

Good morning Nick :slight_smile:

What FLOW_CONTEXT are you running your application in ? If you are using Development it does take sometime, since alot of cache is recalculated once you change a file and the FileMonitor picks that up.

But once you use Production and have had the compiling running you should experience alot faster response time.

Hi Soren

Thank you for replying. Hope you are having a good day :slight_smile: .
I am running in production context . set via .htaccess and confirmed I think by caches being created in the Production directory under temporary.

However having said that I have just switch it to Development context by commenting out SetEnv FLOW_CONTEXT Production in .htaccess. I flushed the caches and warmed up the development caches and then ensure pages where loading before re running the WebPageTest.org and suprisingly get the following numbers which look almost identical to those in the production context, well a bit slower on TTFB and start to render! These are numbers for Development context. Time to load 3.030s TTFB 0.949s and start render 1.685s .

I am not sure why this is as I would have expected them to be much slower ! Not sure what to try next and any help would be appreciated.

Remove the redis cache and try again, maybe it is the problem

Thanks for suggestion, I added the redis cache to try and get numbers down - although little or no improvement so problem lies somewhere else?

Can you give some details about the setup:

Is this a new site with very little nodes and fusion-code? In this case i think something is strange in your server-setup because Neos in Production can be quite fast.

Or is it a site with grown fusion-codebase and lots of nodes. In this case it is also possible that the problem lies in the flowQueries and the fusionCaching that you use.

Does the slow response merely occur on the first hit to a url or also on the following ones … that would also be a hint to some problematic @cache annotations.

Can you reproduce the sow behavior locally or does this only occur on the server.

Regards, Martin

The times indeed look a bit high and the TTFB should be a bit lower in Production context, but given the “base time” of 0.6s for the plain phpinfo page vs. the ~0.9 with Neos, there is only so much you can hope for, since the actual execution of PHP is your current main bottleneck. You could verify this by also testing a static html file, maybe it’s even the web server in general that is relatively slow in delivering.

One of the base rules of optimizing a Neos/Flow setup, is to move as many caches as possible (esp. the heavy ones like Reflection and Doctrine, but basically all non-PhpFrontend) to memory based backends (redis, memcached, apcu), which you already started, but there are still a lot more caches. Note though that moving too many caches to a network based backend (redis, memcached) will eventually make the network a bottleneck unless you have a single server running all instances and the network interface being the loopback device.

To fully optimize the setup the next thing would be to rule out the current bottleneck. For this, a good profiling is essential and inevitable, or else you just end up trying things blindly.

Check this package for a profiler GUI for Neos/Flow

With the numbers you can then see where the most of the time is spent and we can try to find counter measures.

Hi thanks, yes I guess if just the phpinfo is taking 400ms then not a lot of gain and probably nearly there anyway. BTW does sandstorm/Plumber work with Neos 3.0 - just tried it and got class loading errors before anything even bootstraps - so have removed it . will take another look at installing once i get my environment stable again!

But having just said that (the first bit about not much to gain) it depends on what tool i use to get the TTFB - when using chromes network tab with the phpinfo i can get 40ms where for news demo i get approx 400ms