vBulletin+vBSEO: speeding up showthread.php page execution time for guests

Psalmist

Active Member
#1
We're running vBulletin 4.2 with vBSEO and we're also using xCache, currently with Apache, not LSWS, on a dedicated server. MySQL and everything is optimized pretty well.

Also our site is fast enough for most pages since we've installed xCache.

Problem is page execution time for thread pages (showthread.php). Without vBSEO it's about .2 seconds and with vBSEO it's .4 - .5 seconds, for a full page of posts, so the result is that "first byte time" for guests coming from the search engines is close to 1 second, which is a killer. Analyzing debug output of vBulletin reveals that that's almost all from doing PHP stuff (the time spent doing mySQL queries is insignificant). And PHP is running as an apache module so that's already optimized as much as it can be with Apache, and combined with xCache, as far as I know.

Note that our our forums shows 20 posts per thread, and I can see that the page execution time is almost directly proportional the the number of posts on a page. We do not want to change the number of post per page at this time (since we have hundreds of thousands of pages indexed in the search engines) though we will consider it as a last resort.

Also realize that my main concern is speeding it up for guests, not logged in users, and again, just the showthread page.

Can anyone tell me from experience that using Litespeed with the Litespeed Cache (plus xCache) will dramatically reduce the page execution time in vBulletin+vBSEO for guest visitors landing on thread pages (showthread.php) with 20 posts per page?

I realize we'll need an enterprise license and that's fine if it will make a big difference.

P.S. server is not overloaded at all
 
Last edited:

NiteWave

Administrator
#2
Can anyone tell me from experience that using Litespeed with the Litespeed Cache (plus xCache) will dramatically reduce the page execution time in vBulletin+vBSEO for guest visitors landing on thread pages (showthread.php) with 20 posts per page?
we'd like to see the accurate difference as well.
if the page is cached, it's like a static page, no page execution time.

if the page is not in cache, php execution time should reduce as well since lsws+lsphp5 is faster than apache+mod_php especially in high traffic environment. more detail can refer a recent case study:
http://www.litespeedtech.com/solutions/case-studies/foromtb-case-study

a trial license is free for 15-days and equivalent to 2-CPU license which has the cache function.
 

Psalmist

Active Member
#3
Nitewave:

Well so I guess our site will be a perfect case study for you!

Well I absolutely want to do the caching if possible. I'll pay the fees (licensing, caching installation, whatever) and let's get this all done. :)

I can benchmark and post results here.

First we'll see how much the showthread.php page execution time (for guests) is reduced with LSWS+xCache compared to Apache+xCache. Also compare the first byte time, which is what really matters.

Then try the LSWS cache if possible, and compare the first byte time (and let's see if my webpagetest.org first byte time grade goes from F to A for the thread pages!).
 

Psalmist

Active Member
#6
Could I do my own simple caching of forum threads (for visitors only, not logged in users)?

Like this:

Write a script to save the html for every thread on disk. Maybe run this script every day or two to update the threads (even if no posts were added, things do change like user info and avatars attached to posts). Also modify the post thread vbulletin script to save an html copy on disk whenever there's a new post to a thread, so that all static thread files will always be up to date.

Then place .htaccess rules to grab the static file off of disk (instead of executing showthread.php) IF the request matches the pattern for forum threads, and if the request is from a visitor (not logged in user). But is it possible to recognize whether or not it's a visitor (not logged in), in .htaccess rules? Perhaps there's something in the URL request that distinguishes logged in members (e.g. a cookie or something).

If this could work it would remove the PHP overhead and we'll have a grade of A for first byte time instead of F, for guest visitor requests of 20-post forum threads in our vbulletin+vbseo.

Any input?

If this would work, is there any advantage to using the LS Cache? Or maybe LS Cache basically does the same thing (and much easier for me)?
 

NiteWave

Administrator
#7
But is it possible to recognize whether or not it's a visitor (not logged in), in .htaccess rules?
refer:
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscache:vbseo
Code:
RewriteCond %{HTTP_COOKIE} !vbseo_loggedin=yes
RewriteCond %{HTTP_COOKIE} !bbuserid=
RewriteCond %{HTTP_COOKIE} !bbpassword=
Or maybe LS Cache basically does the same thing (and much easier for me)?
I think so. you just need write a cron job to access those URLs, to populate the guest cache, and set the expire time you want.
 
Top