apc

APC, disk hits, and requires/includes

懵懂的女人 提交于 2020-01-04 09:16:17
问题 Pretty simple question, but I can't actually tell for sure. How does PHP behave with requires/includes of files that have been already cached by APC? My understanding is that this cache primarily saves PHP of compiling a file that has been already cached, but it's not clear to me whether it also saves the disk hit necessary to find/fetch the file aswell; so, does it? Or will PHP hit the disk, even if the opcode has been already cached, the only difference being that it doesn't do the

APC, disk hits, and requires/includes

余生颓废 提交于 2020-01-04 09:16:08
问题 Pretty simple question, but I can't actually tell for sure. How does PHP behave with requires/includes of files that have been already cached by APC? My understanding is that this cache primarily saves PHP of compiling a file that has been already cached, but it's not clear to me whether it also saves the disk hit necessary to find/fetch the file aswell; so, does it? Or will PHP hit the disk, even if the opcode has been already cached, the only difference being that it doesn't do the

What could cause local APC to be slower than remote Memcached?

若如初见. 提交于 2020-01-04 05:35:10
问题 I am working on trying to tune my caches and in doing benchmarking I found something that is confusing the hell out of me. Pulling a key from my remote Memcached box (local network) is taking 0.0008 seconds whereas pulling a key from my local APC cache is taking 0.0114 seconds. Yes, it is a full 14x faster. That seems awfully slow for a local cache... what settings should I be looking at tuning to make it more effective? Edit: As requested, here is my APC config from php.ini [APC] ;specifies

Multiple Symfony2 Sites using APC Cache

耗尽温柔 提交于 2020-01-02 10:10:30
问题 I have two sites using the Symfony2 framework that have similar files. The sites are both on the same server and use APC cache. I have noticed that some items that are on one site are then used on another site. Any APC that has been used have different and unique keys. Is there some way of splitting the APC cache for each site or set a prefix or something? 回答1: Have you tried to use ApcUniversalClassLoader()? According to manual, in your autoload.php you can boot APC with different keys:

Multiple Symfony2 Sites using APC Cache

我的未来我决定 提交于 2020-01-02 10:08:49
问题 I have two sites using the Symfony2 framework that have similar files. The sites are both on the same server and use APC cache. I have noticed that some items that are on one site are then used on another site. Any APC that has been used have different and unique keys. Is there some way of splitting the APC cache for each site or set a prefix or something? 回答1: Have you tried to use ApcUniversalClassLoader()? According to manual, in your autoload.php you can boot APC with different keys:

What is best PHP Handler for APC [closed]

我只是一个虾纸丫 提交于 2020-01-01 06:14:45
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I utilize APC for opcode in par with 4-cpu license Litespeed. What is the best PHP handler for this situation in term of performance first, and security later? Is it suphp / dso / fcgi / cgi ? (i read that DSO can leave a hole if one of the script has a bug) ? myusername

PHP APC Potential Cache Slam Averted for Key

房东的猫 提交于 2020-01-01 01:12:49
问题 I'm receiving this error while trying to use apc_store() . I googled it and saw that this was APC timebomb bug and saw some fixes which suggested adding apc.slam_defense = Off; to php.ini. I need to know whether this has happened because of a programming error, and if yes, how to fix it. This is the code segment: if ($data = apc_fetch("foo")) { $an_array = $data; } else { /* couple of lines */ apc_store("circles", $an_array); // This is where I get the error } This script will be called

PHP APC: What happens when APC cache is full?

*爱你&永不变心* 提交于 2019-12-30 08:03:05
问题 What happens when you try to add a variable into APC and the APC cache is full? Does it automatically remove least used variable from the cache? 回答1: According to APC: Runtime Configuration, "In the event of a cache running out of available memory, the cache will be completely expunged if ttl is equal to 0. Otherwise, if the ttl is greater than 0, APC will attempt to remove expired entries." So if there is a non-zero TTL, it will remove entries whose time to live has passed. ;) Otherwise, it

PHP APC: What happens when APC cache is full?

亡梦爱人 提交于 2019-12-30 08:01:47
问题 What happens when you try to add a variable into APC and the APC cache is full? Does it automatically remove least used variable from the cache? 回答1: According to APC: Runtime Configuration, "In the event of a cache running out of available memory, the cache will be completely expunged if ttl is equal to 0. Otherwise, if the ttl is greater than 0, APC will attempt to remove expired entries." So if there is a non-zero TTL, it will remove entries whose time to live has passed. ;) Otherwise, it

apc vs eaccelerator vs xcache

别来无恙 提交于 2019-12-27 16:35:08
问题 Im doing research on which one of these to use and I can't really find one that stands out. Eaccelerator is faster than APC, but APC is better maintained. Xcache is faster but the others have easier syntax. Anyone have recommendations on which to use and why? 回答1: APC is going to be included in PHP 6, and I'd guess it has been chosen for good reason :) It's fairly easy to install and certainly speeds things up. 回答2: Check out benchmarks and comparisons: here and here and there 回答3: APC