From ff74ca205e235382ca7b8fdf2f84ed18a5bf9e8b Mon Sep 17 00:00:00 2001 From: strarsis Date: Thu, 16 Nov 2023 01:43:02 +0100 Subject: [PATCH 1/3] Add PHP JIT and enable it by default (#1505) --- roles/php/defaults/main.yml | 2 ++ roles/php/tasks/main.yml | 7 +++++++ roles/php/templates/10-opcache.ini.j2 | 6 ++++++ roles/php/templates/php-fpm.ini.j2 | 1 + 4 files changed, 16 insertions(+) create mode 100644 roles/php/templates/10-opcache.ini.j2 diff --git a/roles/php/defaults/main.yml b/roles/php/defaults/main.yml index bde3e6b71b..2b150021ed 100644 --- a/roles/php/defaults/main.yml +++ b/roles/php/defaults/main.yml @@ -33,6 +33,8 @@ php_opcache_revalidate_freq: 60 php_opcache_validate_timestamps: 1 php_opcache_max_wasted_percentage: 5 php_opcache_huge_code_pages: 0 +php_opcache_jit: 'tracing' +php_opcache_jit_buffer_size: 256M php_fpm_set_emergency_restart_threshold: false php_fpm_emergency_restart_threshold: 0 diff --git a/roles/php/tasks/main.yml b/roles/php/tasks/main.yml index 9606170c88..107a102047 100644 --- a/roles/php/tasks/main.yml +++ b/roles/php/tasks/main.yml @@ -61,6 +61,13 @@ dest: /etc/php/{{ php_version }}/cli/php.ini mode: '0644' +- name: Copy 10-opcache.ini configuration file + template: + src: 10-opcache.ini.j2 + dest: /etc/php/{{ php_version }}/fpm/conf.d/10-opcache.ini + mode: '0644' + notify: reload php-fpm + - name: Change ImageMagick policy.xml to allow for PDFs replace: path: /etc/ImageMagick-6/policy.xml diff --git a/roles/php/templates/10-opcache.ini.j2 b/roles/php/templates/10-opcache.ini.j2 new file mode 100644 index 0000000000..5f5f74edb7 --- /dev/null +++ b/roles/php/templates/10-opcache.ini.j2 @@ -0,0 +1,6 @@ +; {{ ansible_managed }} + +; configuration for php opcache module +; priority=10 +zend_extension=opcache.so +opcache.jit={{ php_opcache_jit }} diff --git a/roles/php/templates/php-fpm.ini.j2 b/roles/php/templates/php-fpm.ini.j2 index c3a6cc0dc6..d07cfc9b62 100644 --- a/roles/php/templates/php-fpm.ini.j2 +++ b/roles/php/templates/php-fpm.ini.j2 @@ -33,3 +33,4 @@ opcache.revalidate_freq = {{ php_opcache_revalidate_freq }} opcache.fast_shutdown = {{ php_opcache_fast_shutdown }} opcache.max_wasted_percentage = {{ php_opcache_max_wasted_percentage }} opcache.huge_code_pages = {{ php_opcache_huge_code_pages }} +opcache.jit_buffer_size = {{ php_opcache_jit_buffer_size }} From 1ef1c2f0d93ea4dec2d130ce4ad86ec068b57ea6 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Thu, 7 Dec 2023 10:54:01 -0600 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9D=20Update=20README=20[ci=20skip?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fe91d3852a..124917af5c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Trellis is an open source project and completely free to use. If you've benefited from our projects and would like to support our future endeavors, please consider [sponsoring Roots](https://github.com/sponsors/roots).
-KM Digital Carrot WordPress.com Worksite Safety Copia Digital Freave +KM Digital Carrot WordPress.com Worksite Safety Freave
## Overview From 36c8491cdd813bba19853e8d2976cb4690d2c116 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Mon, 11 Dec 2023 10:47:11 -0600 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=93=9D=20Update=20README=20[ci=20skip?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 124917af5c..fe91d3852a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Trellis is an open source project and completely free to use. If you've benefited from our projects and would like to support our future endeavors, please consider [sponsoring Roots](https://github.com/sponsors/roots).
-KM Digital Carrot WordPress.com Worksite Safety Freave +KM Digital Carrot WordPress.com Worksite Safety Copia Digital Freave
## Overview