News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Caching for SMF

Started by Night09, May 15, 2008, 07:25:29 PM

Previous topic - Next topic

Night09

    SMF supports caching through the use of accelerators. The currently supported accelerators include:

  • APC
  • eAccelerator
  • Turck MMCache
  • Memcached
  • Zend Platform/Performance Suite (Not Zend Optimizer)
What accelerator would SMF recommend to use rather than just supported ?

I know these ones are compatable but was wondering which is best to use overall.

Ben_S

I'd go with APC personally.
Liverpool FC Forum with 14 million+ posts.

dschwab9

For just a single server, APC is probably the best bet.  Although there are some issues, especially with 64 bit systems, with it not expiring items correctly and then crashing with the cache gets full.  For multiple web servers, memcache is almost essential since it can share the cache between multiple servers as well as distribute the memory usage among multiple machines.

We run memcache here and I'm really happy with it.

el-brujo

I'm using now eAccelerator, but i want to install APC and tell the changes  :P

H

I use APC on my sites. Xcache is also good if you use Lighttpd as your webserver and will be supported in 2.0b4+
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

rsw686

I was APC on my 64bit Fedora box. Works great for me and has decreased the page creation time by half. I haven't run into stability issues either.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Ben_S

Quote from: dschwab9 on May 16, 2008, 11:56:34 PM
Although there are some issues, especially with 64 bit systems, with it not expiring items correctly and then crashing with the cache gets full. 

Those issues are present with 32 bit systems too.
Liverpool FC Forum with 14 million+ posts.

dschwab9

Didn't realize it happens on 32 bit also.  What's interesting is I use it on zuwharrie.com, which is relatively high traffic with no problems, but when we ran it here, we were crashing the servers twice a week.

Ben_S

My old box was running cent os 32bit and was having the problem, the only way to avoid it was the set the cache large enough never to fill up fully.
Liverpool FC Forum with 14 million+ posts.

Sarge

I never had problems with APC on CentOS 4.6 64-bit.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Ben_S

As far as I could tell, ou would only have the problem if the cache got full, and the server was very busy & two processes were trying to clear the cache at the same time, that would send it into a loop crashing apache.
Liverpool FC Forum with 14 million+ posts.

stanaca

What is APC and why there is need of caching the smf?
...

H

Quote from: stanaca on May 22, 2008, 11:50:40 AM
What is APC and why there is need of caching the smf?


APC stands for alternative php cache and is one cache for php.

Caching is needed on busy sites to speed up page loads and decrease strain on the server :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

el-brujo


H

-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

hartiberlin

Quote from: nightbre on May 15, 2008, 07:25:29 PM
   SMF supports caching through the use of accelerators. The currently supported accelerators include:

  • APC
  • eAccelerator
  • Turck MMCache
  • Memcached
  • Zend Platform/Performance Suite (Not Zend Optimizer)
What accelerator would SMF recommend to use rather than just supported ?

I know these ones are compatable but was wondering which is best to use overall.

Do these above caches also work on a MySQL 4 database or only
on MySQL 5 database ?

As I am on servage.net hosting there it is told:




SMF has not been able to detect a compatible accelerator on your server.


SMF supports caching through the use of accelerators. The currently supported accelerators include:

* APC
* eAccelerator
* Turck MMCache
* Memcached
* Zend Platform/Performance Suite (Not Zend Optimizer)

Caching will only work on your server if you have PHP compiled with one of the above optimizers, or have memcache available.

SMF performs caching at a variety of levels. The higher the level of caching enabled the more CPU time will be spent retrieving cached information. If caching is available on your machine it is recommended that you try caching at level 1 first.

Note that if you use memcached you need to provide the server details in the setting below. This should be entered as a comma separated list as shown in the example below:
"server1,server2,server3:port,server4"

Note that if no port is specified SMF will use port 11211. SMF will attempt to perform rough/random load balancing across the servers.

===========


How can I setup the caching ?
Is there a cache, that also works with SMF 1.1.5 on server clusters ?
(clustered hosting) ?



dschwab9

The caches have nothing to do with the database, so the MySQL version doesn't matter at all.  However, your host would have to have one of the caching systems installed on the server before you will be able to use caching.

hartiberlin

Hmm,
I had another email exchange with my hoster and
they say, they have already running
EAccelerator on my cluster, where I am hosted.

Have a look at:

http://c37.servage.net/phpinfo.php

It says:

PHP Version 5.2.3

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with eAccelerator v0.9.5.1, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
    with the ionCube PHP Loader v3.1.24, Copyright (c) 2002-2006, by ionCube Ltd., and
    with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies


So it seems
eAccelerator v0.9.5.1 is
running, but SMF 1.1.5 does
not recognize it.

So how can I enable caching in my admin control panel ?

Must there be still some other options enabled ?

青山 素子

eAccelerator must be built with content caching enabled. It's not a default setting.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


hartiberlin

Could this content caching still be enabled after the installation of it ?

Where and how ?

Many thanks.

Advertisement: