Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2003, 10:55 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Optimizing your forums...

Most of us who visit vb.org have forums that are no longer stock. Some hacks, for as cool as they are, will increase the server load via additional queries and other means. But by the same token there are also certain standard features that are resource hogs for whatever reason. This is by no means a criticiszm on VB or anyone who writes hacks. I love VBulletin and I have the utmost respect for all hackers.

I have always been faced with the dilemma of high server loads with my forum. And I have a large number of hacks installed that I either got from vb.org or created it myself. I am limited by the hardware that runs my board. During peak times I have had occasional load spikes of 25-30 and they are usually averaging aroung 10-15.

I used FireFly's hack to selectively disable features of my board at high server loads and I added on a whole bunch of other features to his hack to be able to keep the board up without too many hiccups.

I have rewritten some of my hacks to make them server friendly at high loads. And recently I began analyzing the other hacks and the standard features of VB to see if I can squeeze out more horsepower out of them.

I must also add that I am currently at 715,000 posts in my forums. And this number is growing by 2000-3000 per day.

Things I have discovered so far:

I have the thread preview hack. Everyone including myself loves this hack and if I were to uninstall it, my members would kill me. I did some analysis on the code, I rewrote it and now my forum pages are loading much much faster than they originally were.

The black dots next to the threads are the devil. There is one query into the post table per thread in forumdisplay.php to determine whether you posted in a thread or not. At 700,000+ posts, this is killing my forums. So I added to FireFly's load balancing hack and I am diabling this feature when the load goes past 10.

So far the above mentioned hakcs have just helped me with the forum display. But users must also read the threads and I realized that per each thread page, there are 3 queries made into the post table to display the contents of a thread.

I managed to divert one query to the thread table, which in terms of count is about 10% of the post table, and in terms of size it is about 10%-15% of the physical size of the post table. As for the 2 other queries, I was able to combine them into 1 query and still maintain original functionality. Now I have one query into the thread table and only one query into the post table.

But ultimately, my threads are loading lightning fast even when the server loads are in the low teens. Such speeds was only seen during the graveyard shift hours of the forums.

I don' t know if anyone would be interested in the thread view optimizations that I did. But I am also wondering if anyone else has done anything to optimize their forums.

Any feedback on this will be greatly appreciated.
Reply With Quote
  #2  
Old 07-24-2003, 11:57 PM
Xelation's Avatar
Xelation Xelation is offline
 
Join Date: Jan 2002
Location: Buffalo, New York
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wouldnt mind having a thread view optimization hack
Reply With Quote
  #3  
Old 07-25-2003, 02:11 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What I did was upgrade to vB3, which incorporates some things like thread preview, but it comes highly optimized already. It's got deferred thread views, attachment views, etc. all inbuilt.

When I ported some of my custom hacks over, I've had to modify the code of the hacks substantially to make them better as they pushed the stock vB3 load higher. I've learned never to use anyone else's code without checking it through and optimizing it first. So far, the loads for my vB3 is high at peak times (around 5) but that's with 500 people online at once.
Reply With Quote
  #4  
Old 07-25-2003, 09:57 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are already some hacks out which just optimize vb2.
for example the dotjoin hack by pwrsneek, the cached threadviews by ??, optimization of forumhome by myself and anotherone by filburt.

so i'm sure a threadoptimization hack would be very good if you'd release it
Reply With Quote
  #5  
Old 07-25-2003, 02:04 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add an index to the post-table - that did wonders for me

- miSt
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:02 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.13282 seconds
  • Memory Usage 2,194KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete