php optimization

This commit is contained in:
Benjamin Brummer
2025-01-15 09:49:58 +00:00
parent 7a72c2ef16
commit 42c62adf1a
4 changed files with 25 additions and 19 deletions

View File

@@ -0,0 +1 @@
pm.max_children = 10

View File

@@ -1,17 +0,0 @@
; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
;opcache.revalidate_freq=2
opcache.revalidate_freq=60
# http://symfony.com/doc/current/performance.html
; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; http://php.net/realpath-cache-ttl
;realpath_cache_ttl = 120
realpath_cache_ttl = 600
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 8M

View File

@@ -0,0 +1,22 @@
[core]
; https://www.php.net/manual/en/ini.core.php
post_max_size=10M
upload_max_filesize=10M
[opcache]
; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended
opcache.enable_cli=1
[jit]
; https://wiki.php.net/rfc/jit_config_defaults
opcache.jit=tracing
opcache.jit_buffer_size=64M
[extra]
; http://symfony.com/doc/current/performance.html
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.preload=/var/www/app/preload.php
opcache.validate_timestamps=0
realpath_cache_size=4096K
realpath_cache_ttl=600

View File

@@ -30,8 +30,8 @@ services:
- ./config/hosts:/etc/hosts:ro
- ./docker/app/public:/var/www/app/public:rw,delegated
- ./docker/app/storage:/var/www/app/storage:rw,delegated
- ./config/php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini
- ./config/php/php-fpm.conf:/usr/local/etc/php-fpm.d/invoiceninja.conf
# - ./config/php/php.ini:/usr/local/etc/php/conf.d/invoiceninja.ini
# - ./config/php/php-fpm.conf:/usr/local/etc/php-fpm.d/invoiceninja.conf
depends_on:
- db