Web Host: Bandwidth Conservation Measures

Kathy

Tazmanian Veteran
Joined
Jan 1, 2004
Messages
9,030
Kathy submitted a new Article:

Web Host: Bandwidth Conservation Measures

Bandwidth Conservation Measures

Here's a few things that you can do to your forum (regardless of what software it is) to save on bandwidth.

- GZIP

If you have a GZIP feature in the AdminCP, enable it and set it to level 1. Make sure your server has GZIP installed. This will save quite a lot of bandwidth.

If you have access to your server shell, install mod_gzip for your entire server. (Be sure and turn *off* the gzip in your vbulletin control panel though. Do not have them both enabled).

- Cut down on images.

The main image to cut down first is the top banner. It is viewed on every page and for most forums, it is usually over 30kb, in some cases around 100kb! The best thing to do is design a header to your forum that doesn't require an image of that size; try just having a small logo of around 15kb at the most. This will save significant bandwidth. Other images to cut down on are for example the post images, such as the buttons linking to the homepage of the user, pm link, email link, search posts link, and so on. If you make these text, a lot of bandwidth will be saved, if you have a large forum, you may not realise it but these few little buttons do add up the bandwidth.

We know that some webmasters love to load up a site with gorgeous graphics taking talent and energy to create in photoshop. Be aware, however, that all those graphics are loaded into the page with every visit of every visitor and with every page read. It all adds up!

- Create a 'lite style'

Set the more graphical style as an option for premium members or subscribers or something. The lite style should be low on images and such, therefore not only is it good for 56k users, but is also less of a burden on your bandwidth.

- Block spiders from specific area of your site

One of the simplest fixes to reducing bandwidth overheads is to use a robots.txt file to block spiders from specific areas of your forums.

The simplest would simply block spiders from your images - other forms would block entire areas of your forums from spiders...but more for reasons of channelling PR to your content - for search engine optimisation purposes - rather than to simply save on bandwidth. :)

In case anyone is curious, this is an example robots.txt file to block spiders accessing your graphics:

Code:
User-agent: *
Disallow: /forum/images/

And this is an example of a robots.txt used to focus PR into your thread...

Read more about this article here...
 
Last edited by a moderator:

padmaster

Enthusiast
Joined
Jan 27, 2004
Messages
222
Kathy said:
A robots.txt file is nothing more than a text file of that name, dropped into your main HTML root folder. Most reputable spiders will obey it.

I need to get this done....couple of questions.

main html folder? My root looks like this:

/catalogs
/etc
/mail
/public_ftp
/public_html
/temp
/www


Does it go in one of those folders or just / ?


Great thread :worship:
 

Kenj

3ts'
Joined
Jan 14, 2004
Messages
160
Security Issues

In your robots.txt I see you included you Admin cp and mod cp dirs ?

trade off being ? a spider that can't access them and do anything, will show on whos on line but no path except to who has access to view.
or
Any/Some one who knows about such a file and wants to cause trouble, by typing the name in the address window, it shows where things are :: which gets them one step closer.
 

Kathy

Tazmanian Veteran
Joined
Jan 1, 2004
Messages
9,030
padmaster said:
I need to get this done....couple of questions.

main html folder? My root looks like this:

/catalogs
/etc
/mail
/public_ftp
/public_html
/temp
/www


Does it go in one of those folders or just / ?


Great thread :worship:

Goes into your /public_html folder..... :yup:
 

Zachery

Moo
Joined
Feb 3, 2004
Messages
2,593
Might want to add somthing about storing any CSS as files vs in the page :)
 

Nicholas

Webnik
Joined
Mar 1, 2004
Messages
652
About GZIP... it's definitely a bandwidth saver. I'm just wondering, how does it affect and fare vis-a-vis the server load?
 

wizard1974uk

Tazmanian Gremlin
Joined
Jan 6, 2004
Messages
5,764
With regard to where the .htaccess file is saved, if you use cpanel as your control panel, you can create the file through it and it will automatically put the file in the correct place.
 

Zachery

Moo
Joined
Feb 3, 2004
Messages
2,593
Nicholas said:
About GZIP... it's definitely a bandwidth saver. I'm just wondering, how does it affect and fare vis-a-vis the server load?
Gzip over level 1 is unnessary.
 

The Sandman

Administrator
Joined
Jan 1, 2004
Messages
29,140
Setting GZIP to '1' gives you 95% or more of the total achievable compression at a relatively low cost in terms of CPU utilization. Setting GZIP any higher gives you very little additional compression and has a relativley high CPU utilization. So setting GZIP >1 is counterproductive under any normal circumstances.
 

Nicholas

Webnik
Joined
Mar 1, 2004
Messages
652
The Sandman said:
95% or more of the total achievable compression at a relatively low cost in terms of CPU utilization.
Thanks. Reading that caveat from elswhere about server load being a big tradeoff was a concern. Now this clarifies it.
 

floris

Habitué
Joined
Jan 17, 2004
Messages
1,342
It is definitly worth it to take about 5 minutes to walk through the vBulletin Options groups and read carefully what it says there for each setting. It can certainly have impact on the total performance of your site, as well as help you save traffic.

A few examples:

Store Stylesheets (CSS) as file
Instead of throwing all that CSS code inside each page that gets rendered, check the optiont to save the CSS as a file, this way it saves you quite some traffic generated by each file.
Admin Control Panel > vBulletin Options > vBulletin Options > Style & Language Settings > Store Stylesheets (CSS) as file : Yes

Remove Redirection Message Pages
Turning his option on will remove the redirect pages that are displayed after a user action. This will definitly speed up posting behaviour and saves traffic for sure.
Admin Control Panel > vBulletin Options > vBulletin Options > Cookies and HTTP Header Options > Remove Redirection Message Pages : Yes

Cached Posts Lifespan
This may require twice the storage space, but this makes threads faster to display. From the admin-help:
Quote:
Posts are normally stored with bbcode tags etc. in the same form as the user posted them with so that it may be edited later, and then parsed at display time. By caching them, they are parsed at post time (instead of display time) into the HTML they will be displayed in and stored separately from the pre-parsed posts. This results in a faster display on threads, since the posts do not have to be parsed at display time. If you have the disc space, you can set this to a higher value for better performance.

Admin Control Panel > vBulletin Options > vBulletin Options > Server Settings and Optimization Options > Cached Posts Lifespan : 30

Add no-cache HTTP Header
If you want to save bandwidth, server load and traffic, turn this off!
Admin Control Panel > vBulletin Options > vBulletin Options > Cookies and HTTP Header Options > Add no-cache HTTP Header : No

Set your options and limits for Attachments
Go through the vBulletin Options and the Attachment Extentions to make sure you have the settings setup just the way you want to. You can deny showing images inline in posts (so they only show up as text links) and you can limit how images show up, their maximum width and height. This can save you quite some traffic in the long run. Especially on active forums.

As you can see, if you take some time to go through some settings and options, you can save traffic, improve performance and optimize your end-user experience.
 

Worthen

Participant
Joined
Oct 21, 2004
Messages
72
More about GZIP ...

I'm trying to get all my ducks in a row before I begin my first forum.

I'm not tech savvy. I do marketing and farm out the tech side.

I have 11 sites on a VPS where I have lots of room left on 120 GB Bandwidth per month. Some of these sites are good revenue producers and I don't want to harm them in any way.

What's the downside of running GZIP ?

Perhaps I am better off to get a different account for forums?

There must be a reason why everyone doesn't automatically use this feature to reduce expense. Please clue me in ... in simple terms.

Thanks :)
 

Daijoubu

Speed & scalability...
Joined
Oct 30, 2004
Messages
318
GZIP'ed content cannot be cached (in IE at least), some REALLY old browsers have compatibility issue with it, displaying garbled text
PHP's ob_gzhandler had memory leak on pre 4.0.5 (who use this anyway?)
It *might* use more CPU, but since there's much less data to transfer and connections are closed faster, it should be using less or about the same (unless you're crazy enough to use level 9)
PHP's zlib default compression level is -1 (which equal 6 in my tests)
To change it to level 1:
zlib.output_compression_level = 1
Either via php.ini, ini_set() or php_value in .htaccess
 

mage492

Aspirant
Joined
Apr 12, 2005
Messages
22
One thing I'm curious about, with gzip-ing the page... In the more stripped-down browsers (such as the popular text-only "Lynx"), can they handle receiving the compressed pages? I'm just curious (I have no real concerns, with bandwidth.), having read about this idea, a few times.
 

Daijoubu

Speed & scalability...
Joined
Oct 30, 2004
Messages
318
mage492 said:
One thing I'm curious about, with gzip-ing the page... In the more stripped-down browsers (such as the popular text-only "Lynx"), can they handle receiving the compressed pages? I'm just curious (I have no real concerns, with bandwidth.), having read about this idea, a few times.
It won't send compressed data to the browser if it doesn't report supporting gzip :)
 

BamaStangGuy

Fanatic
Joined
Jan 8, 2005
Messages
3,215
I have heard that you should leave the .php extension out of filenames in your robot.txt file.

Any validity to this?
 

harishkumar09

Participant
Joined
Jan 21, 2006
Messages
60
Hey guys , I am new and lot of new information here.

I am starting a forum thats going to be image intensive.It will be mainly catering to the entertainment industry and would involve posting of images hotlinked from other sites like imageshack.us and photobucket.

I see that the free forum from invision does not permit the use of
tags to post images.

So I guess I will have to go for my own paid forum.

Any idea of what the bandwidth cost will be in such cases ?

If these questions have already been answered please direct me to the relevant threads.I already did a search and couldnt come up with what I wanted.
 

Hypocrisy

Participant
Joined
Sep 26, 2005
Messages
56
Hello there,


harishkumar09 said:
Hey guys , I am new and lot of new information here.

I am starting a forum thats going to be image intensive.It will be mainly catering to the entertainment industry and would involve posting of images hotlinked from other sites like imageshack.us and photobucket.

First of all, if you use free imagehosting sites like the above - be prepared on the fact that your forum-domain might get banned due to high bandwidth usage.

This is unless you use thumbnails which link to the ad-infested page at imageshack etc.

Your photobucket account(s) will run out of bandwidth mighty fast, and you might also risk getting your host banned there too if you have too many referrals.


So I guess I will have to go for my own paid forum.

That might be a good idea, but you can also try to use phpBB and / or similar if you're only going to hotlink.


Any idea of what the bandwidth cost will be in such cases ?

Do you have Gzip enabled? If not, enable it. (if you have high number of hits, your ISP might complain / shut you off / limit your service if you have too many pagehits, as Gzip takes a bit of the machine serving your forum. This of course applies on a shared / virtual server solution.)

But check how big your mainpage is in KB, with and without gzip and then take this number times the expected amount of visitors.

If you have attached images, then take the maximum allowed size+the rest of the page data times the amount of visitors.


If these questions have already been answered please direct me to the relevant threads.I already did a search and couldnt come up with what I wanted.

I hope my post helps you mate.


If you're interested in a generous hosting-offer, then please PM me and I'll help you out with this.
 
Top