Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

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

Category: Board Optimization - Version: 4.0.x Rating:
Released: 06-10-2010 Last Update: 10-21-2010 Installs: 53
Uses Plugins
Re-useable Code  
No support by the author.

ported & significantly improved vb 3.8 branch.

This mod is suited for medium and big boards. It reduces server load, caused by thumnails and big attachments. Includes significant recommendations for server tuning, to speedup pages loading.

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.
  3. Browser does lots of additional requests to static file, to check if modified
  4. JS/CSS not compressed
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. Static files are properly cached/compressed after tuning
how to install:
  1. Make sure, attachments are stored on disk, NOT in database.
  2. Make sure, that thumbnails are in web-accessible area. If not - reconfigure your web-server first.
  3. Check manually, that you can download any .thumb file via browser.
  4. !!! Tune cache/compression settings for static files (see example from next post)
  5. Import product XML & tune settings.
  6. Enjoy
This mod is developped here: http://github.com/rcdesign/vb-accelerator . Patches are welcome.

history:

0.9
- fixed path for duplicated attachments

0.8
- fixed back timestamp parameter & substitutions for XML output
- added conversion for assets.php thumbnails (in attachments manager)

0.7
- ported to vb4
- added basic CDN support for thumbnails

Download Now

File Type: xml product-vb_accelerator.xml (12.7 KB, 255 views)

Screenshots

File Type: png vba.png (52.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
DeMonViTo

Comments
  #52  
Old 12-29-2010, 12:52 PM
CMSTemplateZ CMSTemplateZ is offline
 
Join Date: Jun 2010
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work ive got a board that is slowly growing bigger, this is good to know something like this is available.
Reply With Quote
  #53  
Old 12-29-2010, 01:18 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 punchbowl View Post
Do attachments have to be in a publicly available area for this to work e.g.
?
thumbnails should be available via www
Reply With Quote
  #54  
Old 12-31-2010, 09:54 AM
punchbowl punchbowl is offline
 
Join Date: Nov 2006
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for being stupid Vitaly but I see no separate setting for storing attachment thumbnails in one place and attachments in another? Will I have to move the attachment directory into www or am I missing something?

Am I right in saying that having attachment in www means that private attachments will be public?

Thanks
Reply With Quote
  #55  
Old 12-31-2010, 10:19 AM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See example from second post https://vborg.vbsupport.ru/showpost....04&postcount=2 , how to tune nginx. I don't understand your problem.
Reply With Quote
  #56  
Old 12-31-2010, 10:24 AM
punchbowl punchbowl is offline
 
Join Date: Nov 2006
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry I'm new to nginx. I didn't understand the "internal" directive. Wow nginx just gets better and better. Cheers and thank you for your patience!
Reply With Quote
  #57  
Old 12-31-2010, 11:17 AM
punchbowl punchbowl is offline
 
Join Date: Nov 2006
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope - can't get it working, when I enable I get no images loading. Disabling makes it ok.

I have attachments @ /srv/www/domain.com/public_html/attach

I have domain.com thus:

Code:
server {
    listen   80;
	  client_max_body_size 2M;
    server_name www.domain.com domain.com;
    access_log /srv/www/domain.com/logs/access.log;
    error_log /srv/www/domain.com/logs/error.log;

    location / {
        root   /srv/www/domain.com/public_html;
        index  index.php index.html index.htm;
    }
		
		# globally disable external access to attachments, but enable for X-Accel-Redirect
location /attach {
    internal;
}
# enable thumbnails direct access, but nothing else!
location ~* /attach/(.*)\.thumb$ {
    expires 24h;
}


location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param  SCRIPT_FILENAME  /srv/www/domain.com/public_html$fastcgi_script_name;
				fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
    }
		}
in admincp I have path to attachements: /attach

cdn: blank

and

Enable large downloads acceleration: ticked yes

edit: I get a 404 for http://www.domain.com/attach/9/226.thumb
Reply With Quote
  #58  
Old 02-01-2011, 11:55 AM
acha3ir.net acha3ir.net is offline
 
Join Date: Nov 2009
Location: The heart of my wife
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the excellent work
Reply With Quote
  #59  
Old 03-17-2011, 07:57 PM
ImmortalForums ImmortalForums is offline
 
Join Date: Feb 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This breaks images inside quote boxes with just the cdn enabled.
Reply With Quote
  #60  
Old 03-17-2011, 08:01 PM
Vitaly's Avatar
Vitaly Vitaly is offline
 
Join Date: Apr 2004
Location: Russia, St.Petersburg
Posts: 428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please, provide more details.
Reply With Quote
  #61  
Old 03-19-2011, 06:44 PM
ImmortalForums ImmortalForums is offline
 
Join Date: Feb 2007
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When using only the cdn feature and having accel off and someone quotes an image instead of showing the image it just has a link.
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 06:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04932 seconds
  • Memory Usage 2,336KB
  • Queries Executed 26 (?)
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)bbcode_code
  • (1)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
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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