php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73726 default zend opcache settings do not reflect recommended settings
Submitted: 2016-12-12 16:19 UTC Modified: 2017-01-19 08:18 UTC
From: maggus dot staab at googlemail dot com Assigned: dmitry (profile)
Status: Closed Package: opcache
PHP Version: 7.1.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: maggus dot staab at googlemail dot com
New email:
PHP Version: OS:

 

 [2016-12-12 16:19 UTC] maggus dot staab at googlemail dot com
Description:
------------
in the https://github.com/zendtech/ZendOptimizerPlus repos README there is a recommendation which settings should be used in a production environment

> opcache.memory_consumption=128
> opcache.interned_strings_buffer=8
> opcache.max_accelerated_files=4000
> opcache.revalidate_freq=60
> opcache.fast_shutdown=1
> opcache.enable_cli=1

shouldn't those recommendations been reflected int he php.ini-production which is shipped with php itself?

at the moment php-src shipps with
;opcache.enable=0
;opcache.memory_consumption=64
;opcache.interned_strings_buffer=4
;opcache.max_accelerated_files=2000
;opcache.revalidate_freq=2
;opcache.fast_shutdown=0
;opcache.enable_cli=0
in https://github.com/php/php-src/blob/master/php.ini-production

the only thing which might cause problems for people is ;opcache.revalidate_freq=60
which might lead to people wondering why changes in files dont take affect.
all other settings should be at least increased to the recommended defaults IMO.

Maybe the default can be configured with even bigger values as server provide way more memory in comparison to when the recommendations were written down.

opionions?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-12 16:23 UTC] maggus dot staab at googlemail dot com
I am also wondering why 
>opcache.fast_shutdown=1 
defaults to 0.

per readme in https://github.com/zendtech/ZendOptimizerPlus and information provided in php.ini there is no obvious reason why one should disable a "fast-shutdown" in the first place.
 [2017-01-11 06:01 UTC] krakjoe@php.net
-Assigned To: +Assigned To: dmitry
 [2017-01-11 06:01 UTC] krakjoe@php.net
Dmitry assigned to you, we updated settings in php-src, can you have other sources reflect them please.
 [2017-01-11 10:48 UTC] maggus dot staab at googlemail dot com
fixed by https://github.com/php/php-src/pull/2291
 [2017-01-19 08:18 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Nov 29 00:03:13 2021 UTC