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.
Ryom
Registered User
Posts: 28
Joined: Sun Oct 12, 2003 2:45 am
Contact:

Post by Ryom »

Since 500MB x-fer monthly works out to16MB per day maximum thats a pretty tall order to fill if his site is even remotely popular.

An inexpensive host with a higher monthly x-fer is a very plausibe solution to his dilemma.

He says he is happy with his current host, which is great! Unfortunately it appears they can't satisfy his needs at a price he likes. I have no incentive for suggesting switching to LunarPages other than the fact that I'm a satisfied customer who finds them top notch.

Turning on gzip and using light-weight templates will only get him so far if his site continues to grow. Using a bandage when you need stitches does you no good.
makc
Registered User
Posts: 235
Joined: Fri Oct 15, 2004 7:29 am

Post by makc »

I sort of couldn't believe it, so I made some calculations...

http://www.bunkonet.com/junko/ says he has 1858 articles. 170 of them, with 741 posts, are in http://www.bunkonet.com/junko/viewforum.php?f=11. The most viewed topic there currently has 2438 views (Site rules, for example, has over 15000 views, so this should be fine for estimate). Given the product 1858*(741/170)*2438 estimates his total number of views, and he has 10 posts per page, we have total of 1858*(741/170)*2438/10 page views; now, "site rules" topic starter - dave - have his first post http://www.bunkonet.com/junko/viewtopic ... highlight= made at Thu Nov 07, 2002 2:46 am, that is 478 days ago. This yields roughly 1858*(741/170)*2438/10/478 = 4130 page views per day. 10 posts page http://www.bunkonet.com/junko/viewtopic.php?t=18 makes 121688 bytes when saved to MHT. This ends up in 479MB per day. Wow...

8O

It looks like PhpBB is real bandwidth killer.
Hynee
Registered User
Posts: 21
Joined: Sat Dec 25, 2004 6:58 am

Post by Hynee »

Another way to reduce bandwidth is to move the CSS stylesheet to a linked file. I believe its pretty simple for subSilver:
Open templates/subSilver/overall_header.tpl

Find

Code: Select all

<!-- link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->
Change to

Code: Select all

<link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css">
Then delete everything from

Code: Select all

<style type="text/css">
<!--
/*
down to

Code: Select all

/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css"); 
-->
</style>
This should save you about 8kB for each hit beyond the first. I.e, for the first page view will load the 8kB CSS file, then subsequent hits will link to the cached version of that file. I've never had problems with this, but it means you can't edit theme colours from the admin panel.
dave77459
Registered User
Posts: 10
Joined: Mon Feb 03, 2003 8:17 pm
Contact:

Post by dave77459 »

Hynee, thanks for the suggestion. I did that last week and also turned on gzip to see what the difference would be. The latest logs indicate that I am using around 250MB per day, which is half of what it was. That's great! :)

makc, thanks for the calculations. One thing that sort of blew me away was that the log file caught both google and MSN crawling the site. MSN was very impolite, grabbing every page at just about the same time. Amazing that the server could keep up, but each page was close to 45K and it grabbed 700+ of them. msnbot hogged a load of bandwidth. I think it warrants a special robots.txt entry for its poor manners.

starbukk1 suggested I encourage users to link to graphic images in their posts rather than uploading. I don't allow user uploading of images, but I have hosted some. The primary problem is that my site is tailored for middle-aged to older women who are seeking information about a game called Bunko. They are not the world's most Internet-saavy people, and anytime I suggest anything I have to do it myself for them. :(

Anyways, I am coming to grips with the reality that I will probably have to change hosts. There is a lot involved with getting hosted beyond their price. How responsive are they, are they looking out for my interests, do they work with you, etc. My host does those things. They also increased my bandwidth to 2GB/month at no charge, and dropped their overage fee. I know this is not a discussion about hosting, but I wanted to explain why I wanted to reduce my bandwidth as much as possible before seeking a new host.

Any other suggestions are still very welcome. I am not replying to everyone, but I am reading them all and digesting them. Thank you very much.

Dave
Van Zant
Registered User
Posts: 154
Joined: Tue Aug 16, 2005 3:15 am

Post by Van Zant »

ByteEnable wrote: 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"


is this still advisable to use on the latest phpbb version? 2.0.17?
Riamus
Registered User
Posts: 886
Joined: Tue Jun 21, 2005 7:40 pm

Post by Riamus »

Ignore this post about bandwidth usage...
makc wrote: I sort of couldn't believe it, so I made some calculations...

Thu Nov 07, 2002 2:46 am, that is 478 days ago.


This is 2005... that is 2002. Much more than 478 days from the date of his post. Besides that, I don't know that I agree with his other math.

Still, gzip and fewer graphics and onsite avatars will greatly reduce bandwidth. And, many low cost hosting sites are available with multiple GB of bandwidth offered per month.
Kakkoii Translation Team
格好いい 翻訳
Darth Wong
Registered User
Posts: 2401
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Name: Michael Wong
Contact:

Post by Darth Wong »

I suggest you check out the phpBBlite style, available right here on phpbb.com in the Styles section, under the "Simple" category. It's an ultra low-bandwidth style. To be honest I'm not a big fan of the way it looks, but appearances are tweakable.
Freedom of speech is not absolute, nor was it ever meant to be. If it were, then fraud would not be illegal.
Darth Wong
Registered User
Posts: 2401
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Name: Michael Wong
Contact:

Post by Darth Wong »

Another suggestion: if you are addicted to the appearance of SubSilver but you still want reduced bandwidth, you can use my own Low Bandwidth version of SubSilver. It's not much of a style; it's just subSilver with a lot of the graphics stripped out, and it also forces all in-line images to display as links rather than in-line images. The idea is to let people with low-bandwidth connections use the forum without waiting forever because some guy posted a bunch of in-line pictures. But it would also work for your purposes, and it still looks mostly like subSilver. You can get it off my personal website:

http://www.stardestroyer.net/Mike/GeekT ... th.tar.bz2
Freedom of speech is not absolute, nor was it ever meant to be. If it were, then fraud would not be illegal.
SamG
Former Team Member
Posts: 3221
Joined: Fri Aug 31, 2001 6:35 pm
Location: Beautiful Northwest Lower Michigan
Name: Sam Graf

Post by SamG »

I think Van Zant's question was targeting the advisability of using in 2.0.17 the patch that addressed modifying "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."
Darth Wong
Registered User
Posts: 2401
Joined: Wed Jul 03, 2002 5:20 am
Location: Toronto, Canada
Name: Michael Wong
Contact:

Post by Darth Wong »

SamG wrote: I think Van Zant's question was targeting the advisability of using in 2.0.17 the patch that addressed modifying "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."

True, which is why there is the vastly superior .htaccess method. Bounce 'em hard by using RewriteRule to send them right back to 127.0.0.1. But the original post did inquire about general solutions. I'd say that the .htaccess, robots.txt, and low-bandwidth template are the way to go. After that, he needs to look at his hosting.
Freedom of speech is not absolute, nor was it ever meant to be. If it were, then fraud would not be illegal.
Van Zant
Registered User
Posts: 154
Joined: Tue Aug 16, 2005 3:15 am

Post by Van Zant »

thanks guys!

things that i have done: changed the phpbb logo to an icon, saved alot of space there.

disabled guest posting (they can only view the forum index)

wrote a robots.txt file (is there a way i can allow googlebot? or is it required...i plan to put google adsense on the forum.)
True, which is why there is the vastly superior .htaccess method. Bounce 'em hard by using RewriteRule to send them right back to 127.0.0.1


how would i do this? sorry my knowledge of code is extremely basic. i was 'forced' to setup the board as a bunch of users decided to migrate from anotnher one when the host went crazy :wink:

just today i've clocked about 800 megs uploaded. (im running the server on a home computer)

im allowed 60 gigs of transfer a month and I worry that it may not be enough?
Ryom
Registered User
Posts: 28
Joined: Sun Oct 12, 2003 2:45 am
Contact:

Post by Ryom »

http://www.phpbb.com/phpBB/viewtopic.ph ... =googlebot

Have a look at that.


Also use the mod search to find out if there are any other useful mods you may like:
http://www.phpbb.com/phpBB/viewtopic.php?t=275959
Locked

Return to “2.0.x Discussion”