SMF Support > Server Performance and Configuration

Memcache and APC together

(1/3) > >>

sevamaster:
To SMF experts.

My server has APC installed and  smf detects and uses it (level 3 caching).
Yesterday, I installed memcache and  filled in the Memcache settings: IP address (using a single server).
Visually, no changes in speed are noticed.

Tell me please, could  the sms use two caching instruments (because they are using two different caching)?
And if not, what should I use?

Note, that if  Memcache is preferable, then in any case the smf says that APC is detected.
That is, if the APC and Memcache installed and there is  IP prescribed  for Memcache, which one (or both) will be used?

Thank you.


PS. SMF 2.0.2

Oldiesmann:
If you have memcache set up, SMF will use it instead of APC or any other cache thing on your server.

SMF checks for things in the following order when trying to cache things:
memcache
eAccelerator
MMCache
APC
Zend Platform
xCache

I'm not sure why, or why it's detecting APC before memcache, but that's the way things work :)

sevamaster:
Thank you Oldiesmann.
So, it's not possible to use both  (apc and memcache) at the same time?
If so, which one is better for smf (which to use[ or disable])?

Oldiesmann:
No, it's not possible to use both at the same time, and it wouldn't work too well if you did - why would you cache something multiple times with two different services, and how would SMF know which one was the most up to date?

I don't know which is better as I have no experience with memcached. I'm sure someone else here can answer that though.

Vekseid:
APC is somewhat faster than Memcached, since it makes an internal call rather than going over a socket - a network socket at that.

However, memcached, being a distributed cache, is useful if you want to cache a ridiculous amount of data. However, I've never found that SMF takes much advantage of this possibility, or well (in fact caching at level 3 gives serious issues).

Using both is useful in a small set of limited circumstances. For example, in the new CMS code I've written, multiple machines may have unique configurations associated with them. Thus, the config data gets loaded by APC (apc_load_constants), while memcached caches everything else in one or more pools.

Navigation

[0] Message Index

[#] Next page

Go to full version