php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59566 apc.stat=0 with a expire timeout
Submitted: 2011-01-07 13:06 UTC Modified: 2016-08-31 15:53 UTC
Votes:6
Avg. Score:5.0 ± 0.0
Reproduced:4 of 5 (80.0%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: yurtesen at ispro dot net Assigned: cmb (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.2.13 OS: FreeBSD 8.x
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: yurtesen at ispro dot net
New email:
PHP Version: OS:

 

 [2011-01-07 13:06 UTC] yurtesen at ispro dot net
Description:
------------
Hello,

It is good to have the apc.stat=0 for performance reasons. This option makes huge performance difference in my server. The load goes down from 200 to 2!

However, while this option is good where the files are not changed very often. It eventually causes some convenience problems. For example on shared hosting, we can not give restart or cache purge capabilities to customers and I am sure that customers wouldnt want to do that manually anyway.


So, what about a semi-nostat feature with an expiration? Cache the file, put a user settable timer for the file and do not stat the file again until timer expires.


For example, if I have the timer set to 60seconds and the file foo.php is cached, the xcache serves the file without any further stat checks for 60 seconds. Then makes a stat check. In 60 seconds there could have been 1000 accesses to file but we get away with 1 stat check every 1000 accesses, without the need of manual purge.


Perhaps even the old apc.stat variable can be replaced and the timer can be used instead?


For eample:

apc.stat_exp_timer = 0   <- always do stats check
apc.stat_exp_timer > 0   <- wait for the given seconds before doing another stats check.
apc.stat_exp_timer = -1  <- never do a stats check.


What do you think?


Thanks,
Evren


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-29 23:22 UTC] noreply at qcybb dot com
This is a great suggestion! I would also like to see this feature added.
 [2016-08-31 15:53 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2016-08-31 15:53 UTC] cmb@php.net
According to <https://bugs.php.net/69618>, APC support has been
discontinued in favor of OPcache, APCu, the session upload
progress API and WinCache. Therefore this request won't be
implemented.
 [2016-08-31 21:26 UTC] yurtesen at ispro dot net
Amazing to receive response after 5 years. Thanks for finally looking at it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 07:01:29 2024 UTC