Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to Optimize vBulletin for Less Server Load

    1. How to Optimize vBulletin for Less Server Load

      How to Optimize vBulletin for Less Server Load

      By: (Administrator) Tempus is offline 24th Dec 2011 23:29
      Rating: 
      Couple of month’s back I did a long list of things about the forum speed. Let me share the same list in details here. This not only will help others but will also help me in making list of things to be done for optimizing large forums.
      1. Move Attachments and Images to File System

      By Default vBulletin have Attachments / Images / Avatars all are stored into Database. You need to make sure you move them to files.

      1. Admin CP > Attachments > Attachment Storage Type
      2. Admin CP > User Albums > Album Picture Storage Type
      3. Admin CP > Avatars > User Picture Storage Type

      2. Store CSS StyleSheets as Files

      vBulletin by default renders the CSS in head part of HTML and this in turn increases the size of each page. Just storing CSS as a file not only reduces the code from each page but also allows caching of the CSS file. Apart from the editable CSS vBulletin also adds an extra CSS file clientscript/vbulletin_important.css and you can copy the content of the file into your vBulletin CSS editor to make sure you have only one CSS file to save an additional server query.
      You can even go one step forward and copy the content of the CSS file generated from your vBulletin interface and minimize CSS and then upload to your server and link it.

      3. Reduce HTML for guest (or otherwise)

      Lot of HTML can be avoided to render your pages much faster and reduce server load. Let me get into each of them one by one.


      1. Disable Forum Jump Menu – I have Forum Jump Menu disabled for guests using vbSEO but if you are not using vbSEO you can disable forum jump completely from Admin CP. I am sure not many of your forum users use forum jump menu. The best thing is to try and turn it off and see if any body reports that they are missing it. If no one reports, you can safely assume no one cared about using it either. Forum jump actually causes the server to work harder to generate the menu and then uses the bandwidth to display it on each page load. You can change forum jump options from Admin CP > vBulletin Options -> General Settings -> Use Forum Jump Menu.
      2. Disable Posting Rules – Posting rules at the bottom of every thread and forum pages does not help much and adds mainly to the final HTML. There is no option in vBulletin to disable it and so you need to edit one single template to disable the posting rules. I have disabled it for guests only on Go4Expert.com but you can even disable it completely. To disable posting rules for guests edit the forumrules template and add the following at the top.
      <if condition=”$show[member]“>
      And at the end of the template add
      </if>
      Posting rules will only show to members and not to guests. You can completely empty the template and it will not show.
      3. Disable username menu for guests on showthread pages – Showthread page shows post and each post has a username but when you click on those username it loads a popup menu and ideally that menu is rarely of any use to guests because by default users have the email to members off and PM is only for members and so if you want you can turn those menu off for guests. vBSEO provides that as an option.
      4. Disable who is online for guests – Edit the usergroup ( Admin CP > Usergroups > Usergroup Manager ) called “Unregistered / Not Logged In” and Set “Can View Who’s Online” to off.
      5. Disable Template Name in HTML Comments – More comments in HTML means more time browser will need to download the html and render to user and so ideally on your live server you should have template name in html comments turned off.
      Admin CP > vBulletin Options > vBulletin options > General Settings > and select No for Add Template Name in HTML Comments.


      4. Limit Spider Activity

      If you want to save on your bandwidth you should have robots.txt file to restrict areas of forums you don’t have much for spiders.
      User-agent: *
      Disallow: /admincp/
      Disallow: /images/
      Disallow: /modcp/
      Disallow: /attachment.php
      Disallow: /search.php
      Disallow: /newreply.php
      Disallow: /newthread.php
      Disallow: /editpost.php
      Disallow: /profile.php
      Disallow: /register.php
      Disallow: /login.php
      Disallow: /subscription.php
      Disallow: /private.php
      Disallow: /report.php
      Disallow: /sendmessage.php
      Disallow: /memberlist.php
      Disallow: /misc.php
      Disallow: /moderator.php
      Disallow: /postings.php
      Disallow: /sendtofriend.php
      Disallow: /threadrate.php
      Disallow: /usercp.php
      Disallow: /showgroups.php


      5. Compress Output (GZIP)

      vBulletin provides compression for HTML output but I prefer to get it done through Apache via mod_deflate. Disable Zipped output in vBulletin.
      vBulletin Options -> Cookies and HTTP Header Options -> GZIP HTML Output
      And add the following lines to your httpd.conf file in Apache.

      Code:
      Only registered members can view code.
      Restart Apache web server. Additionally you should also use Apache to cache static content.


      6. Install APC/XCache/eAccelerator on your server

      I prefer CentOS on my server and vBulletin recommends APC for CentOS vBulletin combo. Refer an article my Floris about how to install APC on CentOS
      7. Full Text Search Type

      If you have MySQL 4.0.x you can use this option to greatly reduce server load when a search query is used on your server.
      Admin CP > vBulletin Options > Search Type
      Remember that the change itself is a heavy process as it needs to alter the vBulletin post and thread table. If you don’t have many searches avoid such a heavy query right at this moment.


      8. Optimal vBulletin Options


      • Enable All AJAX features – Make sure that this is set to allow all AJAX Features. Ajax helps reduce server load by not reloading a page where AJAX can be used. (Quick Reply for instance) > General Settings -> Disable AJAX Features and select Enable All Ajax Features.
      • Cookies and HTTP Header Options > Remove Redirection Message Pages – I personally have not disabled it for Go4Expert.com but for my client I had to put this off to save on an unneeded page load and bandwidth.
      • Cookies and HTTP Header Options > Add No-Cache HTTP Headers – Make sure you don’t opt for No-Cache setting and so set this to No.
      • Server Settings and Optimization Options > Cached Posts Lifespan – If you have no issues with space on your server setting this to higher value is recommended. I have this set to 10 days and once you turn this on rebuild your Post Cache under Maintenance > Update Counters
      • Server Settings and Optimization Options > Update Thread Views Immediately – Set this to No. This will update thread views via a cron every 1 hour by default. If you wish to change this you can do so by editing the Scheduled Task for Thread Views to a different time.
      • Server Settings and Optimization Options > Update Attachment Views Immediately – Set to No.
      • User Listing & Profile Viewing > Show Last Post on Profile Page – This is very server intensive process and so set this to No.
      • Message Posting and Editing Options > Quick Reply – Not only does this make posting faster which leads to more posts being made this also uses Ajax which means you do not have to load another page to make a post.
      • Message Posting and Editing Options > Quick Edit – Turn this on to reduce the need for a new page reload when someone simply wants to edit a post.
      • Message Searching Options > Minimum Time Between Searches – Set this to some value mainly to avoid an attempt to use the search to harm your server.
      • Forums Home Page Options > Display Logged in Users? – I have mine set to Yes but if you have issues with server load you can turn this feature off.
      • Forum Display Options > Show Users Browsing Forums – I have mine set to No and if you have issues with server load you can turn this feature off.
      • Thread Display Options > Show Users Browsing Threads – I have mine set to No for similar reasons as above.
      • Forum Display Options > Maximum Displayed Threads Before Page Split – Having too many threads on a single page makes the page load slowly and so ideally you should have the value 20 or 40. I have this set to 20.

      9. Use vbOptimize
  • #2
    Junior Member
    Click to Expand
    Join Date
    May 2012
    Posts
    4
    Likes
    0
    Liked 0 Times in 0 Posts
    nice tips - remind me how you exactly do step 4?

  • #3
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,183
    vB Version
    4.2.x
    Likes
    1,790
    Liked 1,730 Times in 988 Posts
    Gender
    Male
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  • #4
    Junior Member
    Click to Expand
    Join Date
    Sep 2012
    Posts
    9
    vB Version
    4.2.x
    Likes
    17
    Liked 4 Times in 2 Posts
    Hello mate

    Nice Tips

    How to stop spider baidu Thank you in advance

  • #5
    Junior Member
    Click to Expand
    Join Date
    Jul 2012
    Posts
    11
    vB Version
    4.2.x
    Likes
    1
    Liked 1 Time in 1 Post
    if you have mod_write on your apache enabled, add this to your .HTACCESS :

    RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^baiduspider [NC] RewriteRule .* - [F]

    or add this to your httpd.conf


    SetEnvIfNoCase User-Agent "^Baidu" bad_bot
    <Directory />
    Order Allow,Deny
    Allow from all
    Deny from env=bad_bot
    </Directory>

  • #6
    Member bouncer's Avatar
    Click to Expand
    Join Date
    Oct 2012
    Posts
    78
    vB Version
    4.2.x
    Likes
    10
    Liked 82 Times in 42 Posts
    Gender
    Male

    A couple of things I have picked up ...

    Code:
    Only registered members can view code.
    1. Add to top of template headinclude (perhaps someone could explain exactly what this does)

    Code:
    Only registered members can view code.
    2. Change borders from round to rectangular

    Add to template
    Code:
    Only registered members can view code.
    Code:
    Only registered members can view code.
    See attached for border example that I found here.
    Attached Images Attached Images

  • #7
    Junior Member
    Click to Expand
    Join Date
    Oct 2012
    Posts
    11
    vB Version
    4.2.x
    Likes
    10
    Liked 6 Times in 5 Posts
    Only registered members can view quoted posts.
    add this to the robots.txt

    Only registered members can view quoted posts.

  • #8
    Administrator ChiNa's Avatar
    Click to Expand
    Join Date
    Jul 2012
    Posts
    749
    vB Version
    3.8.x
    Likes
    704
    Liked 693 Times in 407 Posts
    Gender
    Male

    Here we go, for the Explanation

    Only registered members can view quoted posts.
    @bouncer and @everyone else: I wanna take the chance and explain what this does! It does not save server load in real time, but but what it does is very tricky,, read it below or in here that i posted a few month ago: View topic - (Fake Page Load Trick) (HTML) For Forum & Site Owners ...

    I have made a few Tutorials about it, hopefully I can past a few others as well

    My Explanation:


    This is neither a code or a script... Its just basic html code, which is fake, but with blink of an
    eye, you will think this works.. Well this trick make the users of your website think that entering a page or a website is going faster.. What this code does, when you Example visit "youtube.com" it will first load the images, and then show the whole content......... But what this code does, which is another Ajax trick is, when you enter a website like google, this code will take a fast Screenshot, and show it to you, untill the rest of the page loads.. It is something i found online, and here is the real explanation...

    First the Code to add in your HEADER Template in most cases, (Add at the top of all content)

    Code:

    Only registered members can view quoted posts.
    Explanation:

    How does it work?

    When a page posts back (for example when you click a button on a form), it normally causes a screen flicker as the page is redrawn. In a lot of cases the screen that is redrawn is very similar to the previous screen, and the flicker is an annoyance, disrupting the user's experience. The Blendtrans function causes the old page to blend smoothly into the new one, rather than flickering.

    A lot of the time, this gives an identical effect to an ajax style http request. The page appears to have stood absolutely still as just one part of it is updated.

    This simple trick alone gives you about 50% of the benefit of ajax, with a 1% of the effort. Having said that, it's absolutely limited to that one visual benefit, and limited to one browser.

    by ChiNa-Man
    Notice: Some of the Mods and Addons Published on vBMods are for Testing and Educational purposes only. We/vBMods are not the Developers of these Products.The Credits goes to the Original Developer. If you find it helpfull then feel free to Comment or Share the Link. Be also aware that some of the products may be a Trial Version. To support the Developers feel free to Purchase the Full Version. Thank you.

  • #9
    Member sharpie's Avatar
    Click to Expand
    Join Date
    Mar 2016
    Posts
    45
    vB Version
    4.2.x
    Likes
    25
    Liked 14 Times in 11 Posts
    Gender
    Male
    vbOptimize where can i find these mod please thanks

  • #10
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,183
    vB Version
    4.2.x
    Likes
    1,790
    Liked 1,730 Times in 988 Posts
    Gender
    Male
    Only registered members can view quoted posts.
    See that box on the bottom right corner of every page? The little white one with the word "SEARCH" above it? That's where you search for these things.

    http://vbulletin-mods.com/forum/showthread.php?t=4091
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. HELP
      Ajax Load More Error
      By Zombie_Nation in forum Requests & Help
      Replies: 4
      Last Post: 4th Jan 2016, 16:18
    2. [OzzModz] Server Load Stats on Who's Online
      By Tempus in forum vBulletin 4.x Add-ons
      Replies: 1
      Last Post: 2nd Jul 2015, 15:53

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •