@@ -42,64 +42,64 @@ Speed Tuning
42
42
43
43
We recommend the following configuration options for best performance.
44
44
45
- zend_optimizerplus .memory_consumption=128
46
- zend_optimizerplus .interned_strings_buffer=8
47
- zend_optimizerplus .max_accelerated_files=4000
48
- zend_optimizerplus .revalidate_freq=60
49
- zend_optimizerplus .fast_shutdown=1
50
- zend_optimizerplus .enable_cli=1
45
+ opcache .memory_consumption=128
46
+ opcache .interned_strings_buffer=8
47
+ opcache .max_accelerated_files=4000
48
+ opcache .revalidate_freq=60
49
+ opcache .fast_shutdown=1
50
+ opcache .enable_cli=1
51
51
52
52
You also may add the following, but it may break some applications and
53
53
frameworks. Please, read description of these directives and add them on your
54
54
own risk.
55
55
56
- zend_optimizerplus .save_comments=0
57
- zend_optimizerplus .enable_file_override=1
56
+ opcache .save_comments=0
57
+ opcache .enable_file_override=1
58
58
59
59
In some cases you may like to prefer enabling/disabling some features
60
60
to avoid incompatibilities at the cost of some performance degradation.
61
61
62
62
Configuration Directives
63
63
------------------------
64
64
65
- zend_optimizerplus .enable (default "1")
65
+ opcache .enable (default "1")
66
66
Optimizer+ On/Off switch. When set to Off, code is not optimized.
67
67
68
- zend_optimizerplus .memory_consumption (default "64")
68
+ opcache .memory_consumption (default "64")
69
69
The Optimizer+ shared memory storage size. The amount of memory for storing
70
70
precompiled PHP code in Mbytes.
71
71
72
- zend_optimizerplus .interned_strings_buffer (default "4")
72
+ opcache .interned_strings_buffer (default "4")
73
73
The amount of memory for interned strings in Mbytes.
74
74
75
- zend_optimizerplus .max_accelerated_files (default "2000")
75
+ opcache .max_accelerated_files (default "2000")
76
76
The maximum number of keys (scripts) in the Optimizer+ hash table.
77
77
The number is actually the first one in the following set of prime
78
78
numbers that is bigger than the one supplied: { 223, 463, 983, 1979, 3907,
79
79
7963, 16229, 32531, 65407, 130987 }. Only numbers between 200 and 100000
80
80
are allowed.
81
81
82
- zend_optimizerplus .max_wasted_percentage (default "5")
82
+ opcache .max_wasted_percentage (default "5")
83
83
The maximum percentage of "wasted" memory until a restart is scheduled.
84
84
85
- zend_optimizerplus .use_cwd (default "1")
85
+ opcache .use_cwd (default "1")
86
86
When this directive is enabled, the Optimizer+ appends the current working
87
87
directory to the script key, thus eliminating possible collisions between
88
88
files with the same name (basename). Disabling the directive improves
89
89
performance, but may break existing applications.
90
90
91
- zend_optimizerplus .validate_timestamps (default "1")
91
+ opcache .validate_timestamps (default "1")
92
92
When disabled, you must reset the Optimizer+ manually or restart the
93
93
webserver for changes to the filesystem to take effect.
94
94
The frequency of the check is controlled by the directive
95
- "zend_optimizerplus .revalidate_freq".
95
+ "opcache .revalidate_freq".
96
96
97
- zend_optimizerplus .revalidate_freq (default "2")
97
+ opcache .revalidate_freq (default "2")
98
98
How often (in seconds) to check file timestamps for changes to the shared
99
99
memory storage allocation. ("1" means validate once per second, but only
100
100
once per request. "0" means always validate)
101
101
102
- zend_optimizerplus .revalidate_path (default "0")
102
+ opcache .revalidate_path (default "0")
103
103
Enables or disables file search in include_path optimization
104
104
If the file search is disabled and a cached file is found that uses
105
105
the same include_path, the file is not searched again. Thus, if a file
@@ -108,29 +108,29 @@ zend_optimizerplus.revalidate_path (default "0")
108
108
your applications. The default for this directive is disabled, which means
109
109
that optimization is active.
110
110
111
- zend_optimizerplus .save_comments (default "1")
111
+ opcache .save_comments (default "1")
112
112
If disabled, all PHPDoc comments are dropped from the code to reduce the
113
113
size of the optimized code. Disabling "Doc Comments" may break some
114
114
existing applications and frameworks (e.g. Doctrine, ZF2, PHPUnit)
115
115
116
- zend_optimizerplus .load_comments (default "1")
116
+ opcache .load_comments (default "1")
117
117
If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
118
118
may be always stored (save_comments=1), but not loaded by applications
119
119
that don't need them anyway.
120
120
121
- zend_optimizerplus .fast_shutdown (default "0")
121
+ opcache .fast_shutdown (default "0")
122
122
If enabled, a fast shutdown sequence is used for the accelerated code
123
123
The fast shutdown sequence doesn't free each allocated block, but lets
124
124
the Zend Engine Memory Manager do the work.
125
125
126
- zend_optimizerplus .enable_file_override (default "0")
126
+ opcache .enable_file_override (default "0")
127
127
Allow file existence override (file_exists, etc.) performance feature.
128
128
129
- zend_optimizerplus .optimization_level (default "0xffffffff")
129
+ opcache .optimization_level (default "0xffffffff")
130
130
A bitmask, where each bit enables or disables the appropriate Optimizer+
131
131
passes
132
132
133
- zend_optimizerplus .inherited_hack (default "1")
133
+ opcache .inherited_hack (default "1")
134
134
Enable this hack as a workaround for "can't redeclare class" errors.
135
135
The Optimizer+ stores the places where DECLARE_CLASS opcodes use
136
136
inheritance (These are the only opcodes that can be executed by PHP,
@@ -143,10 +143,10 @@ zend_optimizerplus.inherited_hack (default "1")
143
143
that optimization is active. In php-5.3 and above this hack is not needed
144
144
anymore and this setting has no effect.
145
145
146
- zend_optimizerplus .dups_fix (default "0")
146
+ opcache .dups_fix (default "0")
147
147
Enable this hack as a workaround for "Cannot redeclare class" errors.
148
148
149
- zend_optimizerplus .blacklist_filename
149
+ opcache .blacklist_filename
150
150
The location of the Optimizer+ blacklist file.
151
151
The Optimizer+ blacklist file is a text file that holds the names of files
152
152
that should not be accelerated. The file format is to add each filename
@@ -159,17 +159,17 @@ zend_optimizerplus.blacklist_filename
159
159
compile time evaluation.
160
160
3) Code that triggers an Optimizer+ bug.
161
161
162
- zend_optimizerplus .max_file_size (default "0")
162
+ opcache .max_file_size (default "0")
163
163
Allows exclusion of large files from being cached. By default all files
164
164
are cached.
165
165
166
- zend_optimizerplus .consistency_checks (default "0")
166
+ opcache .consistency_checks (default "0")
167
167
Check the cache checksum each N requests.
168
168
The default value of "0" means that the checks are disabled.
169
169
Because calculating the checksum impairs performance, this directive should
170
170
be enabled only as part of a debugging process.
171
171
172
- zend_optimizerplus .force_restart_timeout (default "180")
172
+ opcache .force_restart_timeout (default "180")
173
173
How long to wait (in seconds) for a scheduled restart to begin if the cache
174
174
is not being accessed.
175
175
The Optimizer+ uses this directive to identify a situation where there may
@@ -179,23 +179,23 @@ zend_optimizerplus.force_restart_timeout (default "180")
179
179
If the log level is 3 or above, a "killed locker" error is recorded
180
180
in the Apache logs when this happens.
181
181
182
- zend_optimizerplus .error_log
182
+ opcache .error_log
183
183
Optimizer+ error_log file name. Empty string assumes "stderr".
184
184
185
- zend_optimizerplus .log_verbosity_level (default "1")
185
+ opcache .log_verbosity_level (default "1")
186
186
All Optimizer+ errors go to the Web server log.
187
187
By default, only fatal errors (level 0) or errors (level 1) are logged.
188
188
You can also enable warnings (level 2), info messages (level 3) or
189
189
debug messages (level 4).
190
190
191
- zend_optimizerplus .preferred_memory_model
191
+ opcache .preferred_memory_model
192
192
Preferred Shared Memory back-end. Leave empty and let the system decide.
193
193
194
- zend_optimizerplus .protect_memory (default "0")
194
+ opcache .protect_memory (default "0")
195
195
Protect the shared memory from unexpected writing during script execution.
196
196
Useful for internal debugging only.
197
197
198
- zend_optimizerplus .mmap_base
198
+ opcache .mmap_base
199
199
Mapping base of shared memory segments (for Windows only). All the PHP
200
200
processes have to map shared memory into the same address space. This
201
201
directive allows to manually fix the "Unable to reattach to base address"
0 commit comments