vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Board Optimization - Plugin Based Template Cache (https://vborg.vbsupport.ru/showthread.php?t=121876)

amcd 03-24-2007 07:08 PM

Weekends are very busy on my forum. I will try this next week and tell you.

COBRAws 04-07-2007 05:09 AM

This is great orban, thank you very much ;) I see some performance improvement now.

bigbadbob0 04-10-2007 11:43 AM

I installed this mod hoping to recover some of the increase in load I saw after upgrading from 3.0.10 to 3.6.5.

But this mod didn't help. The templates directory has 230 files making up 7.2MB of templates in it and APC shows what looks to be all of those being stored in its cache. So it is running.

However, cricket (and the scripts feeding cricket) show no discernable difference from before installing this mod and afterwards. See the attached picture. The green is the length of time in milliseconds it takes to get /forum/index.php. The red is the number of people currently browsing the forum (including guests, 15 minute timeout). You can see the big uptick in green last weekend, that was the upgrade to 3.6.5. We spent the week being slow. Easter weekend was dead for us, during which I installed this mod. Then yesterday was back to being slow.

I guess its time to upgrade hardware.

orban 04-10-2007 11:54 AM

Do you have graphs of your server load? And MySQL load?

Also forum/index.php isn't the best choice, try showthread/forumdisplay...

What kind of server are you running this on?

amcd 04-10-2007 12:31 PM

What did you use to get that graph?

bigbadbob0 04-10-2007 01:10 PM

I've sent orban the server hosting these graphs for him to look at the other metrics I monitor, I don't like having them public.

As I told him, I started monitoring forumdisplay but only after my upgrade to 3.6.5. Oops.

The web and db server are both FreeBSD 5.2.

bigbadbob0 04-10-2007 01:17 PM

Quote:

Originally Posted by amcd (Post 1224127)
What did you use to get that graph?

The software that manages keeping track of the data and generating the graphs is called Cricket. It's similar to MRTG if you've heard of that. http://cricket.sourceforge.net/

Once you get cricket setup and actually working (not the easiest thing to do) you can branch off of the example http performance demos and add in a datasource to keep the number of users online right now.

The script I use to get the number of users is:

Code:

#!/bin/sh

num_users_line=`fetch -o - http://www.mysite.com/forum 2>/dev/null | grep "Currently Active"`                                                         
echo `echo "$num_users_line" | perl -e 'while(<>){print $1 if m/: (\d+)/;}'`

If you actually get cricket up and running (or someone does) and wants me to share the cricket conf I use to get that particular graph I'd be happy to share.

|Jordan| 04-11-2007 05:45 PM

My cache keeps getting corrupt every few days. Specifically in the way it handles javascript. All my javascripts stop working and page elements get removed as a result.

Why is this happening?

orban 04-11-2007 05:51 PM

Were you editing templates before they broke?

|Jordan| 04-11-2007 06:22 PM

Yes, but then i deleted all the cached files. And then about a day later they broke again without me changing anything.

orban 04-11-2007 06:24 PM

You seem to be running *a lot* of modifications, which makes it kinda hard to debug... :/

|Jordan| 04-11-2007 06:48 PM

Yea, i know, i kinda went crazy on the modifications (70 of them :O).

cobby 04-20-2007 04:51 PM

Excellent mod orban, it's saved alot of people alot of resources & load times.

I've read the whole thread and have 1 nagging question, it was asked pages back and didn't get resolved.

I'm using the Display Count of Unread Posts in Welcome Box mod.

However when using "Cache Templates Seperately" the above mod fails to display. I've tried excluding "Navbar" from cache but this doesn't work.

If i use your mod with Cache Templates Seperately off, there is little to no improvement on my configuration, but with this enabled page loads are lightning fast.

Is there anything to do to enable the use of both together? I DESPERATELY want to cache templates seperately, but alot of members (myself included) don't want to loose this other mod.

Thanks for your ongoing support for this great mod.

orban 04-24-2007 12:32 PM

Try to exclude "navbar" not "Navbar"

bmanzzz 04-29-2007 09:12 AM

i love this Plugin
is there any thing else i can install that would improve the performance and reduce the load ?

yaworski 05-21-2007 09:13 AM

bmanzzz if you have access to the shell on the server where you have your forum you can compile and run memcache server and configure your forum to use it in config.php :).

bjornstrom 05-23-2007 08:12 PM

We're running 4 loadbalanced webservers and one dedicated MySQL - will I run into problems with this mod?

orban 05-25-2007 06:56 PM

I don't know bjornstrom I don't have experience with that setup.

There will probably an issue with clearing the cache so you'd have to do that manually.

amcd 05-26-2007 01:36 AM

I am running a multiple webserver setup. Earlier I had the cache directory set on the NFS, and there were issues with random template corruption in the cache. Now I have the cache directory set to a local address on each webserver, and it is a pain. Whenever a template is edited, I have to manually clear the cache on each webserver.

I am seriously thinking about caching the templates in memcache, but could not find a mod for that. Looks like I will have to start with this mod and adapt it to memcache.

orban 05-26-2007 09:14 AM

Well if you store templates in memcache you can't have them cached by xcache/etc so that's why I haven't added that.

amcd 05-26-2007 10:30 AM

I am aware that storing them in memcache means more processing time on the webservers, but at least it will be better than the default, and I will not have to refresh the templates manually. And hopefully it will not have the instability which I was having with the cache on NFS.

aj8690 05-27-2007 01:25 PM

Thank you very much. My forum is small but there is now a big difference in loading on my homepage. I guess because it calls so many templates. (vbadvanced).

I'm using vbseo and that works well, too. Thanks.

Thanks.

InfoSpyware 06-01-2007 03:53 PM

Excellent mod orban :up:

Quote:

Originally Posted by orban
"Stable"

I got a ton of feedback and it seems to run on nearly all installations. Even with vBSeo some users reporting...

I'm using vB 3.6.7 PL1 + vBSEO 3.0.0 Gold, and I have a problem in one function the vBSEO.

If active the mod, this function does not work: Display Permalink in Postbit content

Any idea about what's going on?

Thanks for the help.

Salu2

orban 06-01-2007 03:58 PM

Sorry I don't have access to a vBSEO installation, but can you maybe try to exclude the postbit / postbit_legacy (?) templates?

InfoSpyware 06-01-2007 05:01 PM

Quote:

Originally Posted by orban (Post 1259177)
Sorry I don't have access to a vBSEO installation, but can you maybe try to exclude the postbit / postbit_legacy (?) templates?

Work good now :up: :D

Thanks.

lazytown 06-24-2007 06:54 AM

So far so good -- thank you orban. Hopefully I'll see lower loads. I'm running the latest plugin install (from your first mod post -- not the experimental version) along with xcache.

I run the latest photopost vbgallery (2.2) (as well as vbseo, vbjournal and a few minor mods). The only thing so far I had to disable was forumhome and the gallery home. Without doing that, the latest 5 pictures would not show up on the forumhome nor the gallery home (that section was missing).

edit: I also had to disable "navbar" in order to get the links to work properly in the gallery (which is not within the forum folder).. I guess I could use absolute links if I really wanted to. Navbar seems pretty big -- big performance hit for disabling that?

How much of a hit am I taking by disabling forumhome? If it's big, do you think there is any way to still get those pictures to display without disabling the forumhome template? If I could get that working, I guess I could try your experimental version -- how much better is it?

Would this mod conflict in any way with the xcache datacache mod (https://vborg.vbsupport.ru/showthread.php?t=141005) ? Is it a good idea to run them together?

Thanks again
-vissa

orban 06-24-2007 09:51 AM

"xcache datacache mod" caches the datastore with xcache, you can use them together without any problem

about the plugins...

if you know a bit of php you can replace the str_replaces on the templates with actual variables

str_replace('someting in the template', $new_stuff, $template)

->

add "$new_stuff" to the template and remove the str_replace

MissKalunji 06-24-2007 08:03 PM

Quote:

Originally Posted by vissa (Post 1275188)
So far so good -- thank you orban. Hopefully I'll see lower loads. I'm running the latest plugin install (from your first mod post -- not the experimental version) along with xcache.

I run the latest photopost vbgallery (2.2) (as well as vbseo, vbjournal and a few minor mods). The only thing so far I had to disable was forumhome and the gallery home. Without doing that, the latest 5 pictures would not show up on the forumhome nor the gallery home (that section was missing).

edit: I also had to disable "navbar" in order to get the links to work properly in the gallery (which is not within the forum folder).. I guess I could use absolute links if I really wanted to. Navbar seems pretty big -- big performance hit for disabling that?

How much of a hit am I taking by disabling forumhome? If it's big, do you think there is any way to still get those pictures to display without disabling the forumhome template? If I could get that working, I guess I could try your experimental version -- how much better is it?

Would this mod conflict in any way with the xcache datacache mod (https://vborg.vbsupport.ru/showthread.php?t=141005) ? Is it a good idea to run them together?

Thanks again
-vissa

Quote:

Originally Posted by orban (Post 1275253)
"xcache datacache mod" caches the datastore with xcache, you can use them together without any problem

about the plugins...

if you know a bit of php you can replace the str_replaces on the templates with actual variables

str_replace('someting in the template', $new_stuff, $template)

->

add "$new_stuff" to the template and remove the str_replace

Im having the same problem as well

rootnik 06-26-2007 09:47 PM

Just a tip for vbadvanced users who do not have their portal in the root vbulletin directory...

Add header and headinclude to "Exclude Templates" part of this product's options. It will take care of allot of the problems you are having.

orban 07-04-2007 10:14 PM

vissa/MissKalunji: Link the the addon here and I'll write you a fix.

Hopefully more and more addons will start using template hooks so this issue will be gone once for all.

Yellow Slider 07-06-2007 11:18 AM

I've installed it, the page generation time as decreased, BUT..
the browsing between the forum is kind of slow, and it some times have a delay time when browsing the forum, what may be the problem? when there is a delay the debug mode shows that the page was generated on a normal time, and this is weird .. cous there is an unexplained delay .. can you help me please?

orban 07-06-2007 11:19 AM

Are you on a shared host or a dedicated server and how many users do you have online?

Yellow Slider 07-06-2007 11:45 AM

I'm on a dedicated server, I have 600 users online in 3600 sec' ..

amcd 07-06-2007 12:10 PM

visit the server optimization forum on vbulletin.com

Yellow Slider 07-06-2007 12:26 PM

my server is well optimized..

orban 07-06-2007 12:28 PM

"when there is a delay the debug mode shows that the page was generated on a normal time, and this is weird .. cous there is an unexplained delay"

I don't really understand that...

Yellow Slider 07-06-2007 09:47 PM

crawl my site, you'll understand (it's in hebrew.. )
The index is not normal, all the names you are seeing are forums..
www.atraf-f.net

jthorpe 07-06-2007 11:36 PM

I just installed this on my site and so far so good. It's only been running for a few minutes but initial testing looks good. I see a lot of files in the templates directory. Site seems very fast with about 1000 users on right now. I'll give it some time tonight and see how it goes. I have cacti running on my machines watching everything include MySql so I'm curious if I'll see anything promising on the graphs.

I have eAccellerator as well so I'm going to be checking up on that. What do I look for there?

orban 07-06-2007 11:38 PM

I haven't used eAcc in a long time but in xcache you show a list of all files that are being cached...

jthorpe 07-06-2007 11:45 PM

ok, in eAccellerator I can see both my photopost templates and my classifieds templates being cached, but I don't see anything from VB other than the normal php files. I will give it a while and clear out expired scripts to give it some room. Thanks for the quick response. I'm looking at Cacti right now and I'm seeing a good 40% drop in CPU load as we speak. I also watched my Load Average drop from 2.4 down to 0.5 in about 5 minutes. So far so good.

-----

on edit:

Ok, I just checked again, and all of the templates are in eAccel now. Everything going smooth and the server is sleeping!!! I need to put you on the payroll. GOOD STUFF, and thank you!


All times are GMT. The time now is 11:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01602 seconds
  • Memory Usage 1,826KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete