Performance issues, can't install demo site [solved]

I’m attempting to follow the instructions http://neos.readthedocs.org/en/stable/GettingStarted/Installation.html to install a fresh copy of Neos. This is on a new vagrant virtual machine running Ubuntu 14.04.

These packages were installed via apt

  • apache2
  • php5
  • php5-mysqlnd
  • php5-json
  • php5-mcrypt
  • php5-xsl
  • php5-gd
  • php5-imagick
  • mariadb-server
  • mariadb-client

I configured the webserver according to the instructions provided. These are the issues I am having:

  1. Doing anything with Flow or Neos is incredibly slow. Even attempting to run the ./flow binary with no arguments takes 20 seconds to output the help screen. Every step of the Neos setup process takes at least 30 seconds to load.

  2. The demo site does not seem to install successfully. When I get up to the import site step of the setup process, I can select the demo site from the list and enter the domain and package name and click next. It then sits there for at least a few minutes then dumps me back to the setup login screen (not the neos login screen). I can log in with my details but there is no UI at all.
    I’ve tried deleting everything and installing the demo site package manually but it takes a similar amount of time, and just says “Killed” with no error report or anything.

When it’s sitting there doing something it’s maxing out the CPU on the virtual machine for the whole time.

I’m assuming the reason its failing to install the demo site is because it’s taking too long. Are there any other php extensions that should be installed for better flow/neos performance?

EDIT:
I’ve also confirmed that the opcache is enabled and I’ve increased the opcache memory limit to 128mb.

Things are running a lot better now. I have:

  • Increased the RAM of my VM from 1gb to 2gb
  • Increased opcode size from 64mb to 128mb
  • Disabled shared folders in my VirtualBox vm

This was a vm managed with vagrant, with the whole Neos dir shared out by standard VirtualBox shared folders. I have heard this sometimes has performance implications but I’ve personally never had a problem before. Not sure if its because of a newer version of VirtualBox or because Neos/Flow is particularly i/o heavy. My guess is that this was the actual issue but I haven’t done any other testing to verify.

Page load time has gone from 30-40 seconds to 1-2 seconds, and the Demo site installs sucessfully now. I had to do a

./flow site:prune

to delete all the old half-loaded site data, followed by

./flow package:activate --packageKey=TYPO3.NeosDemoTypo3Org
./flow site:import --package-key=TYPO3.NeosDemoTypo3Org

to activate the demo site package and finally import it. My previously created user details allowed me to login at example.com/neos.

By default all caches of Flow and Neos are file caches, this is extremly IO intensive. You might want to exclude those from sharing (Data/Temporary) for better results.

Just curious; would there be any built-in support for storing these in memory instead? You could always mount a ram disk for Data/Temporary but would there be any internal support? Since its so I/O heavy on each request this would make the whole app perform better right?

Indeed and there are a couple of different caching backends for you to use. I generall recommend using Redis but memcached would work as well.

See http://flowframework.readthedocs.org/en/stable/TheDefinitiveGuide/PartIII/Caching.html?highlight=cache#cache-backends

There are very few caches that can only be file cached but putting the rest to redis (or so) can have a pretty nice effect.

Also a specific mechanic of Flow/Neos is to avoid having the developer to take care of cache clearing in development context we scan files for changes on request, this will obviously be slow via shared filesystem, so if you share a filesystem into the VM that will be slow. Either share out of the VM or use sftp/rsync to move files back and forth.