Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP APC module. Any disadvantages?

Tags:

php

apache2

apc

I wanted to know if anyone thought if there where any disadvantages to using APC? Also, I'd be interested in reviewing these options below and getting your opinion on them.

Thanks.

; Enable apc extension module
extension = apc.so
; Options for the apc module
apc.enabled=1
apc.shm_segments=1
apc.optimization=0
apc.shm_size=256M
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1
apc.cache_by_default=1
like image 267
Bryan Ruiz Avatar asked Feb 18 '11 06:02

Bryan Ruiz


1 Answers

Practically none, especially if you're comparing to not using any bytecode cache at all. Having said that, here's something you might need to be aware of:

  1. APC is an additional piece of software, so if there's a bug in APC your site may be affected by it. That happens from time to time, but APC is a widely used software so chances that you'd encounter a bug that wasn't already found and fixed is quite low unless so do some serious dark magic with PHP.

  2. Beware of scripts that change very frequently or of applications that generate large number of files which may not be ever used again (some templating systems might do that). Those would eat up your memory and reduce efficiency of caching, use apc.filters to ignore such files.

like image 99
StasM Avatar answered Oct 14 '22 17:10

StasM