php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58223 User cache miss rate is always zero
Submitted: 2008-06-06 08:40 UTC Modified: 2008-06-26 08:41 UTC
From: apc at tequilasolutions dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.2.5 OS: FC7
Private report: No CVE-ID: None
 [2008-06-06 08:40 UTC] apc at tequilasolutions dot com
Description:
------------
I'm trying to tune up my application, I make heavy use of the user cache mainly holding stat()s to decide when to rebuild images etc, on rebuild I apc_store the date they were built.  To further optimize my appication I want to know how many calls are misses and whether some kind of cache priming would be good.

Maybe I'm missing something but....



Reproduce code:
---------------
<?
for ($i=1; $i<1000; $i++){
  apc_fetch("I dont exist - I should be a cache miss");
}
?>

User Cache Information
Cached Variables 6868 ( 9.2 MBytes) 
Hits 33136 
Misses 0 
Request Rate (hits, misses) 22.54 cache requests/second 
Hit Rate 22.54 cache requests/second 
Miss Rate 0.00 cache requests/second 
Insert Rate 7.17 cache requests/second 
Cache full count 0 


Expected result:
----------------
apc_fetching something that doesn't exist should be counted as a cache miss?

Actual result:
--------------
My request rate, is always the same as the hit rate (100%), yet 30% of them were apparently inserts, so my code would have got a miss back from apc_fetch and so decided to apc_store the new value.

My user cache miss rate is always zero.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-06-26 08:41 UTC] gopalv82 at yahoo dot com
http://news.php.net/php.pecl.cvs/10925

Fix in apc-3.1.x-dev (CVS HEAD)

I don't know how that snuck in :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 23:01:30 2024 UTC