1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

php.ini-production: disable opcache.huge_code_pages by default

There are only very narrow circumstances under which this option has
been reported to provide 1% performance gain due to reduction of TLB
misses.  In many setups, this option only increases memory usage, and
will actually decrease performance.  To avoid this, let's leave it
disabled by default, and let it be an explicit decision to enable it.

For a discussion, see https://github.com/php/php-src/pull/10301

Closes GH-10336
This commit is contained in:
Max Kellermann
2023-01-16 09:42:03 +01:00
committed by David Carlier
parent 0752baa583
commit e6281db857
2 changed files with 13 additions and 3 deletions

View File

@@ -1888,7 +1888,12 @@ ldap.max_links = -1
;opcache.file_cache_fallback=1
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
; This should improve performance, but requires appropriate OS configuration.
; Under certain circumstances (if only a single global PHP process is
; started from which all others fork), this can increase performance
; by a tiny amount because TLB misses are reduced. On the other hand, this
; delays PHP startup, increases memory usage and degrades performance
; under memory pressure - use with care.
; Requires appropriate OS configuration.
;opcache.huge_code_pages=0
; Validate cached file permissions.

View File

@@ -1890,8 +1890,13 @@ ldap.max_links = -1
;opcache.file_cache_fallback=1
; Enables or disables copying of PHP code (text segment) into HUGE PAGES.
; This should improve performance, but requires appropriate OS configuration.
;opcache.huge_code_pages=1
; Under certain circumstances (if only a single global PHP process is
; started from which all others fork), this can increase performance
; by a tiny amount because TLB misses are reduced. On the other hand, this
; delays PHP startup, increases memory usage and degrades performance
; under memory pressure - use with care.
; Requires appropriate OS configuration.
;opcache.huge_code_pages=0
; Validate cached file permissions.
;opcache.validate_permission=0