Reducing Bandwidth

The 2.0.x discussion forum has been locked; this will remain read-only. The 3.0.x discussion forum has been renamed phpBB Discussion.
dave77459
Registered User
Posts: 10
Joined: Mon Feb 03, 2003 8:17 pm
Contact:

Reducing Bandwidth

Post by dave77459 »

I was torn between posting this here or in the support forum, but ultimately I decided that I was looking for advice rather than product support. If I was wrong, moderators please move the message. :)

I run a hobby website, on which my phpBB forums are an intrinsic function. I too was hacked when running 2.0.9 and my ISP moved me to a new server (and I upgraded to 2.0.11). That new server had improved reporting functions which shows me using about 250MB of bandwidth per day. The problem is that I am paying for 500MB per month, so my usage is way out of line. As of today, I have used 5GB of bandwidth in the latest three weeks.

I need to reduce my usage. As a hobby site that I pay for out of my own pocket, I simply cannot support that bandwidth usage. This is a very serious problem that will dramatically effect my site, and perhaps force its closure.

What can I do to realistically reduce bandwidth usage?

As I looked at the largest served pages (nearly 90KB), I noted that the subSilver template embeds the CSS styles in the header. I have removed that and moved it into the CSS file, saving 8KB or so on the 2nd+ pages.

I reduced the number of posts and topics per page from 50 to 10. My theory is that people are sampling some of the forums, and when they see that it isn't what they are looking for, they will not read the next pages of topics. Or perhaps they will use the search function instead.

I have asked my hosting company to give me a fresh copy of the traffic log so I can see if these changes are having any impact. Maybe they are, but will it be dramatic?

I know I have alternatives to closure (e.g., I see a link for "phpBBHosting at $7.95" on the bottom of this page), but I am very happy with my hosting company and would like to stay put if possible.

So... what can I do to reduce my bandwidth? Is there a much thinner template than subSilver?

I know some will ask, so here is my site: http://www.bunkonet.com
You can look it over and make suggestions, but be gentle. :) It is a hobby site, and popular for what it is.

Dave
User avatar
Nephrus
Former Team Member
Posts: 1178
Joined: Sat Oct 19, 2002 4:05 am
Location: Vancouver, Canada
Contact:

Post by Nephrus »

What you can also do is enable GZIP compression in the admin panel under Configuration. This will compress the pages, and save bandwidth. However, it does raise the processing power on the server a bit.

Another thing you can do is (and this may be controversial if you want to have your forum indexed by search engines) ban or disallow search engine spiders. They can eat bandwidth like pigs and raise the cost of running a website.
Alternatively, you could set up a robots.txt file on your website and direct them to search only certain pages and thus reducing bandwith used by these creatures.
[ Zelda Planet - nephrus.net - phpBB Userguide - phpBB Knowledge Base - phpBB.com Forum Rules ]
ABSOLUTELY NO support via PM/IM/email or I'll get a cow to sit on you
User avatar
freeBB
Registered User
Posts: 101
Joined: Thu Feb 03, 2005 10:35 pm
Contact:

Post by freeBB »

Have you tried using another style/template?
Free Forum Business
Looking to hire phpBB style/theme designers.
dave77459
Registered User
Posts: 10
Joined: Mon Feb 03, 2003 8:17 pm
Contact:

Post by dave77459 »

Nephrus wrote: What you can also do is enable GZIP compression in the admin panel under Configuration. This will compress the pages, and save bandwidth. However, it does raise the processing power on the server a bit.

Another thing you can do is (and this may be controversial if you want to have your forum indexed by search engines) ban or disallow search engine spiders. They can eat bandwidth like pigs and raise the cost of running a website.
Alternatively, you could set up a robots.txt file on your website and direct them to search only certain pages and thus reducing bandwith used by these creatures.
I thought the gzip compression would save database space, which I don't care about. I have loads of space. How does gzipping reduce bandwidth? I am willing to believe that I am misinformed on how gzipping helps, so please enlighten me.

Before moving servers, I used to use a custom error script to detect when robots.txt was being requested. I denied almost all spiders except google and yahoo, who play nice. Google is how 95% of my visitors find me.
dave77459
Registered User
Posts: 10
Joined: Mon Feb 03, 2003 8:17 pm
Contact:

Post by dave77459 »

freeBB wrote: Have you tried using another style/template?

No, and that is something I am interested in. Is there a style/template that is very lean?
User avatar
Nephrus
Former Team Member
Posts: 1178
Joined: Sat Oct 19, 2002 4:05 am
Location: Vancouver, Canada
Contact:

Post by Nephrus »

dave77459 wrote: thought the gzip compression would save database space, which I don't care about. I have loads of space. How does gzipping reduce bandwidth? I am willing to believe that I am misinformed on how gzipping helps, so please enlighten me.

Before moving servers, I used to use a custom error script to detect when robots.txt was being requested. I denied almost all spiders except google and yahoo, who play nice. Google is how 95% of my visitors find me.

GZIP doesn't compress the database. What it does is it compresses the pages before they are sent to the client's web browsers.
My apologies if I was not clear enough.
[ Zelda Planet - nephrus.net - phpBB Userguide - phpBB Knowledge Base - phpBB.com Forum Rules ]
ABSOLUTELY NO support via PM/IM/email or I'll get a cow to sit on you
User avatar
freeBB
Registered User
Posts: 101
Joined: Thu Feb 03, 2005 10:35 pm
Contact:

Post by freeBB »

You could always outsource your phpbb, meaning you continue to use your current host and put phpbb on a different host.
dave77459 wrote: I know I have alternatives to closure (e.g., I see a link for "phpBBHosting at $7.95" on the bottom of this page), but I am very happy with my hosting company and would like to stay put if possible.
Dave
Free Forum Business
Looking to hire phpBB style/theme designers.
dave77459
Registered User
Posts: 10
Joined: Mon Feb 03, 2003 8:17 pm
Contact:

Post by dave77459 »

Nephrus wrote: GZIP doesn't compress the database. What it does is it compresses the pages before they are sent to the client's web browsers.
My apologies if I was not clear enough.

No, you were very clear. I just can't imagine how it works on the browser end. :oops:

Thanks for the suggestion, I will investigate that.
dave77459
Registered User
Posts: 10
Joined: Mon Feb 03, 2003 8:17 pm
Contact:

Post by dave77459 »

freeBB wrote: You could always outsource your phpbb, meaning you continue to use your current host and put phpbb on a different host.
dave77459 wrote: I know I have alternatives to closure (e.g., I see a link for "phpBBHosting at $7.95" on the bottom of this page), but I am very happy with my hosting company and would like to stay put if possible.
Dave

That is something I'll investigate. But the non-forums end is so limited that I might as well move the whole thing. I do have some few downloads (PDFs and the like) that I could host elsewhere. That's a real option too.
starbuckk1
Registered User
Posts: 3
Joined: Fri Jan 07, 2005 4:51 am

Post by starbuckk1 »

Graphic images are a common bandwidth hog. Allowing avatar hosting off site will reduce your bandwidth consumption, since an off site image doesn't count against your bandwidth.

Encourage your users to link to graphic images in their posts rather than uploading.

Caution..some sites will consider this bandwidth theft so make sure your users are aware that they need to only do this with sites that don't mind having their images direct linked.

Also, make sure your users are not using any kind of offline readers. These things grab every page whenever they synchronize so they hog up a lot of bandwidth too.
User avatar
greggish
Registered User
Posts: 86
Joined: Fri Oct 26, 2001 3:39 pm

Post by greggish »

dave77459 wrote:
Nephrus wrote:GZIP doesn't compress the database. What it does is it compresses the pages before they are sent to the client's web browsers.
My apologies if I was not clear enough.

No, you were very clear. I just can't imagine how it works on the browser end. :oops:

Thanks for the suggestion, I will investigate that.


Just about every browser today has built-in support for gzip compression. If you don't have gzip enabled on your server, then this would be the single most important thing you can do now to reduce your bandwidth.
ByteEnable
Registered User
Posts: 31
Joined: Wed Feb 16, 2005 2:37 am
Contact:

Post by ByteEnable »

Also to help out, you will want to modify viewtopic.php to drop those the santy, anti-santy and the occasional cracker from trying to exploit security holes in older versions of phpBB. Each attempt causes bandwidth on your server. I have hundreds of attempts daily.
If your forum is using phpBB, you can add the following code to your viewtopic.php to stop the crack attempts all together (which also reduces server load):

$phpBBCrack = strpos(strtoupper($HTTP_GET_VARS['highlight']), "SYSTEM");
if ( $phpBBCrack !== false ) { die; }

You want to add the above code around line 485, just above the "// Split words and phrases" comment. The above code will render a blank page on crack attempts. However, this code should not be used as a substitute for an upgrade to phpBB 2.0.11, although it is compatible.


From: "phpBB.com Took Down by Crackers"
Last edited by ByteEnable on Sun Feb 27, 2005 9:31 pm, edited 1 time in total.
Ryom
Registered User
Posts: 28
Joined: Sun Oct 12, 2003 2:45 am
Contact:

Post by Ryom »

500MB per month! How much are you paying for this?

$7.95/mo gets you 40GB of x-fer per month and up to 3GB storage with one of the largest and oldest, and top-rated shared hosting providers out there... Lunarpages. They have 50,000 some websites hosted and I have been with them for a number of years. I am very pleased with the service and options provided by them.

$7.95 should be cheap enough for anyone with even a part-time job to pay and it will get you more bandwidth than you can possibly use unless your forum is super-huge. My advice would be to find better hosting! Unless you are paying $1.50 a month, 500mb monthly transfer is ridiculous!
User avatar
Techie-Micheal
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

Guys, this is not a discussion on webhosting. Thanks.
Proven Offensive Security Expertise. OSCP - GXPN
Magnotta
Former Team Member
Posts: 1093
Joined: Fri Oct 17, 2003 4:16 am
Location: Ontario

Post by Magnotta »

In phpBB3 there's a feature to send different templates to Bots(Googlebot, MSNbot), which can help reduce bandwidth dramatically. Forunetly you can get something similar for phpBB2 as well. Ptirihk has said he is going to make something like this for phpBB2 soon which will work with his new line of mods, NeoThermic has said he is backporting the phpBB3 feature and will release it as a mod soon, and Cyberalien has a featue like that on his site by using the eXtreme Styles mod to replece template files for certain bots(he recently posted the code to do this on his site). The advatage of something like that is you can remove all images and anything unessesary from a page if it is viewed by a bot. Bots vist sites a lot, so their activity can take up a lot of bandwidth. Send them a text only style and the bandwidth that they use could be cut down in half or even more, saving you tons of bandwidth over the course of a month.
Locked

Return to “2.0.x Discussion”