Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-04-08 08:24:18

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Caching options

Can anyone chip in with their recommendations for caching in Textpattern. i.e. any tips for improving Textpattern performance.

Also, any core tags to avoid if possible – I’ve heard some tags are a bit resource-hungry.

Offline

#2 2015-04-08 08:57:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,782
Website GitHub

Re: Caching options

I don’t know an awful lot about it, but I know a man who does. Anything spiffin doesn’t know about cacheing and server setup isn’t worth knowing. Last time I worked with him he swore by a PHP-FPM + APC combo on a well-configured VPS, and the results on an image-heavy site were truly astounding. You might want to start by asking him about methods.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#3 2015-04-09 12:49:50

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Caching options

Thanks Stef, I’ve just installed nginx and got PHP-FPM running the site now. Will look at APC later as that looks a bit more lengthy to set up.

So with APC I wouldn’t need to bother including any other Textpattern cache plugins or anything right?

Offline

#4 2015-04-09 13:06:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,782
Website GitHub

Re: Caching options

philwareham wrote #289842:

So with APC I wouldn’t need to bother including any other Textpattern cache plugins or anything right?

As far as I know, APC will do the lot for you. The usual tricks of spriting, resource minification, reducing the number of http requests, sharding and so-forth still apply but only if you’re not serving content over HTTP2.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#5 2015-04-09 20:01:56

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Caching options

Cool, I’ve installed APC temporarily until I’ll upgrade to PHP 5.5, where Opcache is the way forward. I’ll tweak settings over next few days and see what happens. Thanks Stef.

Offline

#6 2015-04-09 22:07:11

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 333
Website

Re: Caching options

I’m very interested in what you learn from this Phil.

My TXP tweaking has been just the obvious low hanging fruit (static css, turn off logging). Caching has never worked out due to my fear of caching weather content on our key sites, so anything that provides a performance boost like PHP-FPM becomes very attractive.

I do believe TXP’s small code base helps it be among the faster CMS options.

I’ve played with NGINX on a linode instance and was damned impressed, but on our production server I remain a dependent wimp to Cpanel (Apache only). Cpanel is supposed to have PHP-FPM as a supported option soon.

A move to SSD drives on our server last year was a dramatic upgrade (we were able to downgrade CPU, save $, and still have much improvement). Those MySQL bits just fly out.

Offline

#7 2015-04-10 06:00:49

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Caching options

I’ll write out a blog article on performance soon, and include server side stuff (although I’m no expert on that side I can get by). I’ve coded the site itself the best I possibly can using current techniques so all improvement now is going to be from server config.

I’m actually seeing slightly worse performance when using nginx and PHP-FPM than pure Apache right now, but I still have some config to do. I also can’t compile ngx_pagespeed on my server because Plesk 12 currently doesn’t play nice with it.

APC improves everything though, regardless of nginx or Apache.

The biggest gains I got were using Cloudflare, about 30% quicker page render than without – even though Pingdom Tools score went down from 100 to 96 (don’t sweat the score numbers, they can be a bit false positive sometimes).

Offline

#8 2015-04-10 10:37:56

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: Caching options

I still use on some websites zem_cache which is still usable and operates with static files. So you can write them to the memory in /dev/shm. Also good for caching of parts of your website like weather data.
A little bit more sophisticated is aks_cache. It caches to the database.

For caching php I use xcache, but there is no plugin for variable data like Gocom’s rah_memcache

And overall I rely on varnish, this is the ultimative web accelerator. Textpattern lacks still a plugin, which is able to purge the cache for updated pages like wordpress “Varnish HTTP Purge” …

Offline

#9 2015-04-10 15:14:39

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 239
Website

Re: Caching options

philwareham wrote #289852:

I’ll write out a blog article on performance soon, and include server side stuff (although I’m no expert on that side I can get by).

This will be interesting to read. Particularly if you find any Textpattern specific performance issues. It would be interesting to know if certain tags are poor performers.

I’ve always found Textpattern to be fast which is one of the reasons I’ve stuck with it all these years, but there’s always room for improvement and it is good to see people seriously thinking about performance.

Offline

#10 2015-04-10 15:21:42

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 239
Website

Re: Caching options

On a side note, if you’re ever trying to explain the importance of developing with performance in mind to a developer who doesn’t see its value it might be worth pointing them at What Does My Site Cost (I wrote a short opinion piece on it too).

Apparently the Textpattern homepage costs a minimum of $0.04 to visit from the US on a mobile and $0.01 in the UK!

Offline

Board footer

Powered by FluxBB