Skip to content

PHP performance

Read your environment's PHP memory pool, and rebalance the number of PHP threads and the memory each one gets.

The PHP performance panel shows how much memory an environment's PHP has and how that memory is split between threads. Avaloi staff set the size of the pool. You decide how to use it. Open the site, then Info, and find PHP performance.

Open it

  1. Open a site and pick the environment in the top bar.
  2. Stay on Info.
  3. Find the PHP performance panel.

The panel shows three numbers:

  • Memory pool: the total memory PHP can use on this environment. Avaloi staff set it.
  • Threads: how many PHP requests can run at the same time.
  • Memory per thread: how much memory each of those requests can use.

Rebalance threads and memory

You can rebalance threads and memory inside the pool. More threads means more requests at once, with less memory for each. Fewer threads means each request gets more memory, which suits heavy admin pages and large imports, at the cost of handling fewer visitors at the same time.

  1. In the panel, set the threads and the memory per thread you want. Together they must fit inside the pool.
  2. Save.

The change runs as a job, and the dashboard shows the progress. Setting it on the live environment and on a staging environment are separate changes, so you can try a balance on staging first.

See what PHP really runs with

The PHP engine card on the APM tab reads the settings back from the server: the PHP version, the number of PHP workers and how they start, the memory limit, the maximum execution time, OPcache, and how many workers are busy right now. Use it to confirm a change took effect. The same values are at GET /v1/environments/{id}/php/engine.

Grow the pool

The pool itself is set by Avaloi staff. If your site needs more memory in total, contact support.

Quick answers

Why can I not raise both threads and memory per thread? Both share one pool. Raising one lowers the other. Ask support to grow the pool if you need more of both.

My site shows memory errors in the PHP log. Lower the thread count so each thread gets more memory, then watch php-fpm.log on the Logs tab. If errors continue, ask support about the pool size.

Does staging share live's pool? Each environment has its own panel and its own setting.

API

  • PUT /v1/sites/{id}/php-performance
  • PUT /v1/environments/{id}/php-performance

PUT /v1/sites/{id}/php-performance sets the live environment. PUT /v1/environments/{id}/php-performance sets the environment you name.

Still stuck?

Email [email protected] with your site name and what you tried, or send us a message.