APC/APCu better management
parent
7b7e3bb4f4
commit
19a1a84c8f
|
@ -12,7 +12,7 @@ php_ini:
|
|||
- key: 'memory_limit'
|
||||
value: '256M'
|
||||
|
||||
# OpCache settings (useful for PHP >=5.5).
|
||||
# OpCache settings (PHP >= 5.5)
|
||||
php_opcache_enable: "1"
|
||||
php_opcache_enable_cli: "0"
|
||||
php_opcache_memory_consumption: "96"
|
||||
|
@ -23,7 +23,7 @@ php_opcache_validate_timestamps: "1"
|
|||
php_opcache_revalidate_freq: "2"
|
||||
php_opcache_max_file_size: "0"
|
||||
|
||||
# APC settings (useful for PHP <5.5).
|
||||
# APC/APCu settings
|
||||
php_apc_enable: "1"
|
||||
php_apc_enable_cli: "0"
|
||||
php_apc_shm_size: "32M"
|
||||
|
@ -36,7 +36,6 @@ php_apc_slam_defense: "0"
|
|||
php_apc_stat_ctime: "1"
|
||||
|
||||
|
||||
|
||||
# PHP-FPM
|
||||
php_fpm_poold:
|
||||
- pool_name: 'www'
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
apt: pkg=php-apc state=latest
|
||||
|
||||
- name: TEMPLATE | Configure APC
|
||||
template: src=etc/php5/mods-available/apc.j2 dest=/etc/php5/mods-available/apc.ini
|
||||
template: src=etc/php5/mods-available/apcu.ini.j2 dest=/etc/php5/mods-available/apc.ini
|
||||
notify: restart php-fpm
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
apt: pkg=php5-apcu state=latest
|
||||
|
||||
- name: TEMPLATE | Configure Opcache / APCu
|
||||
template: src=etc/php5/mods-available/{{ item }}.j2 dest=/etc/php5/mods-available/{{ item }}
|
||||
template: src=etc/php5/mods-available/{{ item }}.ini.j2 dest=/etc/php5/mods-available/{{ item }}.ini
|
||||
with_items:
|
||||
- apcu
|
||||
- opcache
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
;
|
||||
; {{ ansible_managed }}
|
||||
;
|
||||
|
||||
extension=apc.so
|
||||
|
||||
apc.enable_cli={{ php_apc_enable_cli }}
|
||||
apc.shm_size={{ php_apc_shm_size }}
|
||||
apc.enable={{ php_apc_enable }}
|
||||
apc.num_files_hint={{ php_apc_num_files_hint }}
|
||||
apc.user_entries_hint={{ php_apc_user_entries_hint }}
|
||||
apc.user_ttl={{ php_apc_user_ttl }}
|
||||
apc.ttl={{ php_apc_ttl }}
|
||||
apc.file_update_protection={{ php_apc_file_update_protection }}
|
||||
apc.slam_defense={{ php_apc_slam_defense }}
|
||||
apc.stat_ctime={{ php_apc_stat_ctime }}
|
|
@ -0,0 +1,25 @@
|
|||
;
|
||||
; {{ ansible_managed }}
|
||||
;
|
||||
|
||||
extension=apc.so
|
||||
|
||||
; apc.enabled can be set to 0 to disable APC
|
||||
apc.enable={{ php_apc_enable }}
|
||||
; Mostly for testing and debugging.
|
||||
apc.enable_cli={{ php_apc_enable_cli }}
|
||||
; The size of each shared memory segment in MB
|
||||
apc.shm_size={{ php_apc_shm_size }}
|
||||
; A "hint" about the number of distinct source files that will be included or requested on your web server. Set to zero or omit if unsure; this setting is mainly useful for sites that have many thousands of source files.
|
||||
apc.num_files_hint={{ php_apc_num_files_hint }}
|
||||
; Just like apc.num_files_hint, a "hint" about the number of distinct user cache variables to store. Set to zero or omit if not sure.
|
||||
apc.user_entries_hint={{ php_apc_user_entries_hint }}
|
||||
; The number of seconds a cache entry is allowed to idle in a slot in case this cache entry slot is needed by another entry
|
||||
apc.user_ttl={{ php_apc_user_ttl }}
|
||||
apc.ttl={{ php_apc_ttl }}
|
||||
; rsync = 0 | tar/cp = 2
|
||||
apc.file_update_protection={{ php_apc_file_update_protection }}
|
||||
; This option sets the percentage of processes that will skip trying to cache an uncached file
|
||||
apc.slam_defense={{ php_apc_slam_defense }}
|
||||
; Verification with ctime will avoid problems caused by programs such as svn or rsync by making sure inodes haven't changed since the last stat
|
||||
apc.stat_ctime={{ php_apc_stat_ctime }}
|
|
@ -1,5 +0,0 @@
|
|||
;
|
||||
; {{ ansible_managed }}
|
||||
;
|
||||
|
||||
extension=apcu.so
|
Loading…
Reference in New Issue