Questions about caching in Vanilla
Hi all,
I run a Vanilla forum under 2.0.18.8 and recently i reached about 2.500 Visitors a day with some hundred users. I'm looking for a caching integration but i'm totally plain regarding Vanillas capability in this field. The overall server load is around 4% but 2-3 times a day the server load peaks and it seems like the database drops out, returning within 1-2 minutes. The server crashes.
I'm in talks with my hoster and we decided to add a 60 GB SSD for the Database and might use a caching that is supported by Vanilla. I've read through several threads and it seems that Vanilla supports "Memcached" and "APC", although i do not get all the technical details. Ok, then there is Nginx, which was stated by some, improves Vanillas performance as well, but my hoster is not providing this for a managed server of my size.
My idea now was to let the hoster install "Memcached" and add the SSD and then monitor what happens. But here might be more smarter ideas from you or in articles i should dive into to get the best out of it. Would be great if you can point me to some things. Thanx
The Server:
Intel® Core™ i3-2100, 2 x 3,1GHz Processor, Hyper-Threading
4 GB RAM
1 TB SATA (RAID 1)
Btw: i came across this article:
http://smerity.com/articles/2012/install_vanilla_forums.html
- VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
- VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
Comments
Varnish was mentioned and discussed a few times here:
http://vanillaforums.org/discussion/21044/vanilla-and-varnish-cache-some-lessons-learned
http://www.vanillaforums.org/discussion/comment/192383#Comment_192383
APC is generic PHP caching. Your hosting provider should be able to enable it for you. It helps a lot.
Memcached is a handy tool for storing data that are regularly accessed by the filesystem and database in memory. The cache can be distributed across many systems.
I found the following Memcached config settings for Vanilla on a page on @Lincoln's GitHub a while back. After applying them, Vanilla began to store some data in the Memcached store immediately.
Add Pages to Vanilla with the Basic Pages app
Thank you a lot guys. Would you choose the one or the other or both?
@lincoln: Are there any config settings like the memcached for APC as well?
@R_J also recommended in a private message that following settings might support the database in all the plugin connections. I will try that too, mention it here to bring your ideas up about it.
$Configuration['Database']['ConnectionOptions'] = array(
12 => TRUE,
1000 => TRUE,
1002 => "set names 'utf8');
Varnish sits front of house for a quick turn around. It is a web accelerator. if you use a CDN you might not need this. if you are setting up a private CDN or what improve a CDN pull rate you set this up.
Memcache is employed by the application to cache data and objects. You have enough memory for it, so go for it.
Although APC is not used in this case to cahche vanilla object simply having it install and enabled can improve performance.
nginx is a more efficient server than apache so this is an option. The problem is if you are looking for a full managed hosting with nginx, you options are still limited. Very few will support it full managed, and those that do, well like anything they are an unknown quantity. With a client, I found a guy, he turned out to be the most unreliable person. Like simply not replying to to a ticket for months, this is $$$ fully managed hosting support.
If you are happy to go alone or negotiate the level of support then fine. However if you come under attack you will need a level of expertise.
grep is your friend.
Thanx @x00 for your explanations. I run about 100 websites on my server and they guys are pretty ok (with 24h hotline support and etc.).
You wrote "Memcache", did you mean "Memcached" as they are pretty different things.
So activating APC and Memcached in parallel isn't a bad thing, also not for forum software?
You can run APC and Memcached at the same time with Vanilla with no problems if they are configured properly. The apc_store function seems to be used in some parts of Vanilla, but not extensively, so you could upgrade to PHP 5.5+, which has replaced APC with Optimzer+, which has been shown to provide more performance in cases where the software doesn't use APC functions extensively.
Add Pages to Vanilla with the Basic Pages app
There seems to be two config settings related to APC used in
/library/core/class.cache.php
in the Vanilla 2.2 development builds:Add Pages to Vanilla with the Basic Pages app
@Shadowdare: Thank you for pointing me there.
My hoster now told me that there is already "Zend Guard Loader" on my Server. And they recommend it over APC. Seems like Memcache (they don't speak about "MemchacheD") is the thing to add now. Mmhh...
php memcache is not supported in vanilla, even though the cache class exists, I don't think it works. Certain version php memcache had bugs for a while, so I think most people used php memached.
grep is your friend.
aside from downloading apc and installing module (e.g. with apache web server).
and adding the extension to your ini file (probably depends on your OS)
/etc/php5/apache2/conf.d/apc.ini
extension=apc.so
restart apache server.
verify it in phpinfo.
what else should you configure "to do it right" .
any other settings to do or recommended?
where do you look to see if it is even doing anything (aside from a performance test).
Do you just set these to TRUE?
also someone mentioned something about APC and make sure it doesn't cache config.php. HOW? where?
any tutorials.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
found this example on the web.
[APC]
extension=apc.so
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.