Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

The compiled kernel container

What var/cache/kernelservices/ is, what it saves on every request under PHP-FPM and Velocity, when the deploy and the INI cache clear rebuild it, how to check it with exp:services:check, and how to switch it off.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/hosting/performance/compiled-kernel-container.md

On this page

The compiled kernel container

This page is for system administrators who deploy and run Exponential sites. As of 6.0.15 the kernel keeps a compiled container in var/cache/kernelservices/: for every siteaccess, a recording of how the kernel activates the extensions at the start of each request. With it, a request no longer looks up every extension directory on disk, and on Exponential Velocity a worker builds the settings files of a siteaccess once instead of on every request. The developer side is on the kernel service container; the full reference on kernel services.

What it saves

Measured on a test installation with 62 active extensions and 18 siteaccesses (the start of a request, up to the module run):

BeforeAfter
PHP-FPM, start of a request38 to 50 ms27 to 36 ms (-15 to -35%)
Velocity, start of a request21 to 31 ms7 to 14 ms (-51 to -72%)

Rendering is not changed by it; a page served from the HTTP cache never starts the kernel and gains nothing.

Nothing to do, normally

WhenWhat happens
exp:velocity deploythe INI step (ezcache.php --clear-tag=ini) compiles it again; Velocity's workers notice the new one on their next request
php bin/php/ezcache.php --clear-tag=ini or --clear-all on the command lineremoved and compiled again (a second or two)
INI cache cleared in the administrationremoved; each siteaccess records itself again on its next web request
First request after an installthe siteaccess records itself; the next request uses it

A request uses the compiled container only when it starts from exactly the state that was recorded; otherwise it works as before. A stale container therefore makes a request slower, never different.

Checking it

./console exp:services:check      # PASS or FAIL, the siteaccesses compiled, the generation, the worker scope
./console exp:services:compile    # compile it now

exp:services:check exits with 1 on an error, so it can run in a deploy check or a monitor.

Settings

settings/override/kernelservices.ini.append.php:

<?php /* #?ini charset="utf-8"?

[ContainerSettings]
# compiled (default), dev (nothing compiled is used) or disabled (the container takes no part in the boot)
Mode=compiled
# a web request records a siteaccess that has no current compiled file (default enabled)
AutoRebuild=enabled
# keep each siteaccess's settings files for a Velocity worker: auto = when config.php sets EZP_INI_FILEMTIME_CHECK
# to false (the INI cache does not look at file times either)
WorkerScope=auto
*/ ?>

To switch it off, set Mode=disabled and clear the INI cache: the kernel boots exactly as before 6.0.15.

Things to know

  • Ownership. Velocity runs as root, PHP-FPM as the site's user. A file the container writes as root is given to the owner of var/, so the other can replace it.
  • Editing a settings file by hand. As for the INI cache: with EZP_INI_FILEMTIME_CHECK false in config.php, nothing notices the edit until the INI cache is cleared (or the deploy runs), and that also rebuilds the container.
  • A new extension directory that appears on disk without a settings change needs a deploy or exp:services:compile, as it needs new autoloads.
  • Several sites on one installation (multi-site hosting, host matching): one compiled file per siteaccess, and a Velocity worker keeps the settings of each siteaccess apart.

Learn more

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x