It is a false assumption that, just by moving an application to the cloud, it will run faster. While it is much easier to scale an application there, effects from a weak application architecture, massive amounts of database queries or unoptimized storage usage can actually make things slower. When you run your whole application, including database server, key value store and storage, on a single machine, you won't notice many of the performance issues which surface in scalable environments.
These kinds of performance issues are a bit tricky to debug. Your Neos website may be pretty fast on your brand new MacBook Pro, but perform badly on a production server. Most commonly, latency is what spoils the party. In these cases, profiling in the actual hosting environment is what you need to do. And with the free Blackfire integration for Flownative Beach, this is only a matter of a few clicks.
Performance Profiling for Neos and Flow
Simply get started with Blackfire by going to the "Add-On" of your Beach project (available in Starter projects and higher). Add your Blackfire identifier and tokens for server and client:
Once your'e done, you can enable Blackfire profiling for any instance of your project. Just go to the instance you'd like to profile and enable Blackfire profiling using the switch:
After next deployment your instance is configured for profiling with Blackfire. Beach supports both, HTTP(S) and command line profile runs. For HTTP, just browse to your instance with a browser using the Blackfire Companion plugin.
Profiling a service or command you run from the command line is easy, too: log in to your instance via SSH and use the blackfire utility to start a profiling run:
beach@instance-938fcb20-9050-43bd-b23a-51580cac2538-64cdddbdbf-kwzw7:/application$ blackfire run ./flow help
An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users. 4.1.7 ("Production/Beach/Instance" context)
usage: ./flow <command identifier>
The following commands are currently available:
…
Blackfire Run completed
Graph URL https://blackfire.io/profiles/ba2d7261-9ca1-3421-a5a8-47c047e47fc2/graph
No tests! Create some now https://blackfire.io/docs/cookbooks/tests
No recommendations
Wall Time 601ms
I/O Wait 231ms
CPU Time 371ms
Memory 19.2MB
Network n/a n/a n/a
SQL 155µs 1rq
We think it's never been easier to profile a Neos website or Flow application in its natural habitat. Enjoy!
Oh, just in case you didn't know that yet: Flownative Beach is a cloud platform specifically made for Neos and Flow. Just give it a try, there's a 14-days free trial and a guide to get you started!
Diskutiere mit uns
Die E-Mail-Adresse wird nicht veröffentlicht. Pflichtfelder sind mit * markiert.
Auf diesen Post antworten