Bug 1170136 - [RFE] Enable Zend Opcache on Openshift PHP 5.4 cartridge by default
Summary: [RFE] Enable Zend Opcache on Openshift PHP 5.4 cartridge by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.2.0
Hardware: x86_64
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-03 11:19 UTC by Kenjiro Nakayama
Modified: 2019-03-22 07:26 UTC (History)
10 users (show)

Fixed In Version: openshift-origin-cartridge-dependencies-1.28.1.1-1, openshift-origin-cartridge-php-1.31.0.1-1
Doc Type: Enhancement
Doc Text:
Feature: Zend Opcache is now enabled by the PHP 5.4 cartridge by default. Reason: Zend Opcache significantly improves PHP execution time by storing compiled PHP bytecode in memory. Result: PHP applications now execute more quickly and the PHP Opcache may consume up to 1/8th of the gear memory. This may be adjusted by setting OPENSHIFT_PHP_OPCACHE_MEMORY_CONSUMPTION
Clone Of:
Environment:
Last Closed: 2015-02-12 13:09:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1173796 0 unspecified CLOSED php 5.4 segfaults on incoming HUP signal when Zend OPCache is enabled 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2015:0220 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.4 bug fix and enhancement update 2015-02-12 18:08:20 UTC

Internal Links: 1173796

Description Kenjiro Nakayama 2014-12-03 11:19:41 UTC
From the RFE template

1. Proposed title of this feature request  
===
Enable Zend Opcache on Openshift PHP 5.4 cartridge
  
3. What is the nature and description of the request?  
===
PHP 5.4 doesn't use OPcache, it should use Zend OPcache by default.

4. Why does the customer need this? 
===
PHP 5.3 cartridge is enabled APC opcache by default, but PHP 5.4 isn't. So the upgrade 5.3 to 5.4 means it will make a decrease of performance of PHP aplication.

Comment 20 Vojtech Vitek 2014-12-14 21:23:47 UTC
https://github.com/openshift/origin-server/pull/6015 merged

Comment 22 Kenjiro Nakayama 2015-01-14 10:10:32 UTC
Hi, engineering team

Sorry again. 
Please let us know the progress of this RFE.

Comment 28 Gaoyun Pei 2015-01-26 09:10:39 UTC
Verify this bug on puddle 2.2/2015-01-23.2

Setting up an ose-2.2 env with php54-php-pecl-zendopcache-7.0.2-4.el6.x86_64 installed on the node.

On the node, check opcache is enabled:
[root@node1 ~]# /opt/rh/php54/root/usr/bin/php -i  |grep "opcache.enable "
opcache.enable => On => On

Create a php app, and check the zend opcache.
[test2-123.ose22-manual.com.cn 123-test2-1]\> php -i |grep opcache
opcache.blacklist_filename => /opt/rh/php54/root/etc/php.d/opcache*.blacklist => /opt/rh/php54/root/etc/php.d/opcache*.blacklist
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 1 => 1
opcache.force_restart_timeout => 180 => 180
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 8 => 8
opcache.load_comments => 1 => 1
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 4000 => 4000
opcache.max_file_size => 1M => 1M
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 64M => 64M
opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.revalidate_freq => 2 => 2
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_timestamps => On => On

Comment 29 Gaoyun Pei 2015-01-26 09:21:11 UTC
And the problem mentioned in Bug #1173796 is not reproducible.

Opcache and apc user cache for php-5.4 application are both enabled, and apc.shm_strings_buffer is setting as 0, no segfaults error during apache reload.

[test2-123.ose22-manual.com.cn 123-test2-1]\> cat php/configuration/etc/php.d/openshift.ini | grep -e apc -e opcache
; Enable apc extension module
extension = apc.so
; See http://www.php.net/manual/en/apc.configuration.php
apc.enable_opcode_cache=0
apc.enabled=1
apc.shm_size=64M
apc.shm_strings_buffer=0
;apc.num_files_hint=1000
;apc.user_entries_hint=4096
;apc.ttl=0
;apc.use_request_time=1
;apc.user_ttl=0
;apc.gc_ttl=3600
; apc.filters so that files are only cached if matched by a positive filter.
;apc.cache_by_default=1
;apc.filters=
apc.mmap_file_mask=/tmp/apc.XXXXXX
;apc.file_update_protection=2
;apc.enable_cli=0
;apc.max_file_size=1M
apc.stat=0
;apc.stat_ctime=0
;apc.canonicalize=1
;apc.write_lock=1
;apc.report_autofilter=0
;apc.rfc1867=0
;apc.rfc1867_prefix =upload_
;apc.rfc1867_name=APC_UPLOAD_PROGRESS
;apc.rfc1867_freq=0
;apc.rfc1867_ttl=3600
;apc.coredump_unmap=0
;apc.file_md5=0
;apc.preload_path=
zend_extension=/opt/rh/php54/root/usr/lib64/php/modules/opcache.so
opcache.enable=1
;opcache.enable_cli=0
opcache.memory_consumption=64M
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
;opcache.max_wasted_percentage=5
;opcache.use_cwd=1
;opcache.validate_timestamps=1
;opcache.revalidate_freq=2
;opcache.revalidate_path=0
;opcache.save_comments=1
;opcache.load_comments=1
opcache.fast_shutdown=1
;opcache.enable_file_override=0
;opcache.optimization_level=0xffffffff
;opcache.inherited_hack=1
;opcache.dups_fix=0
opcache.blacklist_filename=/opt/rh/php54/root/etc/php.d/opcache*.blacklist
opcache.max_file_size=1M
;opcache.consistency_checks=0
;opcache.force_restart_timeout=180
;opcache.error_log=
;opcache.log_verbosity_level=1
;opcache.preferred_memory_model=
;opcache.protect_memory=0

> kill -HUP <httpd.pid>
> tailf app-root/logs/php.log 


[Mon Jan 26 17:17:49 2015] [notice] SIGHUP received.  Attempting to restart
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_PASSWORD was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_SOCKET was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_HOST was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable PGUSER was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_IDENT was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable PGDATABASE was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_PID was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DIR was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_USERNAME was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_MAX_PREPARED_TRANSACTIONS was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_LD_LIBRARY_PATH_ELEMENT was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_PATH_ELEMENT was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable PGHOST was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_URL was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_VERSION was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable PGDATA was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_PORT was undefined
[Mon Jan 26 17:17:49 2015] [warn] PassEnv variable OPENSHIFT_POSTGRESQL_DB_LOG_DIR was undefined
[Mon Jan 26 17:17:49 2015] [notice] Digest: generating secret for digest authentication ...
[Mon Jan 26 17:17:49 2015] [notice] Digest: done
[Mon Jan 26 17:17:49 2015] [notice] Apache/2.2.15 (Unix) configured -- resuming normal operations

Comment 31 errata-xmlrpc 2015-02-12 13:09:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0220.html


Note You need to log in before you can comment on or make changes to this bug.