OPcache: Unterschied zwischen den Versionen
Erscheinungsbild
	
	
| K Textersetzung - „==== Links ====“ durch „=== Links ===“ | |||
| (5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| '''topic''' - Kurzbeschreibung | '''topic''' - Kurzbeschreibung | ||
| == Beschreibung == | == Beschreibung == | ||
| ; OPcache verbessert die Leistung von PHP-Anwendungen  | ; OPcache verbessert die Leistung von PHP-Anwendungen | ||
| * Zwischenspeichern von vorkompiliertem Bytecode | |||
| ; Nextcloud | |||
| Standard-OPcache-Einstellungen sind in der Regel ausreichend | |||
| Wenn die Cache-Größe um mehr als 90 % überschritten wird, zeigt das Admin-Panel eine entsprechende Warnung an | |||
| * Nextcloud verlangt grundsätzlich, dass Codekommentare im Opcode erhalten bleiben, was die Standardeinstellung ist.   | * Nextcloud verlangt grundsätzlich, dass Codekommentare im Opcode erhalten bleiben, was die Standardeinstellung ist.   | ||
| Zeile 28: | Zeile 31: | ||
| ; opcache-gui | ; opcache-gui | ||
| * OPcache-Nutzung überwachen | |||
| *  | * Cache-Einträge löschen | ||
| == Direktiven == | == Direktiven == | ||
| {| class="wikitable" | {| class="wikitable" | ||
| !Directive | !Directive | ||
| !Beschreibung | |||
| !Local Value | !Local Value | ||
| !Master Value | !Master Value | ||
| |- | |- | ||
| |opcache.blacklist_filename | |opcache.blacklist_filename | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.consistency_checks | |opcache.consistency_checks | ||
| | | |||
| |0 | |0 | ||
| |0 | |0 | ||
| |- | |- | ||
| |opcache.dups_fix | |opcache.dups_fix | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.enable | |opcache.enable | ||
| | | |||
| |On | |On | ||
| |On | |On | ||
| |- | |- | ||
| |opcache.enable_cli | |opcache.enable_cli | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.enable_file_override | |opcache.enable_file_override | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.error_log | |opcache.error_log | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.file_cache | |opcache.file_cache | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.file_cache_consistency_checks | |opcache.file_cache_consistency_checks | ||
| | | |||
| |On | |On | ||
| |On | |On | ||
| |- | |- | ||
| |opcache.file_cache_only | |opcache.file_cache_only | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.file_update_protection | |opcache.file_update_protection | ||
| | | |||
| |2 | |2 | ||
| |2 | |2 | ||
| |- | |- | ||
| |opcache.force_restart_timeout | |opcache.force_restart_timeout | ||
| | | |||
| |180 | |180 | ||
| |180 | |180 | ||
| |- | |- | ||
| |opcache.huge_code_pages | |opcache.huge_code_pages | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.interned_strings_buffer | |opcache.interned_strings_buffer | ||
| | | |||
| |128 | |128 | ||
| |128 | |128 | ||
| |- | |- | ||
| |opcache.jit | |opcache.jit | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.jit_bisect_limit | |opcache.jit_bisect_limit | ||
| | | |||
| |0 | |0 | ||
| |0 | |0 | ||
| |- | |- | ||
| |opcache.jit_blacklist_root_trace | |opcache.jit_blacklist_root_trace | ||
| | | |||
| |16 | |16 | ||
| |16 | |16 | ||
| |- | |- | ||
| |opcache.jit_blacklist_side_trace | |opcache.jit_blacklist_side_trace | ||
| | | |||
| |8 | |8 | ||
| |8 | |8 | ||
| |- | |- | ||
| |opcache.jit_buffer_size | |opcache.jit_buffer_size | ||
| | | |||
| |128M | |128M | ||
| |128M | |128M | ||
| |- | |- | ||
| |opcache.jit_debug | |opcache.jit_debug | ||
| | | |||
| |0 | |0 | ||
| |0 | |0 | ||
| |- | |- | ||
| |opcache.jit_hot_func | |opcache.jit_hot_func | ||
| | | |||
| |127 | |127 | ||
| |127 | |127 | ||
| |- | |- | ||
| |opcache.jit_hot_loop | |opcache.jit_hot_loop | ||
| | | |||
| |64 | |64 | ||
| |64 | |64 | ||
| |- | |- | ||
| |opcache.jit_hot_return | |opcache.jit_hot_return | ||
| | | |||
| |8 | |8 | ||
| |8 | |8 | ||
| |- | |- | ||
| |opcache.jit_hot_side_exit | |opcache.jit_hot_side_exit | ||
| | | |||
| |8 | |8 | ||
| |8 | |8 | ||
| |- | |- | ||
| |opcache.jit_max_exit_counters | |opcache.jit_max_exit_counters | ||
| | | |||
| |8192 | |8192 | ||
| |8192 | |8192 | ||
| |- | |- | ||
| |opcache.jit_max_loop_unrolls | |opcache.jit_max_loop_unrolls | ||
| | | |||
| |8 | |8 | ||
| |8 | |8 | ||
| |- | |- | ||
| |opcache.jit_max_polymorphic_calls | |opcache.jit_max_polymorphic_calls | ||
| | | |||
| |2 | |2 | ||
| |2 | |2 | ||
| |- | |- | ||
| |opcache.jit_max_recursive_calls | |opcache.jit_max_recursive_calls | ||
| | | |||
| |2 | |2 | ||
| |2 | |2 | ||
| |- | |- | ||
| |opcache.jit_max_recursive_returns | |opcache.jit_max_recursive_returns | ||
| | | |||
| |2 | |2 | ||
| |2 | |2 | ||
| |- | |- | ||
| |opcache.jit_max_root_traces | |opcache.jit_max_root_traces | ||
| | | |||
| |1024 | |1024 | ||
| |1024 | |1024 | ||
| |- | |- | ||
| |opcache.jit_max_side_traces | |opcache.jit_max_side_traces | ||
| | | |||
| |128 | |128 | ||
| |128 | |128 | ||
| |- | |- | ||
| |opcache.jit_prof_threshold | |opcache.jit_prof_threshold | ||
| | | |||
| |0.005 | |0.005 | ||
| |0.005 | |0.005 | ||
| |- | |- | ||
| |opcache.lockfile_path | |opcache.lockfile_path | ||
| | | |||
| |/tmp | |/tmp | ||
| |/tmp | |/tmp | ||
| |- | |- | ||
| |opcache.log_verbosity_level | |opcache.log_verbosity_level | ||
| | | |||
| |1 | |1 | ||
| |1 | |1 | ||
| |- | |- | ||
| |opcache.max_accelerated_files | |opcache.max_accelerated_files | ||
| | | |||
| |10000 | |10000 | ||
| |10000 | |10000 | ||
| |- | |- | ||
| |opcache.max_file_size | |opcache.max_file_size | ||
| | | |||
| |0 | |0 | ||
| |0 | |0 | ||
| |- | |- | ||
| |opcache.max_wasted_percentage | |opcache.max_wasted_percentage | ||
| | | |||
| |5 | |5 | ||
| |5 | |5 | ||
| |- | |- | ||
| |opcache.memory_consumption | |opcache.memory_consumption | ||
| | | |||
| |512 | |512 | ||
| |512 | |512 | ||
| |- | |- | ||
| |opcache.opt_debug_level | |opcache.opt_debug_level | ||
| | | |||
| |0 | |0 | ||
| |0 | |0 | ||
| |- | |- | ||
| |opcache.optimization_level | |opcache.optimization_level | ||
| | | |||
| |0x7FFEBFFF | |0x7FFEBFFF | ||
| |0x7FFEBFFF | |0x7FFEBFFF | ||
| |- | |- | ||
| |opcache.preferred_memory_model | |opcache.preferred_memory_model | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.preload | |opcache.preload | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.preload_user | |opcache.preload_user | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.protect_memory | |opcache.protect_memory | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.record_warnings | |opcache.record_warnings | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.restrict_api | |opcache.restrict_api | ||
| | | |||
| |''no value'' | |''no value'' | ||
| |''no value'' | |''no value'' | ||
| |- | |- | ||
| |opcache.revalidate_freq | |opcache.revalidate_freq | ||
| | | |||
| |1 | |1 | ||
| |1 | |1 | ||
| |- | |- | ||
| |opcache.revalidate_path | |opcache.revalidate_path | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.save_comments | |opcache.save_comments | ||
| | | |||
| |On | |On | ||
| |On | |On | ||
| |- | |- | ||
| |opcache.use_cwd | |opcache.use_cwd | ||
| | | |||
| |On | |On | ||
| |On | |On | ||
| |- | |- | ||
| |opcache.validate_permission | |opcache.validate_permission | ||
| | | |||
| |Off | |Off | ||
| |Off | |Off | ||
| |- | |- | ||
| |opcache.validate_root | |opcache.validate_root | ||
| | | |||
| |On | |On | ||
| |On | |On | ||
| |- | |- | ||
| |opcache.validate_timestamps | |opcache.validate_timestamps | ||
| | | |||
| |On | |On | ||
| |On | |On | ||
| Zeile 253: | Zeile 310: | ||
| == Anhang == | == Anhang == | ||
| === Siehe auch === | === Siehe auch === | ||
| {{Special:PrefixIndex/{{BASEPAGENAME}}}} | {{Special:PrefixIndex/{{BASEPAGENAME}}/}} | ||
| === Links === | |||
| ==== Weblinks ==== | |||
| [[Kategorie:Nextcloud/ | [[Kategorie:Nextcloud/Konfiguration]] | ||
| [[Kategorie:PHP]] | [[Kategorie:PHP]] | ||
| </noinclude> | </noinclude> | ||
Aktuelle Version vom 22. März 2025, 01:14 Uhr
topic - Kurzbeschreibung
Beschreibung
- OPcache verbessert die Leistung von PHP-Anwendungen
- Zwischenspeichern von vorkompiliertem Bytecode
- Nextcloud
Standard-OPcache-Einstellungen sind in der Regel ausreichend
Wenn die Cache-Größe um mehr als 90 % überschritten wird, zeigt das Admin-Panel eine entsprechende Warnung an
- Nextcloud verlangt grundsätzlich, dass Codekommentare im Opcode erhalten bleiben, was die Standardeinstellung ist.
- opcache.save_comments
Wenn die PHP-Einstellungen auf Ihrem System geändert werden, müssen Sie möglicherweise die folgenden Einstellungen vornehmen:
opcache.save_comments = 1
- opcache.validate_timestamps
Standardmäßig werden zwischengespeicherte Skripte beim Zugriff neu validiert, um sicherzustellen, dass Änderungen auf der Festplatte nach höchstens 2 Sekunden wirksam werden.
- Da Nextcloud die Cache-Revalidierung bei Bedarf intern durchführt, kann die Häufigkeit der Revalidierung reduziert oder ganz deaktiviert werden, um die Leistung zu verbessern.
- Beachten Sie jedoch, dass sich dies auf manuelle Änderungen an Skripten, einschließlich config.php, auswirkt.
Um höchstens alle 60 Sekunden auf Änderungen zu prüfen, verwenden Sie die folgende Einstellung:
opcache.revalidate_freq = 60
Um die Überprüfung vollständig zu deaktivieren:
opcache.validate_timestamps = 0
- Änderungen an der config.php erfordert
- Neustart von PHP oder
- Manuelles Löschen des Caches oder
- Ungültigkeitserklärung dieses speziellen Skripts
- opcache-gui
- OPcache-Nutzung überwachen
- Cache-Einträge löschen
Direktiven
| Directive | Beschreibung | Local Value | Master Value | 
|---|---|---|---|
| opcache.blacklist_filename | no value | no value | |
| opcache.consistency_checks | 0 | 0 | |
| opcache.dups_fix | Off | Off | |
| opcache.enable | On | On | |
| opcache.enable_cli | Off | Off | |
| opcache.enable_file_override | Off | Off | |
| opcache.error_log | no value | no value | |
| opcache.file_cache | no value | no value | |
| opcache.file_cache_consistency_checks | On | On | |
| opcache.file_cache_only | Off | Off | |
| opcache.file_update_protection | 2 | 2 | |
| opcache.force_restart_timeout | 180 | 180 | |
| opcache.huge_code_pages | Off | Off | |
| opcache.interned_strings_buffer | 128 | 128 | |
| opcache.jit | no value | no value | |
| opcache.jit_bisect_limit | 0 | 0 | |
| opcache.jit_blacklist_root_trace | 16 | 16 | |
| opcache.jit_blacklist_side_trace | 8 | 8 | |
| opcache.jit_buffer_size | 128M | 128M | |
| opcache.jit_debug | 0 | 0 | |
| opcache.jit_hot_func | 127 | 127 | |
| opcache.jit_hot_loop | 64 | 64 | |
| opcache.jit_hot_return | 8 | 8 | |
| opcache.jit_hot_side_exit | 8 | 8 | |
| opcache.jit_max_exit_counters | 8192 | 8192 | |
| opcache.jit_max_loop_unrolls | 8 | 8 | |
| opcache.jit_max_polymorphic_calls | 2 | 2 | |
| opcache.jit_max_recursive_calls | 2 | 2 | |
| opcache.jit_max_recursive_returns | 2 | 2 | |
| opcache.jit_max_root_traces | 1024 | 1024 | |
| opcache.jit_max_side_traces | 128 | 128 | |
| opcache.jit_prof_threshold | 0.005 | 0.005 | |
| opcache.lockfile_path | /tmp | /tmp | |
| opcache.log_verbosity_level | 1 | 1 | |
| opcache.max_accelerated_files | 10000 | 10000 | |
| opcache.max_file_size | 0 | 0 | |
| opcache.max_wasted_percentage | 5 | 5 | |
| opcache.memory_consumption | 512 | 512 | |
| opcache.opt_debug_level | 0 | 0 | |
| opcache.optimization_level | 0x7FFEBFFF | 0x7FFEBFFF | |
| opcache.preferred_memory_model | no value | no value | |
| opcache.preload | no value | no value | |
| opcache.preload_user | no value | no value | |
| opcache.protect_memory | Off | Off | |
| opcache.record_warnings | Off | Off | |
| opcache.restrict_api | no value | no value | |
| opcache.revalidate_freq | 1 | 1 | |
| opcache.revalidate_path | Off | Off | |
| opcache.save_comments | On | On | |
| opcache.use_cwd | On | On | |
| opcache.validate_permission | Off | Off | |
| opcache.validate_root | On | On | |
| opcache.validate_timestamps | On | On |