New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Redis vs. W3 Total Cache for Database caching
Hi all,
need your opinion for a high visit wordpress site which has mostly pictures, use generated content like Pinterest. What would be more effective for the Database query caching ?
1. Redis
or
2. use Database and object caching built into W3 Total Cache
Will be running the site from a Dedicated server with NVMe and 16GB RAM. I'd like to use RAM for caching but not sure if W3TC plugin can be configured to store its cache location on RAM.
Or
can we use both efficiently. What would be pros and cons for both, can someone share hands-on experience with both of them ?
Thanks
Redis vs. W3 Total Cache for Database caching
- Redis vs. W3 Total Cache for Database caching20 votes
- Redis75.00%
- W3 Total Cache DB caching25.00%
Comments
I think memcached is good enough on w3 total cache, but redis can definitely be configured so its better and faster than memcached. But redis can break/be misconfigured quite easily. Then you also need opcache. So memcached + opcache or redis + opcache. Take your pick.
(It's even better if you don't even use w3 total cache, probably)
W3TC also provides basic Wordpress, JS, CSS optimization as well and most of the devs are acquainted with it already. If a good performance level can be achieved with opcache + W3TC only... I'll be happy to let go Redis. Thats why I seek opinion if Redis would actually be better at DB caching than any other popular mechanisms.
Redis is a raw tool, W3TC is a complete product. If you have typical "wordpress programmers" then stick with W3TC.
Yeah, but these things can be done in other ways as well. For example, you can use google's pagespeed module to do the same things and more.
Looks like memcached + opcache is for you
Yes, redis is going to be better if you truly know what you are doing or don't mind learning. I think it really depends on the kind of site you have and how much traffic you get. It probably will be worth it to dabble in redis if you find a need to host just one wordpress site on a dedicated server.
if it's images then just putting cloudflare in front with custom page rules to optimise image caching would ensure all load hits cloudflare edge servers and not your wordpress server + longer browser cache TTL ensures repeat visitor requested images come from visitor's browser cache and again bypass hitting your wordpress server
I'm using Redis with "Redis Object Cache" plugin. Pretty good
As the dev team is mending many things here and there, once the site achieves good functional level, yes I plan to use Cloudflare for caching the images.
Will check memcached + opcache and do some benches.
Thanks for your insights so far...any more tips are welcome
I believe OPcache is already installed and enabled by default if you're using PHP 5.5+.
If your web site has lots of pages (e.g. 5000 users viewing 5000 different pages vs 5000 users viewing 5 pages) then it might simply not be worth it to setup a cache.
You can spend time adding/improving features instead!
On my SSD VPS I can't even measure how much of a difference the cache makes (WP Super Cache), because page generation time is 0.02-0.05s and user page loading time (HTML + images) is 1-3s. I ended up disabling cache because it's one less plugin to secure and configure. Also, when I tried using this plugin on HDD server it actually increased my page loading time by 0.05s.
have u tried using shared memory
or deleting php/wordpress and instead use a real programming languageVarnish cache
Full page caching, served by varnish or nginx. If you have enough RAM (you can let the kernel decide what to put in ram) you'll scale pretty well.
CPU will likely mostly be used by TLS negotiation. Take case to use something recent and well configured on that front.
Well I have it running on an E3-1270 / 16GB / 500GB NVME
The Database is at 1.7GB though about 1.4GB is the table wp_postmeta table only... which I guess has many orphan meta tags from the 100+ plugins the site used to have (now about 45 active). The dev team is working out some more cleanups and upgrades to slim it down as much as possible.
I second the Cloudflare caching recommendation.
My 2c on WP caching plugins tried so far:
https://io.bikegremlin.com/7303/wordpress-caching/
With a note: I haven't played with nginx as reverse proxy, it should outperform LiteSpeed, but haven't tried. W3TC, or (paid) WPRocket should be a good choice for that. Haven't tried Redis neither though - and far from an expert, so take all "as is - to the best of my knowledge".
WordPress should benefit from caching, even if not all the visitors are viewing the same pages. As long as once generated page is stored and served from cache - server load should be reduced, with a speed increase.
If the website is set up so that change of one page doesn't require purging all the cached pages / posts, and if the caching plugin/software is set to purge the cache of only the updated pages /posts, not all when a page is updated, performance should be good.
I have been a big fan of wp-rocket. Well worth the cost imho.
Check out rockdb and leveldb , yeah u need some coding skills for it,but its faster