LiteSpeed Cache for XF2 - Community

LiteSpeed Cache for XF2 - Community 2.3.0

No permission to download
im using lscache and redis
Are you sure that you activate cache there ? you have 4300ms response time on the same droplet that i have too, but I have without any caching (I mean without LScache addon or cache by reddis) on LS 2500ms. and with cache activating via redis 570ms.
 
Hi @zonzon

Your numbers look more or less correct when guest caching is active and cache is primed (the cached pages have not expired yet). Our XF plugin specifically uses a fixed amount of time when caching pages after which they will expire causing a backend hit next visit to regenerate the page and re-cache it.

@est3ban129
It looks like your caching might not be active to me as well. The first graph is dealing with pretty low bandwidth making me think that your site is small enough to get those 500-700 ms numbers while still hitting the backend w/ 200 responses and only 8 users. When you increase that to 1497 requests and 250 users, as in your second graph, you are clearly hitting the backend with all requests and overwhelming the server causing requests to take longer and longer as you go -- which to me indicates no caching in place.
 
Hi @zonzon

Your numbers look more or less correct when guest caching is active and cache is primed (the cached pages have not expired yet). Our XF plugin specifically uses a fixed amount of time when caching pages after which they will expire causing a backend hit next visit to regenerate the page and re-cache it.

@est3ban129
It looks like your caching might not be active to me as well. The first graph is dealing with pretty low bandwidth making me think that your site is small enough to get those 500-700 ms numbers while still hitting the backend w/ 200 responses and only 8 users. When you increase that to 1497 requests and 250 users, as in your second graph, you are clearly hitting the backend with all requests and overwhelming the server causing requests to take longer and longer as you go -- which to me indicates no caching in place.


Captura de pantalla 2020-11-05 a las 15.03.04.webp


I just looked at it and litespeed is active, strange?
 
View attachment 239111


I just looked at it and litespeed is active, strange?

Yea, if your seeing the cache hit header like that then you are setup fine -- is it possible that the test tool is also sending your logged-in cache cookie along with it's requests? I wouldn't think so but getting that header is pretty definitive on weather or not your setup with cache correctly.

Regards,
-Michael
 
Can you also please test with default and new install XF 2.2.1?
I will be using that on my own test also.

So that we have equal data to compare.
Thanks.

I'm just curious about the performance difference.
 
Can you also please test with default and new install XF 2.2.1?
I will be using that on my own test also.

So that we have equal data to compare.
Thanks.

I'm just curious about the performance difference.
I destroed 30min ago all testing droplets :) and leave only with LiteSpeed on ubuntu

but there some of my results:

test type:
Clients per seconds (250 in one min)
https://bit.ly/32hdZIV LS+LScache
https://bit.ly/368UMdf LS+Redis (instead LScache addon)
https://bit.ly/3mVVUYv Nginx+Redis (include guest page cache) server failed
https://bit.ly/3mYEGdk Nginx without any cache server failed
https://bit.ly/3l0S3sE LS installled as Plesk extention (no cache)
https://bit.ly/3evYIbS LS installled as Plesk extention (with LS cache addon)

test type:
Clients per test (250 in one min)
https://bit.ly/3oZVxhx LS+LScache
https://bit.ly/2IaNptr LS without cache
https://bit.ly/2I7G9z2 LS+Redis (instead LScache addon)
https://bit.ly/351i6dS Nginx+Redis (include guest page cache)
https://bit.ly/38fGuKM Nginx without any cache
https://bit.ly/3n0w45B LS installled as Plesk extention (no cache)
https://bit.ly/3jYUOtb LS installled as Plesk extention (with LS cache addon)

test type:
Maintain client load (250 in one min)
https://bit.ly/3p0VqSP LS+LScache
https://bit.ly/36nqgNd LS without cache
https://bit.ly/3l2WTWt LS+Redis (instead LScache addon)
https://bit.ly/3p0cwQF Nginx+Redis (include guest page cache)
https://bit.ly/3pbj2V4 Nginx without any cache server failed
https://bit.ly/32gIz5m LS installled as Plesk extention (no cache)
https://bit.ly/34YD0u6 LS installled as Plesk extention (with LS cache addon)

in overall:
usually LS without any cache faster then nginx +redis cache.
LS with own cache plugin always much! faster then with redis caching (include guestpage caching by redis)
LS with own cache plugin always much faster than any other instances.
LS installed as Plesk extension (vs clean Install or with CyberPanel) much slower without cache activated (note this for logged users!) and have absolutely the same results with own cache activated.
 
Last edited by a moderator:
Maintain client load (250 in one min)
https://bit.ly/3p0VqSP LS+LScache
https://bit.ly/36nqgNd LS without cache
https://bit.ly/3l2WTWt LS+Redis (instead LScache addon)
https://bit.ly/3p0cwQF Nginx+Redis (include guest page cache)
https://bit.ly/3pbj2V4 Nginx without any cache server failed
https://bit.ly/32gIz5m LS installled as Plesk extention (no cache)
https://bit.ly/34YD0u6 LS installled as Plesk extention (with LS cache addon)
Interesting comparison from my test

What location is this by the way on DO?
VPS upload speed does matter on this test I think.
 
Frankfurt.

if you have time try also make test for LS server with also clean xenforo install since my install was not clean, there was custom style with background images, some addons, and about 30 forums on main page.

Because we have very different results with the same server configurations:
https://bit.ly/3p0cwQF Nginx+Redis (include guest page cache) vs your result https://xenforo.com/community/threa...r-io-testing-on-free-plan.187463/post-1475358

https://bit.ly/3pbj2V4 Nginx without any cache server failed vs your result https://xenforo.com/community/threads/xenforo-2-2-1-loader-io-testing-on-free-plan.187463/
 
Last edited by a moderator:
  • Like
Reactions: rdn
Quick question, with this plugin, how do we get the logged in users to use LScache or does it do it. I am trying to read up and see public and private. so I assume private is for logged in users and public is for non logged in users?

but how would you setup both public and private users?
Is it the same in .htaccess
you can set a few more lines and add the private as well?

thanks for anyones help
Spiro
 
also for mobile can we use this?

Code:
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobile]
 
Quick question, with this plugin, how do we get the logged in users to use LScache or does it do it. I am trying to read up and see public and private. so I assume private is for logged in users and public is for non logged in users?

but how would you setup both public and private users?
Is it the same in .htaccess
you can set a few more lines and add the private as well?

thanks for anyones help
Spiro
The plugin only handles guest user traffic, so that would be a no. You are correct on private caches being for logged-in users. Caching for private user's would involve some new .htaccess rules but more importantly it would take a fair amount of new plugin code to do safely to avoid things like server a page with user A's information to user B etc.

also for mobile can we use this?

Code:
RewriteCond %{HTTP_USER_AGENT} "iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobile]
Yes, these rules should work fine.

Regards,
-Michael
 
Hi,

Can you please add support for this XF 2.2.0 feature?

Maybe a new cookie for visitors who have pending post submitted but not yet registered?
For now it's getting mixed up and saved on the cache and if someone visited a page that is already on the cache HIT with pending post, after they login it will be be posted as their post unfortunately.
 
Hi,

Can you please add support for this XF 2.2.0 feature?

Maybe a new cookie for visitors who have pending post submitted but not yet registered?
For now it's getting mixed up and saved on the cache and if someone visited a page that is already on the cache HIT with pending post, after they login it will be be posted as their post unfortunately.

Hi @rdn ,

That does seem problematic. I've added it to my todo short list and plan to take a look this week or early next week.

Regards,
-Michael
 
Feature request, please.
Displays page as a guest if user is logged in, and cookie isn't present (and sets it again), so that a user can't remove it and cache the page as if they were a guest (while still logged in).
 
Top Bottom