Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JIT options #1505

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions roles/php/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions roles/php/templates/10-opcache.ini.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; {{ ansible_managed }}

; configuration for php opcache module
; priority=10
zend_extension=opcache.so
opcache.jit={{ php_opcache_jit }}
1 change: 1 addition & 0 deletions roles/php/templates/php-fpm.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Loading