Skip to content

Commit 9727e37

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: set more suitable defaults for opcache in ini and code
2 parents 697809d + 63e08cb commit 9727e37

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

ext/opcache/zend_accelerator_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ ZEND_INI_BEGIN()
285285
STD_PHP_INI_BOOLEAN("opcache.revalidate_path" , "0", PHP_INI_ALL , OnUpdateBool, accel_directives.revalidate_path , zend_accel_globals, accel_globals)
286286

287287
STD_PHP_INI_ENTRY("opcache.log_verbosity_level" , "1" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.log_verbosity_level, zend_accel_globals, accel_globals)
288-
STD_PHP_INI_ENTRY("opcache.memory_consumption" , "64" , PHP_INI_SYSTEM, OnUpdateMemoryConsumption, accel_directives.memory_consumption, zend_accel_globals, accel_globals)
289-
STD_PHP_INI_ENTRY("opcache.interned_strings_buffer", "4" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.interned_strings_buffer, zend_accel_globals, accel_globals)
290-
STD_PHP_INI_ENTRY("opcache.max_accelerated_files" , "2000", PHP_INI_SYSTEM, OnUpdateMaxAcceleratedFiles, accel_directives.max_accelerated_files, zend_accel_globals, accel_globals)
288+
STD_PHP_INI_ENTRY("opcache.memory_consumption" , "128" , PHP_INI_SYSTEM, OnUpdateMemoryConsumption, accel_directives.memory_consumption, zend_accel_globals, accel_globals)
289+
STD_PHP_INI_ENTRY("opcache.interned_strings_buffer", "8" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.interned_strings_buffer, zend_accel_globals, accel_globals)
290+
STD_PHP_INI_ENTRY("opcache.max_accelerated_files" , "10000", PHP_INI_SYSTEM, OnUpdateMaxAcceleratedFiles, accel_directives.max_accelerated_files, zend_accel_globals, accel_globals)
291291
STD_PHP_INI_ENTRY("opcache.max_wasted_percentage" , "5" , PHP_INI_SYSTEM, OnUpdateMaxWastedPercentage, accel_directives.max_wasted_percentage, zend_accel_globals, accel_globals)
292292
STD_PHP_INI_ENTRY("opcache.consistency_checks" , "0" , PHP_INI_ALL , OnUpdateLong, accel_directives.consistency_checks, zend_accel_globals, accel_globals)
293293
STD_PHP_INI_ENTRY("opcache.force_restart_timeout" , "180" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.force_restart_timeout, zend_accel_globals, accel_globals)

php.ini-development

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,20 +1779,20 @@ ldap.max_links = -1
17791779

17801780
[opcache]
17811781
; Determines if Zend OPCache is enabled
1782-
;opcache.enable=0
1782+
;opcache.enable=1
17831783

17841784
; Determines if Zend OPCache is enabled for the CLI version of PHP
17851785
;opcache.enable_cli=0
17861786

17871787
; The OPcache shared memory storage size.
1788-
;opcache.memory_consumption=64
1788+
;opcache.memory_consumption=128
17891789

17901790
; The amount of memory for interned strings in Mbytes.
1791-
;opcache.interned_strings_buffer=4
1791+
;opcache.interned_strings_buffer=8
17921792

17931793
; The maximum number of keys (scripts) in the OPcache hash table.
17941794
; Only numbers between 200 and 100000 are allowed.
1795-
;opcache.max_accelerated_files=2000
1795+
;opcache.max_accelerated_files=10000
17961796

17971797
; The maximum percentage of "wasted" memory until a restart is scheduled.
17981798
;opcache.max_wasted_percentage=5

php.ini-production

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,20 +1779,20 @@ ldap.max_links = -1
17791779

17801780
[opcache]
17811781
; Determines if Zend OPCache is enabled
1782-
;opcache.enable=0
1782+
;opcache.enable=1
17831783

17841784
; Determines if Zend OPCache is enabled for the CLI version of PHP
17851785
;opcache.enable_cli=0
17861786

17871787
; The OPcache shared memory storage size.
1788-
;opcache.memory_consumption=64
1788+
;opcache.memory_consumption=128
17891789

17901790
; The amount of memory for interned strings in Mbytes.
1791-
;opcache.interned_strings_buffer=4
1791+
;opcache.interned_strings_buffer=8
17921792

17931793
; The maximum number of keys (scripts) in the OPcache hash table.
17941794
; Only numbers between 200 and 100000 are allowed.
1795-
;opcache.max_accelerated_files=2000
1795+
;opcache.max_accelerated_files=10000
17961796

17971797
; The maximum percentage of "wasted" memory until a restart is scheduled.
17981798
;opcache.max_wasted_percentage=5

0 commit comments

Comments
 (0)