PDA

View Full Version : Improve Bandwith Usage, Tips



Emancipator
11-06-2004, 09:53 AM
Does anyone have any suggestions for a php site on how to improve bandwith usage. I just improved my site in the sense of getting the sql errors to go away, and once again overnight my site traffic has doubled, and I am once again in the boat of having nowhere near enough bandwith.

If anyone has any suggestions I am most open to them. yesterday i had almost 500,000 hits on my site and needless to say the amount of bandwith i used was scary :)

moonshield
11-06-2004, 11:17 AM
wow, one can never have enough traffic right :)... Is the problem just bandwidth or is it processor/memory overload also?

moonshield
11-06-2004, 11:18 AM
maybe you could run your database on a higher performance database solution. Cache certain pages that are viewed most often.

Emancipator
11-06-2004, 11:22 AM
you have a suggestion to replace mysql with? I am not sure just how much caching is going to cut down on my overall load but i am giving it a go.

Emancipator
11-06-2004, 11:23 AM
oh and poorman my processor was overloading but i have that bit fixed. Now my huge concern is bandwith. Every day the traffic doubles and every day i bang my head on the wall .lol

moonshield
11-06-2004, 11:38 AM
you may just want to use multiple servers, or strike a deal with your host for a very large amount of bandwidth.

mySQL server... the new version looks like it is very fast and efficent(around Oracle in speed and efficency). Perhaps and upgrade would good(if your not already at 4.01.

Emancipator
11-06-2004, 11:58 AM
i prefer not to continue pouring money into bandwith. That is an expensive solution. I am going to be contacting them for more bandwith, but i dont want to be doing 4000 gigs a month... i cant afford that kind of popularity.

So I am looking into how i can possibly use caching to handle some of my heavier pages like my galleries.

Mike
11-06-2004, 12:05 PM
What is your high traffic site Emancipator? When you say "hits" do you mean pageviews or uniques, or just "hits"?

tomek
11-06-2004, 12:37 PM
if you want to save bandwith make sure your server ueses mod_deflate (apache 2.x) or mod_gzip (apache 1.x)

Emancipator
11-06-2004, 02:29 PM
thanks tomek, can you explain further on those two things? Mike my high traffic site is my only site, www.moviesonline.ca and it is getting alot of hits, and uniques. About 1.8million hits in 2 days, and uniques i would have to check.

Emancipator
11-06-2004, 02:49 PM
i just wrote a file to prevent hotlinking of my trailers just in case my bandwith monster usage is because of leachers.

Westech
11-06-2004, 03:05 PM
mod_gzip would be my first suggestion, too.

Most stats programs let you list files in order of bandwidth usage. These files should be your next target, if necissary. My bet is on the random movie images that appear on each page, and the big pics that your forum users put in their sigs.

Emancipator
11-06-2004, 03:11 PM
yeah i unfortunately still dont have a stats program running. Still trying to get a good one i can get installed. PHP and HTML are my skills, and so i need to find a stats progrma that works well with that.

I could disable sigs on the boards temporarily. See if it helps at all.

Emancipator
11-06-2004, 03:16 PM
just disabled board sigs for the time being, and am working on mod_gzip with my buddy who is a hardcore linux guy.

MarkB
11-06-2004, 03:25 PM
Definitely mod_gzip

Are your CSS styles (if you have them) in each page, or linked to a style sheet file?

Do you have any images (however small) that you could replace with text or colour?

Emancipator
11-06-2004, 03:49 PM
i dont use hardly any images in my site, i use css. My css is a mix of include files and in the page. And mod_gzip is in the works.. thanks for these ideas guys, keep em coming.

I think most my problems were hotlinking, i should know by tomorrow.

Emancipator
11-06-2004, 06:06 PM
have awstats half *** running and i now know WHAT file is causing me all my grief.

/phpBB2/album_pic.php 10928 23.98 KB

That is my #1 file, and 97% of my bandwith is used on PHP files. I have just installed JPCACHE on most of my pages, think that is going to help bring down my bandwith?

James
11-06-2004, 06:47 PM
It should, because that means your pages aren't just made on the fly, right?
The least it'll do is lower your server load.

thebillionaire
11-06-2004, 07:02 PM
Bandwidth is something Im scared of because I cant afford a dedicated server so I will have to use shared, thats like only 70gb, and if I used as much as you I would be in big trouble.

James
11-06-2004, 08:39 PM
It's all about whether the visitors taking up that amount of bandwidth earn you the money back through the advertisements on your website, when you get that through better ads and lowered bandwidth and other little things, then you're golden.

Emancipator
11-06-2004, 08:54 PM
well i have found the source of my grief... i have three installed stat apps on my server installed by the admin showing i did 3,000 gb in the month so far, and thank friggin god I just finally got ahold of the dedicated server host and asked them WTF.

I could not see in my code where on earth that was possible, after talking to my server people the stats programs were totally out to lunch. I have used 50gb this month according to htem which is perfectly fine.

I am waiting for confirmation on that number and can start breathing normally again. I get alot of traffic but that is just freaking insane b/w numbers.

James
11-07-2004, 12:48 AM
Wonder why your servers logs were out of whack--I'm assuming that the stats programs are just analyzing them like AWStats and Webalizer do. You should ask your host about that, too.

Emancipator
11-07-2004, 08:53 AM
the numbers are still completely out to lunch. I had to manually crunch the numbers to see what my bandwith was. When I emailed them last night however they replied VERY quickly and let me know that my bandwith usage is not 500gigs, but rather it is 50gigs.

This morning I woke up and my bandiwth usage is once again a huge and SCARY number. I have already emailed them to ask WTH is going on. My bandwith number for the month according to the server is 62430000000

Which by my math is 58gigs. I am just getting them to explain the wierd numbers.

Mike
11-07-2004, 09:28 AM
Quite a difference in numbers huh :)

MarkB
11-07-2004, 10:47 AM
Looks like the number you've been given is in bytes (or bits, or whatever). So it's basically 60-odd gigs.

Emancipator
11-07-2004, 11:20 AM
yeah exactly what I am looking at Mark. This morning i get some more scary numbers so I fiinally gave them an ultimatum. Fix it, or I am cancelling my service on monday. I dont need this nonsense.

Support this morning said they didnt know what was going on, last night they were very helpfull. So I am giving them some time to sort it out, if they can not give me a straight answer I take my $$$ for my server elsewhere, where they can do math.

James
11-07-2004, 02:22 PM
If you stay with them, see if you can get a little extra for the trouble you had to go through.

Emancipator
11-07-2004, 02:55 PM
yeah i am right now focusing on getting some straight answers for my serious aggravation. then we wil have the conversation of WHY did i pay a setup fee to have things setup WRONG. Since I had to pay somebody to fix things.

MarkB
11-08-2004, 06:43 AM
It must just be a reporting configuration issue. As long as they don't say you've used 5 terrabytes instead of 50gb, it shouldn't be an issue ;)

Emancipator
11-08-2004, 06:52 AM
Yeah they are telling me ive use 60gb, which is much more in line with what I expected. Last month I used 60gb ALL month. but this month I used 60gb in 7 days. Then again I have done almost as much traffic in the last 7 days as I did all last month.

Its a mad house of activity. I still expect them to fix the errors in my control panel on the server. They charge me a monthly fee for the control panel and I EXPECT it to work correctly.

James
11-08-2004, 08:55 AM
Hell, I don't pay extra for the control panel on my hosting and I expect it to work correctly!

MarkB
11-08-2004, 10:18 AM
What control panel software is it?

Emancipator
11-08-2004, 10:23 AM
plesk and its a piece of crap. If i could afford CPANEl I would get it, but CPANEL is not cheap at all.

MarkB
11-08-2004, 12:30 PM
How much are you paying for hosting now?

Emancipator
11-08-2004, 08:22 PM
im on a dedicated server, and dont know the number off the top of my head sorry. I am on a 1 year contract

AndyH
11-08-2004, 08:24 PM
Cpanel is only something like $15/mon. I wouldn't consider that expensive, money well spent. Plesk, from when I used it (quite a while ago now) was sluggish and did not give me all the bells and whistles that Cpanel offers.

Emancipator
11-09-2004, 07:47 AM
link me where I can get a cpanel license for my server for $15.00 a month.

MarkB
11-09-2004, 08:03 AM
Go to www.webhostingtalk.com - there are a number of cpanel resellers there.

Emancipator
11-09-2004, 09:32 AM
thanks mark, hopefully i can get a link to the $15.00 one since that is way cheaper then I saw and would be great to get PLESK off my server since its a piece of crap.

Westech
11-09-2004, 09:57 AM
So, Emancipator, tell us how you feel about Plesk...

:D

Emancipator
11-09-2004, 10:08 AM
lol.... well Westech....... :)

Seriously I hate plesk, i pay monthly fees for it and the damn thing doesnt even work right. If I can get cpanel for $15.00 a month i am all over that like pork in beans.