Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
vB Accelerator Details »»
vB Accelerator
Version: 0.4, by Vitaly Vitaly is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.8.x Rating:
Released: 03-06-2009 Last Update: 03-09-2009 Installs: 87
Uses Plugins Auto-Templates
Re-useable Code  
No support by the author.

vb 4.0 version here

This mod is suited for medium and big boards. It reduces server load, caused by thumnails and big attachments.

what's the problem with?
  1. In original vB all thumbnails a downloaded via php. So, if you page contains 10-20 attached images, then each page php request will be followed by 10-20 thumbnails php requests. That's very bad.
  2. When attachments body transfered via php, that's much more waisteful, than direct transfer of static file. Especially for big files.
what this mod does:
  1. All thumbnails will have DIRECT links (served as static files). Much lower reply latency and server load.
  2. If you have nginx webserver, you php-fcgi will not participate in file transfer any more. It will reply with X-Accel-Redirect header. Then nginx will proceed attachment as static file.
    • No more problems with multiple downloads of 10-mb files.
    • No needs to restrict attachments and full-size images for guests and search bots.
  3. That works for forum posts, blogs, albums. Everywhere!
how to install:
  1. Make sure, this files are stored on disk, NOT in database:
    • post attachments & thumbnails
    • blog attachments & thumbnails
    • album images & thumbnails
  2. Make sure, that thumbnails are in web-accessible area. If not - reconfigure your web-server first. If you own big board - then you know how to do that .
  3. Check manually, that you can download any .thumb file via browser.
  4. Import this product, and set options for you configuration.
  5. Be happy to reduce server count in your cluster
PS. It's tested and works fine at my production site for 1 week. But I'll be happy to know server load statistics from big boards owners.

This mod is developped here: http://github.com/rcdesign/vb-accelerator . Patches are welcome.

History

0.4
- fixed bug with PHP wagnings in server logs.

0.3
- first public release

Download Now

File Type: xml product-vb_accelerator.xml (12.8 KB, 535 views)

Screenshots

File Type: gif vbaccelerator.gif (42.9 KB, 0 views)

Supporters / CoAuthors

    Show Your Support

    • This modification may not be copied, reproduced or published elsewhere without author's permission.

    Comments
      #42  
    Old 05-20-2009, 05:37 PM
    mindhunter77 mindhunter77 is offline
     
    Join Date: Jan 2006
    Posts: 194
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Quote:
    1. Check that thumbnails are accessible via www (type URL to any thumbnail in browres path). Browser should offer to download file or to show thumbnail (if youcared about mime type)
    This is part of my issue, I got nginx running, that was pretty easy, but for some reason I can not access thumbs via the browser, I disabled vbseo attachments, chmod 777, but still no go.
    Reply With Quote
      #43  
    Old 05-20-2009, 05:57 PM
    Vitaly's Avatar
    Vitaly Vitaly is offline
     
    Join Date: Apr 2004
    Location: Russia, St.Petersburg
    Posts: 428
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    I think, this page contains whe most actual resources, if you have troubles with nginx configuration:

    http://nginx.net/

    There are some links, where you can ask any questions about nginx in english.
    Reply With Quote
      #44  
    Old 05-21-2009, 05:11 PM
    mindhunter77 mindhunter77 is offline
     
    Join Date: Jan 2006
    Posts: 194
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Everything seems to be working on my site now, it's just when I check the headers when I go to vist an image I get this

    Code:
    http://www.xxxxxxxx.com/forum/uploadedimages/1/38251.thumb?d=1236711928

    Notice the
    Code:
    ?d=1236711928
    Does that mean it's not working and something is wrong?
    Reply With Quote
      #45  
    Old 05-21-2009, 05:54 PM
    Vitaly's Avatar
    Vitaly Vitaly is offline
     
    Join Date: Apr 2004
    Location: Russia, St.Petersburg
    Posts: 428
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Quote:
    Originally Posted by mindhunter77 View Post
    Does that mean it's not working and something is wrong?
    Thhat's ok. Don't care.

    ?d=XXX - timestamp, used to refresh browser cache, if you update image. It's generated by vB and left intact for compatibility reasons.
    Reply With Quote
      #46  
    Old 05-21-2009, 06:04 PM
    mindhunter77 mindhunter77 is offline
     
    Join Date: Jan 2006
    Posts: 194
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    ok great then, looks like I got this working...

    I will try and help anyone else if I can, so if you have a question ask..
    Reply With Quote
      #47  
    Old 05-21-2009, 06:12 PM
    mindhunter77 mindhunter77 is offline
     
    Join Date: Jan 2006
    Posts: 194
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    Oh, by the way, vitaly I was able to still use vbseo on attachments as well =)
    Reply With Quote
      #48  
    Old 05-21-2009, 07:26 PM
    Vitaly's Avatar
    Vitaly Vitaly is offline
     
    Join Date: Apr 2004
    Location: Russia, St.Petersburg
    Posts: 428
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    You mean, "attachments rewrite" vbseo options? I din't checked it at all, because don't use it (that option is off in my vbseo config).

    Anyway, check twice, that your nginx config has separate "location" for thumbnails, and that this location stays before vbseo location. For example, you can temporary add deny rule for thumbnails location, to check that it's really catched.

    vbseo php code should NOT be called for direct thumbnail links. Or you'll get no benefits from this mod.

    Mod idea is:
    - minimise php calls (no calls for thumbnails at all)
    - minimise useless data transfer (can make sense for big attachments)
    Reply With Quote
      #49  
    Old 05-21-2009, 07:51 PM
    mindhunter77 mindhunter77 is offline
     
    Join Date: Jan 2006
    Posts: 194
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    It strange, I have rewrites enabled for attachments, yet everything works. My headers are showing that they are coming through as direct links like

    Code:
    http://www.xxxxxxxx.com/forum/uploadedimages/1/38251.thumb?d=1236711928
    I must be doing something wrong then lol,
    Reply With Quote
      #50  
    Old 05-21-2009, 09:28 PM
    mindhunter77 mindhunter77 is offline
     
    Join Date: Jan 2006
    Posts: 194
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    vitaly,

    can you think of a good way to tell if this is working? I disabled vbseo attachment rewrites, and it still appears to be working, thumbnails are showing up, but is there a way to test if it's actually doing what it's superposed to?
    Reply With Quote
      #51  
    Old 05-21-2009, 09:49 PM
    Vitaly's Avatar
    Vitaly Vitaly is offline
     
    Join Date: Apr 2004
    Location: Russia, St.Petersburg
    Posts: 428
    Благодарил(а): 0 раз(а)
    Поблагодарили: 0 раз(а) в 0 сообщениях
    Default

    If you turned on "nginx acceleration option", then it's ok.

    If you wish to check thumbnails - add "deny all" to thumbnails location from nginx config (see sample from first post). If thumbnails disappears - then all is ok, roll back your nginx config. If thumbnails still shown - then they goes via vbseo rewrite rules and you have to fix nginx config. See my previous recommendation.

    The last way to check - turn mod off when server is loaded and check load difference. ~20% in my case. Of cause, if you have few attachments, there will be no difference at all.

    VBSEO itself doesn't affect bebefits of this mod, if you've managed to get direct links to thumbnails and proper nginx config. But I've not checked combination with "attachments rewrite" option, so, can't comment if it conflicts with this mod or not.
    Reply With Quote
    Reply

    Thread Tools

    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 06:44 PM.


    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.04452 seconds
    • Memory Usage 2,335KB
    • Queries Executed 27 (?)
    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
    • (3)bbcode_code
    • (2)bbcode_quote
    • (1)footer
    • (1)forumjump
    • (1)forumrules
    • (1)gobutton
    • (1)header
    • (1)headinclude
    • (1)modsystem_post
    • (1)navbar
    • (4)navbar_link
    • (120)option
    • (1)pagenav
    • (1)pagenav_curpage
    • (4)pagenav_pagelink
    • (11)post_thanks_box
    • (11)post_thanks_button
    • (1)post_thanks_javascript
    • (1)post_thanks_navbar_search
    • (11)post_thanks_postbit_info
    • (10)postbit
    • (2)postbit_attachment
    • (11)postbit_onlinestatus
    • (11)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_attachment
    • postbit_display_complete
    • post_thanks_function_can_thank_this_post_start
    • pagenav_page
    • pagenav_complete
    • tag_fetchbit_complete
    • forumrules
    • navbits
    • navbits_complete
    • showthread_complete