[PHPSettings]
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
The group [PHPSettings] of settings/velocity.ini.
File
settings/velocity.ini; override it in settings/override/velocity.ini.append.php, in a siteaccess or in an extension.
Settings
| Setting | Default | Description |
|---|---|---|
| IniOptions[] | opcache.enable_cli=1; opcache.memory_consumption=512; opcache.max_accelerated_files=20000; opcache.interned_strings_buffer=64; opcache.revalidate_freq=0; opcache.file_update_protection=0; apc.shm_size=256M | Interpreter settings for the server process, one per line, exactly as they would be written after -d. The opcode cache is here because /etc/php.d/99-no-opcache-cli.ini disables it for every command-line PHP on this machine. That file is a system-wide decision affecting every site on the box and is deliberately left alone; this asks for the cache for this process only. Measured on a content page, four workers, requests round-robined between servers so that drift during the run hits all of them equally: none (today) 526.6 ms 1.9 req/s baseline opcache 390.8 ms 2.6 req/s +25.8% + no timestamp checks 390.0 ms 2.6 req/s +25.9% + interned strings 32M 387.4 ms 2.6 req/s +26.4% + tracing JIT 416.7 ms 2.4 req/s +20.9% So: the cache alone is the win. Timestamp checks cost nothing measurable and are worth keeping, because turning them off means an edited file is ignored until the service restarts. Tracing JIT is slower than no JIT on this workload and is deliberately absent. The timestamp checks only happen with revalidate_freq=0. The cache compares timestamps once revalidate_freq seconds of request time have passed, and a command-line process takes that time once, when it starts; every worker inherits it from the parent. With the default of 2 no worker ever looked again, so a PHP file the kernel rewrites under the same name -- expiry.php, the content language cache, compiled templates -- was served as it was when a worker first compiled it, until the service restarted. A cache clear from the command line then did nothing. With 0 the file is checked on every include, which costs nothing measurable here: the server takes a stat of each include anyway. Memory: 512 MB for scripts and 64 MB for interned strings. The help center's index files are 18-24 MB each per language, and with 256/32 the interned strings buffer was full after a few help requests (measured on a development installation, 2026-10-20: 32.0 of 32.0 MB, 141.6 of 256 MB used three minutes after a restart). The memory is shared by every worker of an instance and reserved, not used, until it fills. |
See also
Generated example: velocity.ini [PHPSettings]
Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this group. The descriptions are the comment lines of settings/velocity.ini.
Contributors
- Graham Brookins Updated
Comments
Add a comment