Skip to content

Commit ecb07d8

Browse files
committed
Some opcache and composer optimizations
- add opcache preload to docs and docker config - add disable opcache timestamp validation in docs and docker config - enable composers authoritative classmap
1 parent 5a18b74 commit ecb07d8

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
"ergebnis/composer-normalize": true
157157
},
158158
"optimize-autoloader": true,
159+
"classmap-authoritative": true,
159160
"preferred-install": {
160161
"*": "dist"
161162
},

docker/php/conf.d/app.prod.ini

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ opcache.enable_cli=1
88
opcache.memory_consumption=512
99
opcache.interned_strings_buffer=128
1010
opcache.max_accelerated_files=100000
11-
opcache.jit_buffer_size=500M
11+
opcache.validate_timestamps=0
12+
opcache.preload=/var/www/mbin/config/preload.php
13+
opcache.preload_user=www-data
14+
; Enable PHP JIT with all optimizations
15+
opcache.jit = 1255
16+
opcache.jit_buffer_size=500M

docs/02-admin/01-installation/01-bare_metal.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,19 @@ realpath_cache_size = 4096K
265265
realpath_cache_ttl = 600
266266
```
267267

268-
Optionally also enable OPCache for improved performances with PHP (recommended for both fpm and cli ini files):
268+
Optionally also enable OPCache for improved performances with PHP (recommended for both fpm and cli ini files) (replace `/var/www/mbin` with `/var/www/kbin` if needed):
269269

270270
```ini
271271
opcache.enable = 1
272272
opcache.enable_cli = 1
273+
opcache.preload = /var/www/mbin/config/preload.php
274+
opcache.preload_user = www-data
273275
; Memory consumption (in MBs), personal preference
274276
opcache.memory_consumption = 512
275277
; Internal string buffer (in MBs), personal preference
276278
opcache.interned_strings_buffer = 128
277279
opcache.max_accelerated_files = 100000
280+
opcache.validate_timestamps = 0
278281
; Enable PHP JIT with all optimizations
279282
opcache.jit = 1255
280283
opcache.jit_buffer_size = 500M

0 commit comments

Comments
 (0)