mirror of
https://github.com/php/doc-es.git
synced 2026-03-24 07:22:16 +01:00
1487 lines
53 KiB
XML
1487 lines
53 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 8ea24dc32374bf4f6b04005e317101e4c65a0214 Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: yes Maintainer: Marqitos -->
|
|
<sect1 xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="opcache.configuration">
|
|
&reftitle.runtime;
|
|
&extension.runtime;
|
|
<para>
|
|
<table>
|
|
<title>Opciones de configuración de OPcache</title>
|
|
<tgroup cols="4">
|
|
<thead>
|
|
<row>
|
|
<entry>&Name;</entry>
|
|
<entry>&Default;</entry>
|
|
<entry>&Changeable;</entry>
|
|
<entry>&Changelog;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody xml:id="opcache.configuration.list">
|
|
<row>
|
|
<entry><link linkend="ini.opcache.enable">opcache.enable</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.enable-cli">opcache.enable_cli</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Entre PHP 7.1.2 y 7.1.6 inclusive, el valor por omisión era 1</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.memory-consumption">opcache.memory_consumption</link></entry>
|
|
<entry>"128"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.interned-strings-buffer">opcache.interned_strings_buffer</link></entry>
|
|
<entry>"8"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.max-accelerated-files">opcache.max_accelerated_files</link></entry>
|
|
<entry>"10000"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.max-wasted-percentage">opcache.max_wasted_percentage</link></entry>
|
|
<entry>"5"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.use-cwd">opcache.use_cwd</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link></entry>
|
|
<entry>"2"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.revalidate-path">opcache.revalidate_path</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.save-comments">opcache.save_comments</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.fast-shutdown">opcache.fast_shutdown</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Eliminado en PHP 7.2.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.enable-file-override">opcache.enable_file_override</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.optimization-level">opcache.optimization_level</link></entry>
|
|
<entry>"0x7FFEBFFF"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Modificado desde 0x7FFFBFFF en PHP 7.3.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.inherited-hack">opcache.inherited_hack</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Eliminado en PHP 7.3.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.dups-fix">opcache.dups_fix</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.blacklist-filename">opcache.blacklist_filename</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.max-file-size">opcache.max_file_size</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.consistency-checks">opcache.consistency_checks</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>>Desactivado a partir de PHP 8.1.18 y 8.2.5. Eliminado a partir de PHP 8.3.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.force-restart-timeout">opcache.force_restart_timeout</link></entry>
|
|
<entry>"180"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.error-log">opcache.error_log</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.record-warnings">opcache.record_warnings</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.preferred-memory-model">opcache.preferred_memory_model</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.protect-memory">opcache.protect_memory</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.mmap-base">opcache.mmap_base</link></entry>
|
|
<entry>&null;</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.restrict-api">opcache.restrict_api</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link></entry>
|
|
<entry>"2"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.huge_code_pages">opcache.huge_code_pages</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.lockfile_path">opcache.lockfile_path</link></entry>
|
|
<entry>"/tmp"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.opt_debug_level">opcache.opt_debug_level</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 7.1.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.file-cache">opcache.file_cache</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.file-cache-only">opcache.file_cache_only</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.file-cache-consistency-checks">opcache.file_cache_consistency_checks</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.file-cache-fallback">opcache.file_cache_fallback</link></entry>
|
|
<entry>1</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Solo para Windows.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.validate-permission">opcache.validate_permission</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 7.0.14</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.validate-root">opcache.validate_root</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 7.0.14</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.preload">opcache.preload</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 7.4.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.preload-user">opcache.preload_user</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 7.4.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.cache-id">opcache.cache_id</link></entry>
|
|
<entry>""</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Solo para Windows. Disponible a partir de PHP 7.4.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit">opcache.jit</link></entry>
|
|
<entry>"disable"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0. Antes de PHP 8.4.0, el valor predeterminado era "tracing".</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-buffer-size">opcache.jit_buffer_size</link></entry>
|
|
<entry>64M</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0. Antes de PHP 8.4.0, el valor predeterminado era 0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-debug">opcache.jit_debug</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-bisect-limit">opcache.jit_bisect_limit</link></entry>
|
|
<entry>0</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-prof-threshold">opcache.jit_prof_threshold</link></entry>
|
|
<entry>"0.005"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-max-root-traces">opcache.jit_max_root_traces</link></entry>
|
|
<entry>"1024"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-max-side-traces">opcache.jit_max_side_traces</link></entry>
|
|
<entry>"128"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-max-exit-counters">opcache.jit_max_exit_counters</link></entry>
|
|
<entry>"8192"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-hot-loop">opcache.jit_hot_loop</link></entry>
|
|
<entry>"64"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-hot-func">opcache.jit_hot_func</link></entry>
|
|
<entry>"127"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-hot-return">opcache.jit_hot_return</link></entry>
|
|
<entry>"8"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-hot-side-exit">opcache.jit_hot_side_exit</link></entry>
|
|
<entry>"8"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-blacklist-root-trace">opcache.jit_blacklist_root_trace</link></entry>
|
|
<entry>"16"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-blacklist-side-trace">opcache.jit_blacklist_side_trace</link></entry>
|
|
<entry>"8"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-max-loop-unrolls">opcache.jit_max_loop_unrolls</link></entry>
|
|
<entry>"8"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-max-recursive-calls">opcache.jit_max_recursive_calls</link></entry>
|
|
<entry>"2"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-max-recursive-return">opcache.jit_max_recursive_returns</link></entry>
|
|
<entry>"2"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.opcache.jit-max-polymorphic-calls">opcache.jit_max_polymorphic_calls</link></entry>
|
|
<entry>"2"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponible a partir de PHP 8.0.0</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
&ini.php.constants;
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.opcache.enable">
|
|
<term>
|
|
<parameter>opcache.enable</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Activa el cache de opcode. Cuando está desactivado, el código no es
|
|
ni optimizado, ni almacenado en caché. La configuración de <literal>opcache.enable</literal>
|
|
no puede ser activada durante la ejecución mediante la función
|
|
<function>ini_set</function>, solo puede ser desactivada. Intentar activarla
|
|
en un script generará una advertencia.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.enable-cli">
|
|
<term>
|
|
<parameter>opcache.enable_cli</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Activa el cache de opcode para la versión CLI de PHP.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.memory-consumption">
|
|
<term>
|
|
<parameter>opcache.memory_consumption</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
El tamaño de la memoria compartida utilizada por OPcache, en megabytes.
|
|
El valor mínimo permisible es <literal>"8"</literal>,
|
|
que se fuerza si se define un valor más pequeño.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.interned-strings-buffer">
|
|
<term>
|
|
<parameter>opcache.interned_strings_buffer</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
La cantidad de memoria utilizada para almacenar cadenas internas, en megabytes.
|
|
El valor máximo es de 32767 en arquitecturas de 64 bits, y de 4095 en arquitecturas de 32 bits.
|
|
</simpara>
|
|
<note>
|
|
<simpara>
|
|
Antes de PHP 8.4.0, el valor máximo era de 4095 megabytes en todas las arquitecturas.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.max-accelerated-files">
|
|
<term>
|
|
<parameter>opcache.max_accelerated_files</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
El número máximo de claves (y por lo tanto, de scripts) en la tabla de hash de OPcache.
|
|
El valor actualmente utilizado será el primer número del conjunto de
|
|
números primos
|
|
<literal>{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 }</literal>
|
|
que sea mayor o igual que el valor configurado. El valor mínimo es 200.
|
|
El valor máximo es 100000 en PHP < 5.5.6, y 1000000 en versiones
|
|
posteriores.
|
|
Los valores fuera de este intervalo se ajustan al intervalo permitido.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.max-wasted-percentage">
|
|
<term>
|
|
<parameter>opcache.max_wasted_percentage</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
El porcentaje máximo de memoria desperdiciada permitido antes de que se
|
|
programe un reinicio, si no hay suficiente memoria disponible.
|
|
El valor máximo permisible es <literal>"50"</literal>,
|
|
que se fuerza si se define un valor más grande.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.use-cwd">
|
|
<term>
|
|
<parameter>opcache.use_cwd</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Si está activado, OPcache añade el directorio de trabajo actual a la clave del script,
|
|
eliminando así posibles colisiones entre archivos con el mismo nombre base. Desactivar esta funcionalidad mejora
|
|
el rendimiento, pero puede romper aplicaciones existentes.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.validate-timestamps">
|
|
<term>
|
|
<parameter>opcache.validate_timestamps</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Si está activado, OPcache verificará las actualizaciones de los scripts cada
|
|
<link linkend="ini.opcache.revalidate-freq">opcache.revalidate_freq</link>
|
|
segundos. Cuando esta directiva está desactivada, debe reinicializarse
|
|
OPcache manualmente mediante la función <function>opcache_reset</function>,
|
|
la función <function>opcache_invalidate</function> o reiniciando el servidor
|
|
web para que los cambios en el sistema de archivos surtan efecto.
|
|
<note>
|
|
<simpara>
|
|
OPcache puede validar siempre el timestamp de un archivo durante la compilación si las opciones
|
|
<link linkend="ini.opcache.file_update_protection">opcache.file_update_protection</link>
|
|
o <link linkend="ini.opcache.max-file-size">opcache.max_file_size</link>
|
|
están definidas en valores no nulos.
|
|
</simpara>
|
|
</note>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.revalidate-freq">
|
|
<term>
|
|
<parameter>opcache.revalidate_freq</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
La frecuencia de verificación del timestamp del script para detectar
|
|
posibles actualizaciones, en segundos. El valor <literal>0</literal>
|
|
hará que OPcache verifique las actualizaciones en cada petición.
|
|
</simpara>
|
|
<simpara>
|
|
Esta directiva de configuración se ignora si
|
|
<link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link>
|
|
está desactivado.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.revalidate-path">
|
|
<term>
|
|
<parameter>opcache.revalidate_path</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Si está desactivado, los archivos en caché existentes que usan el mismo
|
|
<link linkend="ini.include-path">include_path</link> serán reutilizados.
|
|
También, si un archivo con el mismo nombre está en otro lugar en el
|
|
include_path, no será encontrado.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.save-comments">
|
|
<term>
|
|
<parameter>opcache.save_comments</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Si está desactivado, todos los comentarios de documentación serán eliminados
|
|
del cache de opcode para reducir el tamaño del código optimizado.
|
|
La desactivación de esta directiva puede romper aplicaciones
|
|
y frameworks que dependen del análisis de comentarios
|
|
para anotaciones, como Doctrine, Zend Framework 2 y PHPUnit.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.fast-shutdown">
|
|
<term>
|
|
<parameter>opcache.fast_shutdown</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Si está activado, se utilizará una secuencia de cierre rápida, que no libera
|
|
cada bloque asignado, sino que se basa en el gestor de memoria
|
|
del Zend Engine para desasignar el conjunto entero de variables de la petición, en masa.
|
|
</simpara>
|
|
<simpara>
|
|
Esta directiva fue eliminada en PHP 7.2.0. Una variante de la
|
|
secuencia de cierre rápido fue integrada en PHP y será utilizada automáticamente
|
|
si es posible.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.enable-file-override">
|
|
<term>
|
|
<parameter>opcache.enable_file_override</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Cuando está activado, el cache de opcode será verificado para saber si un archivo
|
|
ya ha sido almacenado en caché cuando se llaman a las funciones <function>file_exists</function>,
|
|
<function>is_file</function> y <function>is_readable</function>. Esto puede aumentar el rendimiento de las aplicaciones que verifican la existencia
|
|
y la legibilidad de los scripts PHP, pero puede devolver datos obsoletos si
|
|
<link linkend="ini.opcache.validate-timestamps">opcache.validate_timestamps</link>
|
|
está desactivado.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.optimization-level">
|
|
<term>
|
|
<parameter>opcache.optimization_level</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Una máscara de bits que controla qué pases de optimización se ejecutan.
|
|
El valor por omisión es <literal>0x7FFEBFFF</literal>, que activa todas
|
|
las optimizaciones seguras. Desactivar optimizaciones o activar optimizaciones no seguras
|
|
es principalmente útil para depurar/desarrollar el optimizador.
|
|
</simpara>
|
|
<simpara>
|
|
Cada bit en la máscara de bits activa un pase de optimización específico:
|
|
</simpara>
|
|
<table>
|
|
<title>Máscara de bits de pases de optimización</title>
|
|
<tgroup cols="4">
|
|
<thead>
|
|
<row>
|
|
<entry>Bit</entry>
|
|
<entry>Nombre del pase</entry>
|
|
<entry>&Description;</entry>
|
|
<entry>Por omisión</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>0</entry>
|
|
<entry>PASS_1</entry>
|
|
<entry>Optimizaciones peephole simples</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>1</entry>
|
|
<entry>PASS_2</entry>
|
|
<entry>No utilizado (fusionado en PASS_1)</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>2</entry>
|
|
<entry>PASS_3</entry>
|
|
<entry>Optimización de saltos simple</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>3</entry>
|
|
<entry>PASS_4</entry>
|
|
<entry>Optimización de llamadas</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>4</entry>
|
|
<entry>PASS_5</entry>
|
|
<entry>Optimización basada en el grafo de flujo de control</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5</entry>
|
|
<entry>PASS_6</entry>
|
|
<entry>Optimización basada en análisis de flujo de datos</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>6</entry>
|
|
<entry>PASS_7</entry>
|
|
<entry>Si el grafo de llamadas debe utilizarse para optimizaciones basadas en SSA</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7</entry>
|
|
<entry>PASS_8</entry>
|
|
<entry>Propagación de constantes condicional dispersa</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>8</entry>
|
|
<entry>PASS_9</entry>
|
|
<entry>Optimización de variables temporales</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>9</entry>
|
|
<entry>PASS_10</entry>
|
|
<entry>Eliminación de opcodes NOP</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>10</entry>
|
|
<entry>PASS_11</entry>
|
|
<entry>Compactación de literales</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>11</entry>
|
|
<entry>PASS_12</entry>
|
|
<entry>Pre-cálculo del tamaño de la pila de llamadas</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>12</entry>
|
|
<entry>PASS_13</entry>
|
|
<entry>Eliminación de variables no utilizadas</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>13</entry>
|
|
<entry>PASS_14</entry>
|
|
<entry>Eliminación de código muerto</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>14</entry>
|
|
<entry>PASS_15</entry>
|
|
<entry>Recopilación y sustitución de declaraciones de constantes (no seguro)</entry>
|
|
<entry><emphasis>Off</emphasis></entry>
|
|
</row>
|
|
<row>
|
|
<entry>15</entry>
|
|
<entry>PASS_16</entry>
|
|
<entry>Inserción en línea de funciones triviales (parte de la optimización de llamadas)</entry>
|
|
<entry>On</entry>
|
|
</row>
|
|
<row>
|
|
<entry>16</entry>
|
|
<entry>(Flag)</entry>
|
|
<entry>Ignorar la posibilidad de sobrecarga de operadores (no seguro)</entry>
|
|
<entry><emphasis>Off</emphasis></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
<note>
|
|
<title>Optimizaciones seguras vs no seguras</title>
|
|
<simpara>
|
|
Las <emphasis>optimizaciones seguras</emphasis> (activadas por omisión) preservan el
|
|
comportamiento exacto del código PHP mientras mejoran el rendimiento. Incluyen la eliminación
|
|
de código muerto, el plegado de constantes y la optimización de saltos.
|
|
</simpara>
|
|
<simpara>
|
|
Las <emphasis>optimizaciones no seguras</emphasis> (desactivadas por omisión) pueden alterar
|
|
el comportamiento en casos límite:
|
|
</simpara>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
<emphasis>Bit 14</emphasis>: Recopilación de constantes. Las constantes se sustituyen
|
|
en tiempo de compilación, ignorando el orden de declaración en tiempo de ejecución:
|
|
</simpara>
|
|
<informalexample>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
echo getA(); // Outputs: "hello" instead of throwing an Error
|
|
const A = "hello";
|
|
function getA() { return A; }
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<emphasis>Bit 16</emphasis>: Ignorar la sobrecarga de operadores.
|
|
No seguro cuando se utilizan clases con <literal>do_operation</literal>
|
|
(p. ej. <link linkend="book.gmp">GMP</link>,
|
|
<link linkend="book.bc">BCMath</link>) en operaciones aritméticas.
|
|
Con declaraciones de tipo, el optimizador puede aplicar las mismas optimizaciones de forma segura.
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.inherited-hack">
|
|
<term>
|
|
<parameter>opcache.inherited_hack</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Esta directiva de configuración se ignora.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.dups-fix">
|
|
<term>
|
|
<parameter>opcache.dups_fix</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Este hack solo debe ser activado como solución de contorno para errores
|
|
"Cannot redeclare class".
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.blacklist-filename">
|
|
<term>
|
|
<parameter>opcache.blacklist_filename</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
La ubicación de almacenamiento del archivo que gestiona la lista negra de OPcache.
|
|
Un archivo de lista negra es un archivo de texto que contiene nombres
|
|
de archivos que no deben ser acelerados; uno por línea.
|
|
Se permiten comodines, y también se pueden proporcionar prefijos. Las líneas
|
|
que comienzan con punto y coma
|
|
se consideran comentarios y serán ignoradas.
|
|
</simpara>
|
|
<simpara>
|
|
Un archivo de lista negra simple se ve así:
|
|
</simpara>
|
|
<informalexample>
|
|
<programlisting>
|
|
<![CDATA[
|
|
; Coincide con un archivo específico.
|
|
/var/www/broken.php
|
|
; Un prefijo que coincide con todos los archivos que comienzan con x.
|
|
/var/www/x
|
|
; Una coincidencia con comodín.
|
|
/var/www/*-broken.php
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.max-file-size">
|
|
<term>
|
|
<parameter>opcache.max_file_size</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
El tamaño máximo del archivo que puede ser almacenado en caché, en bytes.
|
|
Si es <literal>0</literal>, todos los archivos podrán ser almacenados en caché.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.consistency-checks">
|
|
<term>
|
|
<parameter>opcache.consistency_checks</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Si es diferente de cero, OPcache verificará la suma de comprobación
|
|
del caché cada N peticiones, donde N es el valor de esta directiva
|
|
de configuración. Esto solo debe ser activado durante el depurado, sabiendo
|
|
que afecta significativamente al rendimiento.
|
|
</simpara>
|
|
<note>
|
|
<simpara>
|
|
Desactivado a partir de PHP 8.1.18 y 8.2.5. Eliminado a partir de PHP 8.3.0.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.force-restart-timeout">
|
|
<term>
|
|
<parameter>opcache.force_restart_timeout</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
La duración de espera para el inicio de un reinicio programado, si el
|
|
caché no está activado, en segundos. Si este tiempo de espera se alcanza,
|
|
entonces OPcache asume que algo está mal, y matará los
|
|
procesos que gestionan los bloqueos en el caché para permitir un
|
|
reinicio.
|
|
</simpara>
|
|
<simpara>
|
|
Si
|
|
<link linkend="ini.opcache.log-verbosity-level">opcache.log_verbosity_level</link>
|
|
es 2 o más, se registrará una advertencia en el registro de errores
|
|
cuando ocurra este comportamiento.
|
|
</simpara>
|
|
<simpara>
|
|
Esta directiva no es soportada en Windows.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.error-log">
|
|
<term>
|
|
<parameter>opcache.error_log</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
El registro de errores para errores de OPcache. Una cadena vacía será vista como
|
|
<literal>stderr</literal>, y los errores serán enviados a la salida
|
|
estándar de errores (que será el registro de errores del servidor web en la
|
|
mayoría de los casos).
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.log-verbosity-level">
|
|
<term>
|
|
<parameter>opcache.log_verbosity_level</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
El nivel de verbosidad de los registros. Por omisión, solo los errores fatales
|
|
(nivel 0) y los errores (nivel 1) serán registrados. Los otros
|
|
niveles disponibles son las alertas (nivel 2), los mensajes
|
|
informativos (nivel 3), y los mensajes de depuración (nivel 4).
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.record-warnings">
|
|
<term>
|
|
<parameter>opcache.record_warnings</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Si esta opción está activada, OPcache registrará los avisos de compilación
|
|
y los reproducirá en el próximo include, incluso si se sirve desde el caché.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.preferred-memory-model">
|
|
<term>
|
|
<parameter>opcache.preferred_memory_model</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
El modelo de memoria preferido para OPcache, a utilizar. Si se deja vacío,
|
|
OPcache elegirá el modelo más apropiado, que es la mejor
|
|
forma de hacerlo en la mayoría de los casos.
|
|
</simpara>
|
|
<simpara>
|
|
Los valores posibles son <literal>mmap</literal>, <literal>shm</literal>,
|
|
<literal>posix</literal> y <literal>win32</literal>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.protect-memory">
|
|
<term>
|
|
<parameter>opcache.protect_memory</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Protege la memoria compartida de escrituras no autorizadas durante la ejecución
|
|
de los scripts. Esto solo es útil para el depurado interno.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.mmap-base">
|
|
<term>
|
|
<parameter>opcache.mmap_base</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
La base utilizada para los segmentos de memoria compartida en Windows.
|
|
Todos los procesos PHP deben enlazar la memoria compartida en el mismo espacio
|
|
de direcciones. El uso de esta directiva permite corregir los errores
|
|
"Unable to reattach to base address".
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.restrict-api">
|
|
<term>
|
|
<parameter>opcache.restrict_api</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Permite la llamada a las funciones de la API de OPcache solo desde
|
|
scripts PHP cuyo camino comienza con una cadena específica.
|
|
El valor por omisión, "", significa "sin restricciones".
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.file_update_protection">
|
|
<term>
|
|
<parameter>opcache.file_update_protection</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Impide el almacenamiento en caché de archivos que datan menos que este número de segundos.
|
|
Esto protege del almacenamiento en caché de archivos actualizados incompletamente.
|
|
Si todas las actualizaciones de archivos son atómicas, el rendimiento
|
|
puede ser aumentado definiéndolo a <literal>0</literal>.
|
|
Esto permitirá almacenar en caché los archivos inmediatamente.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.huge_code_pages">
|
|
<term>
|
|
<parameter>opcache.huge_code_pages</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Activa o desactiva la copia de código PHP (segmento de texto) en HUGE PAGES.
|
|
Esto debería mejorar el rendimiento, pero requiere una configuración
|
|
adecuada del sistema operativo.
|
|
Disponible en Linux a partir de PHP 7.0.0,
|
|
y en FreeBSD a partir de PHP 7.4.0.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.lockfile_path">
|
|
<term>
|
|
<parameter>opcache.lockfile_path</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Ruta absoluta utilizada para guardar los archivos de bloqueo compartidos (solo para *nix)
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.opt_debug_level">
|
|
<term>
|
|
<parameter>opcache.opt_debug_level</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Produce un volcado de opcode para depurar los diferentes pasos de optimización.
|
|
0x10000 mostrará los opcodes tal como el compilador los produce antes de que se produzca
|
|
cualquier optimización, mientras que 0x20000 mostrará los códigos optimizados.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.file-cache">
|
|
<term>
|
|
<parameter>opcache.file_cache</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Activa y define el directorio de caché de segundo nivel. Esto debería
|
|
mejorar el rendimiento cuando la memoria SHM está llena, al reiniciar
|
|
el servidor o reinicializar SMH.
|
|
El valor por omisión "" desactiva el almacenamiento en caché basado en archivos.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.file-cache-only">
|
|
<term>
|
|
<parameter>opcache.file_cache_only</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Activa o desactiva el almacenamiento en caché del opcode en la memoria compartida.
|
|
</simpara>
|
|
<note>
|
|
<simpara>
|
|
Antes de PHP 8.1.0, desactivar esta directiva con un archivo de
|
|
caché ya lleno requiere el vaciado manual de la caché.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.file-cache-consistency-checks">
|
|
<term>
|
|
<parameter>opcache.file_cache_consistency_checks</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Activa o desactiva la validación de la suma de comprobación cuando el script
|
|
se carga desde el caché de archivos.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.file-cache-fallback">
|
|
<term>
|
|
<parameter>opcache.file_cache_fallback</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Sugiere opcache.file_cache_only=1 para un proceso determinado que ha fallado al
|
|
unirse a la memoria compartida (solo para Windows).
|
|
Se requiere el caché de archivos activado explícitamente.
|
|
</simpara>
|
|
<caution>
|
|
<simpara>
|
|
Desactivar esta opción de configuración puede impedir que los procesos
|
|
se inicien,
|
|
y por lo tanto se desaconseja.
|
|
</simpara>
|
|
</caution>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.validate-permission">
|
|
<term>
|
|
<parameter>opcache.validate_permission</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Valida los permisos de los archivos almacenados en caché con respecto al
|
|
usuario actual.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.validate-root">
|
|
<term>
|
|
<parameter>opcache.validate_root</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Impide las colisiones de nombres en entornos `chroot`. Esto debería
|
|
ser activado en todos los entornos `chroot` para impedir el acceso
|
|
a archivos fuera del chroot.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.preload">
|
|
<term>
|
|
<parameter>opcache.preload</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Especifica un script PHP que será compilado y ejecutado al iniciar el servidor,
|
|
y que puede precargar otros archivos, ya sea mediante <function>include</function>
|
|
o utilizando la función <function>opcache_compile_file</function>. Todas
|
|
las entidades (por ejemplo funciones y clases) definidas en estos archivos estarán
|
|
disponibles para las peticiones listas para usar, hasta que el servidor se apague.
|
|
</simpara>
|
|
<note>
|
|
<simpara>
|
|
El precargado no es soportado en Windows.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.preload-user">
|
|
<term>
|
|
<parameter>opcache.preload_user</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Permite que el precargado se ejecute como usuario del sistema
|
|
especificado. Esto es útil para servidores que se inician como root
|
|
antes de cambiar a un usuario del sistema no privilegiado. El precargado
|
|
como root no está permitido por omisión por razones de seguridad,
|
|
a menos que esta directiva esté explícitamente definida como <literal>root</literal>.
|
|
A partir de PHP 8.3.0, esta directiva ya no necesita ser definida para permitir el precargado
|
|
al ejecutarse como root con &cli.sapi; o <link linkend="book.phpdbg">phpdbg SAPI</link>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.cache-id">
|
|
<term>
|
|
<parameter>opcache.cache_id</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
En Windows, todos los procesos que ejecutan el mismo <acronym>PHP</acronym>
|
|
<acronym>SAPI</acronym> bajo el mismo usuario con el mismo ID
|
|
de caché comparten una instancia única de OPcache.
|
|
El valor del ID de caché puede ser elegido libremente.
|
|
</para>
|
|
<tip>
|
|
<simpara>
|
|
Para IIS, diferentes grupos de aplicaciones pueden tener su propia
|
|
instancia OPcache utilizando la variable de entorno
|
|
<envar>APP_POOL_ID</envar> como <parameter>opcache.cache_id</parameter>.
|
|
For IIS, different application pools can have their own OPcache instance
|
|
by using the environment variable <envar>APP_POOL_ID</envar> as
|
|
<parameter>opcache.cache_id</parameter>.
|
|
</simpara>
|
|
</tip>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit">
|
|
<term>
|
|
<parameter>opcache.jit</parameter>
|
|
<type class="union"><type>string</type><type>int</type></type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Para un uso típico, esta opción acepta una de las cuatro siguientes valores string:
|
|
</simpara>
|
|
<simplelist>
|
|
<member><literal>disable</literal>: Desactivado completamente, no puede ser activado durante el tiempo de ejecución.</member>
|
|
<member><literal>off</literal>: Desactivado, pero puede ser activado durante el tiempo de ejecución.</member>
|
|
<member>
|
|
<literal>tracing</literal>/<literal>on</literal>: Utiliza el tracing JIT.
|
|
Activado por omisión y recomendado para la mayoría de los usuarios.
|
|
</member>
|
|
<member><literal>function</literal>: Utiliza el function JIT.</member>
|
|
</simplelist>
|
|
<para>
|
|
Para un uso avanzado, esta opción acepta un entero de 4 dígitos
|
|
<literal>CRTO</literal>, donde los dígitos significan:
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><literal>C</literal> (Banderas de optimización específica del CPU)</term>
|
|
<listitem>
|
|
<simplelist>
|
|
<member><literal>0</literal>: Desactiva las optimizaciones específicas del CPU.</member>
|
|
<member><literal>1</literal>: Activa el uso de AVX, si el CPU lo soporta.</member>
|
|
</simplelist>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal>R</literal> (asignación de registros)</term>
|
|
<listitem>
|
|
<simplelist>
|
|
<member><literal>0</literal>: No realiza ninguna asignación de registros</member>
|
|
<member><literal>1</literal>: Realiza asignaciones de registros a nivel de bloque.</member>
|
|
<member><literal>2</literal>: Realiza asignaciones de registros globales.</member>
|
|
</simplelist>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal>T</literal> (disparador)</term>
|
|
<listitem>
|
|
<simplelist>
|
|
<member><literal>0</literal>: Compila todas las funciones al cargar el script.</member>
|
|
<member><literal>1</literal>: Compila las funciones en su primera ejecución.</member>
|
|
<member>
|
|
<literal>2</literal>: Perfila las funciones en la primera petición y compila las funciones
|
|
más calientes justo después.
|
|
</member>
|
|
<member><literal>3</literal>: Perfila a la volada y compila las funciones calientes.</member>
|
|
<member><literal>4</literal>: Actualmente no utilizado.</member>
|
|
<member>
|
|
<literal>5</literal>: Utiliza el tracing JIT. Perfila a la volada y
|
|
compila las trazas para los segmentos de código caliente.
|
|
</member>
|
|
</simplelist>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal>O</literal> (nivel de optimización)</term>
|
|
<listitem>
|
|
<simplelist>
|
|
<member><literal>0</literal>: Sin JIT.</member>
|
|
<member><literal>1</literal>: JIT mínimo (llama a los manejadores estándar de la VM).</member>
|
|
<member><literal>2</literal>: Inlinea los manejadores de la VM.</member>
|
|
<member><literal>3</literal>: Utiliza la inferencia de tipos.</member>
|
|
<member><literal>4</literal>: Utiliza un grafo de llamadas.</member>
|
|
<member><literal>5</literal>: Optimiza el script entero.</member>
|
|
</simplelist>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
El modo <literal>"tracing"</literal> corresponde a <code>CRTO = 1254</code>,
|
|
el modo <literal>"function"</literal> corresponde a <code>CRTO = 1205</code>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-buffer-size">
|
|
<term>
|
|
<parameter>opcache.jit_buffer_size</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
La cantidad de memoria compartida reservada para código compilado JIT. Un valor de cero desactiva el JIT.
|
|
</simpara>
|
|
&ini.shorthandbytes;
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-debug">
|
|
<term>
|
|
<parameter>opcache.jit_debug</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Una máscara de bits que especifica qué salida de depuración de JIT activar
|
|
Para los valores posibles, consulte <link xlink:href="&url.php.git.src.master.view;ext/opcache/jit/zend_jit.h">zend_jit.h</link>
|
|
(ver las definiciones de macro que comienzan con <code>ZEND_JIT_DEBUG</code>).
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-bisect-limit">
|
|
<term>
|
|
<parameter>opcache.jit_bisect_limit</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Opción de depuración que desactiva la compilación JIT después de la compilación de un cierto número
|
|
de funciones.
|
|
Esto puede ser útil para bisectar la fuente de una mala compilación JIT.
|
|
Nota: esta opción solo funciona cuando el disparador JIT está definido
|
|
a 0 (compilación al cargar el script) o 1 (compilación a la primera ejecución),
|
|
por ejemplo, <code>opcache.jit=1215</code>.
|
|
Ver más en la opción <link linkend="ini.opcache.jit">opcache.jit</link>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-prof-threshold">
|
|
<term>
|
|
<parameter>opcache.jit_prof_threshold</parameter>
|
|
<type>float</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Al utilizar el modo de disparador "perfilar las funciones en la primera petición",
|
|
este límite determina si una función es considerada caliente. El número de llamadas a la función
|
|
dividido por el número de llamadas a todas las funciones debe ser superior a este límite.
|
|
Por ejemplo, un límite de 0.005 significa que una función que corresponde a más de 0.5% de todas
|
|
las llamadas será compilada JIT.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-max-root-traces">
|
|
<term>
|
|
<parameter>opcache.jit_max_root_traces</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Número máximo de trazas raíz (root traces). La traza raíz es un flujo de ejecución que toma
|
|
primero un camino a través del código, que es una unidad de la compilación JIT. JIT no compilara
|
|
nuevo código si alcanza este límite.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-max-side-traces">
|
|
<term>
|
|
<parameter>opcache.jit_max_side_traces</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Número máximo de trazas laterales (side trace) que una traza raíz puede tener.
|
|
La traza lateral es otro flujo de ejecución que no sigue el camino de la traza
|
|
raíz compilada. Las trazas laterales pertenecientes a la misma traza raíz no serán compiladas
|
|
si se alcanza este límite.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-max-exit-counters">
|
|
<term>
|
|
<parameter>opcache.jit_max_exit_counters</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Número máximo de contadores de salida de traza lateral. Esto limita el número total de
|
|
trazas laterales que puede haber, a través de todas las trazas raíz.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-hot-loop">
|
|
<term>
|
|
<parameter>opcache.jit_hot_loop</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Después de cuántas iteraciones un bucle es considerado caliente.
|
|
El rango de valores válidos es <code>[0,255]</code> ;
|
|
para cualquier parámetro fuera de este rango, por ejemplo -1 o 256, se utilizará el valor por omisión en su lugar.
|
|
Especialmente, un valor nulo desactivará el JIT para trazar y compilar todos los bucles.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-hot-func">
|
|
<term>
|
|
<parameter>opcache.jit_hot_func</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Después de cuántas llamadas una función es considerada caliente.
|
|
El rango de valores válidos es <code>[0,255]</code> ;
|
|
para cualquier parámetro fuera de este rango, por ejemplo -1 o 256, se utilizará el valor por omisión en su lugar.
|
|
Especialmente, un valor nulo desactivará el JIT para trazar y compilar todas las funciones.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-hot-return">
|
|
<term>
|
|
<parameter>opcache.jit_hot_return</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Después de cuántos retornos un retorno es considerado caliente.
|
|
El rango de valores válidos es <code>[0,255]</code> ;
|
|
para cualquier parámetro fuera de este rango, por ejemplo -1 o 256, se utilizará el valor por omisión en su lugar.
|
|
Especialmente, un valor nulo desactivará el JIT para trazar y compilar todos los retornos.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-hot-side-exit">
|
|
<term>
|
|
<parameter>opcache.jit_hot_side_exit</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Después de cuántas salidas, una salida lateral es considerada caliente.
|
|
El rango de valores válidos es <code>[0,255]</code> ;
|
|
para cualquier parámetro fuera de este rango, por ejemplo -1 o 256, se utilizará el valor por omisión en su lugar.
|
|
Especialmente, un valor nulo desactivará el JIT para trazar y compilar todas las salidas laterales.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-blacklist-root-trace">
|
|
<term>
|
|
<parameter>opcache.jit_blacklist_root_trace</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Número máximo de intentos de compilación de una traza raíz antes de que esta sea excluida.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-blacklist-side-trace">
|
|
<term>
|
|
<parameter>opcache.jit_blacklist_side_trace</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Número máximo de intentos de compilación de una traza lateral antes de que esta sea excluida.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-max-loop-unrolls">
|
|
<term>
|
|
<parameter>opcache.jit_max_loop_unrolls</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Número máximo de intentos para desenrollar un bucle en una traza lateral,
|
|
intentando alcanzar la traza raíz y cerrar el bucle exterior.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-max-recursive-calls">
|
|
<term>
|
|
<parameter>opcache.jit_max_recursive_calls</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
<!-- TODO: No estoy totalmente seguro tbh -->
|
|
Número máximo de llamadas recursivas desenrolladas en un bucle.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-max-recursive-return">
|
|
<term>
|
|
<parameter>opcache.jit_max_recursive_returns</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
<!-- TODO: No estoy totalmente seguro tbh -->
|
|
Número máximo de retornos recursivos desenrollados en un bucle.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.opcache.jit-max-polymorphic-calls">
|
|
<term>
|
|
<parameter>opcache.jit_max_polymorphic_calls</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<simpara>
|
|
Número máximo de intentos para inlinear una llamada polimórfica (dinámica o método).
|
|
Llamadas por encima de este límite son tratadas como megamórficas y no son inlineadas.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</sect1>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|