APC with horde/imp: 99.9% miss rate and only one cached file

APC with horde/imp: 99.9% miss rate and only one cached file

am 08.04.2010 21:21:21 von Derek Chen-Becker

I suspect I've either done something horribly wrong or found a weird
bug, probably the former. I'm running PHP 5.2.13 on Solaris 10 under
Apache 2.2.14. Memory usage is 98.8% free (default 1 slice of 30MB).
Here are stats on the cache:

Cached Files 1 (288.2 KBytes)
Hits 4146
Misses 3579033
Request Rate (hits, misses) 358.68 cache requests/second
Hit Rate 0.42 cache requests/second
Miss Rate 358.26 cache requests/second
Insert Rate 0.00 cache requests/second
Cache full count 0

And here is my config in php.ini:

extension=apc.so
error_reporting = E_ALL ^ E_DEPRECATED
apc.report_autofilter = 1
log_errors = 1

If I restart apache, a different file gets cached each time (it rotates
between a very small subset of all of the PHP files in horde).
Sometimes, 2 or even 3 files get cached, but I've never had it go above
3. I've been googling around and reading the list archives but I can't
find anything that seems to be related to this. Am I misunderstanding
the purpose of APC? I thought that it would attempt to cache all PHP
files that are requested.

I turned on the report_autofilter in an attempt to diagnose the issue,
but nothing shows up in the error log. Here is the config as shown by
apc.php:

apc.cache_by_default 1
apc.canonicalize 1
apc.coredump_unmap 0
apc.enable_cli 0
apc.enabled 1
apc.file_md5 0
apc.file_update_protection 2
apc.filters
apc.gc_ttl 3600
apc.include_once_override 0
apc.lazy_classes 0
apc.lazy_functions 0
apc.max_file_size 1M
apc.mmap_file_mask
apc.num_files_hint 1000
apc.preload_path
apc.report_autofilter 1
apc.rfc1867 0
apc.rfc1867_freq 0
apc.rfc1867_name APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_
apc.rfc1867_ttl 3600
apc.shm_segments 1
apc.shm_size 30
apc.stat 1
apc.stat_ctime 0
apc.ttl 0
apc.use_request_time 1
apc.user_entries_hint 4096
apc.user_ttl 0
apc.write_lock 1


Any help would be greatly appreciated.

Thanks,

Derek

--
------------------------------------------------------------ ----------
Derek Chen-Becker
Senior Network Engineer, Security Architect
CPI Corp, Inc.
1706 Washington Ave
St. Louis, MO 63103
Phone: 314-231-7711 x6455
Fax: 314-613-6724
dbecker@cpicorp.com
PGP Key available from public key servers
Fingerprint: E4C4 26C0 8588 E80A C29F 636D 1FBE 0FE3 2871 4AE8
------------------------------------------------------------ ----------

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: APC with horde/imp: 99.9% miss rate and only one cached file

am 09.04.2010 23:36:19 von Derek Chen-Becker

Well, downgrading APC from 3.1.3b1 to 3.0.19 fixed it. Working great now!

On 04/08/2010 02:21 PM, Derek Chen-Becker wrote:
> I suspect I've either done something horribly wrong or found a weird
> bug, probably the former. I'm running PHP 5.2.13 on Solaris 10 under
> Apache 2.2.14. Memory usage is 98.8% free (default 1 slice of 30MB).
> Here are stats on the cache:
>
> Cached Files 1 (288.2 KBytes)
> Hits 4146
> Misses 3579033
> Request Rate (hits, misses) 358.68 cache requests/second
> Hit Rate 0.42 cache requests/second
> Miss Rate 358.26 cache requests/second
> Insert Rate 0.00 cache requests/second
> Cache full count 0
>
> And here is my config in php.ini:
>
> extension=apc.so
> error_reporting = E_ALL ^ E_DEPRECATED
> apc.report_autofilter = 1
> log_errors = 1
>
> If I restart apache, a different file gets cached each time (it rotates
> between a very small subset of all of the PHP files in horde).
> Sometimes, 2 or even 3 files get cached, but I've never had it go above
> 3. I've been googling around and reading the list archives but I can't
> find anything that seems to be related to this. Am I misunderstanding
> the purpose of APC? I thought that it would attempt to cache all PHP
> files that are requested.
>
> I turned on the report_autofilter in an attempt to diagnose the issue,
> but nothing shows up in the error log. Here is the config as shown by
> apc.php:
>
> apc.cache_by_default 1
> apc.canonicalize 1
> apc.coredump_unmap 0
> apc.enable_cli 0
> apc.enabled 1
> apc.file_md5 0
> apc.file_update_protection 2
> apc.filters
> apc.gc_ttl 3600
> apc.include_once_override 0
> apc.lazy_classes 0
> apc.lazy_functions 0
> apc.max_file_size 1M
> apc.mmap_file_mask
> apc.num_files_hint 1000
> apc.preload_path
> apc.report_autofilter 1
> apc.rfc1867 0
> apc.rfc1867_freq 0
> apc.rfc1867_name APC_UPLOAD_PROGRESS
> apc.rfc1867_prefix upload_
> apc.rfc1867_ttl 3600
> apc.shm_segments 1
> apc.shm_size 30
> apc.stat 1
> apc.stat_ctime 0
> apc.ttl 0
> apc.use_request_time 1
> apc.user_entries_hint 4096
> apc.user_ttl 0
> apc.write_lock 1
>
>
> Any help would be greatly appreciated.
>
> Thanks,
>
> Derek
>


--
------------------------------------------------------------ ----------
Derek Chen-Becker
Senior Network Engineer, Security Architect
CPI Corp, Inc.
1706 Washington Ave
St. Louis, MO 63103
Phone: 314-231-7711 x6455
Fax: 314-613-6724
dbecker@cpicorp.com
PGP Key available from public key servers
Fingerprint: E4C4 26C0 8588 E80A C29F 636D 1FBE 0FE3 2871 4AE8
------------------------------------------------------------ ----------

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php