Web Hosting Talk







View Full Version : calculating bandwidth: how accurate are you?


monkey junkie
06-14-2002, 10:41 AM
do you guys know how accurate the amount of bandwidth a website uses (for example, according to cpanel) is???

is there any other way to moniter bandwidth usage?

how do u calculate how much bandwidth your clients use??

thanks

StarGate
06-14-2002, 11:14 AM
We use the MRTG graphs from the switch, but that's dedicated. You could ask your server provider if you can pay for or send in your own switch. Every hosting comp except RackShack and some others should be able to do that for you.

There is nothing more accurate or "official" then the switch reading. If you got more then 1 server or will get more in the future you can have them hook them up on your own switch again so you have control over all your servers.

Ok there are bandwith programs but I have tried them all. Thay all are, more or less, crap... and most even cost more then a switch LOL

kreativ
06-14-2002, 03:38 PM
I've just noticed on shared hosting with CPanel and Ensim, the bandwidth numbers reported by a stats program (Webalizer, Analog, etc.) are always lower than the control panel's reported bandwidth number. Even with no e-mail, FTP, or subdomain usage (i.e. just HTTP), the control panel bandwidth # can be more than 2x as large as the # reported by a stats program. For example, stats say 8GB, the control panel reports 22GB. The difference gets larger and larger as the bandwidth usage increases. Supposedly, they're based off of the same access_log file. So I'm not sure why this happens. And I don't know if this also happens with H-Sphere and Plesk.

Tom|420
06-14-2002, 08:37 PM
Stats scripts, such as Webalizer, read the web server logs where only the size of the files is present. Thus, they don't take in account HTTP headers and the such, which is counted by the switch. How would believe the difference is there. I find the difference (8 GB to 22 GB) to be really big though, usually you count about 10% of the bandwidth for counting headers.

FHDave
06-14-2002, 11:18 PM
Originally posted by kreativ
For example, stats say 8GB, the control panel reports 22GB. The difference gets larger and larger as the bandwidth usage increases. Supposedly, they're based off of the same access_log file.


I have made a report on this before that this could be caused by mod_gzip. Mod_gzip is an apache module that compreses files on the fly before being send out of the server. I found out that with mod_gzip enabled, CPanel bandwith calculation can be off by a factor of 3 from webalizer. But with mod_gzip off, this does not seem to be a big factor anymore (within few percent or so as I recall).

Take a look at this thread (http://www.webhostingtalk.com/showthread.php?s=&threadid=25282&highlight=modGzip) and here is my quote:


It was really interesting to have mod_gzip running for a long period and suddently you turn it off. Indeed! I was able to verify several things ... First, my client's (and my server's mrtg) webalizer increases by a factor of around 3 or more, from about pushing 900MB-1GB to pushing about 2.7-3GB of of data transfer per day. Similarly with my MRTG graph ... It really impresses me actually with the amount of bandwith saved.

Second, I was also able to verify what causes the mysterious problems that most host have been asking, the difference between CPanel's bandwith monitoring (bandmin) and webalizer's. With mod_gzip turned on, I got about a factor of up to 3 times between bandmin and webalizer, but after turning it off, I realized that bandin and webalizer are withing 0.5%-1% of each other! I guess/believe that any host having a huge differences between webalizer and bandmin will have this mod_gzip intalled!




And I don't know if this lso happens with H-Sphere and Plesk.

I just took a brief look at HSphere today and found out that there are still indeed difference in bandwith reporting with webalizer and with HSphere. For instance: for one of my clients, HSphere reports about 16GB of HTTP traffic but webaliser and ModLogan show aroun 11GB of HTTP traffic. I will mention this on psoft forums perharps they can help me figure this out.

regards,
-dave

kreativ
06-14-2002, 11:56 PM
FHDave,

I found out that with mod_gzip enabled, CPanel bandwith calculation can be off by a factor of 3 from webalizer. But with mod_gzip off, this does not seem to be a big factor anymore (within few percent or so as I recall).

If this is the case, then with mod_gzip on, Webalizer is the one reporting the true bandwidth consumption while the control panel is counting total bytes being sent BEFORE compression.
Is this right? If so, mod_gzip is helping the host save on bandwidth costs but the host isn't passing on the savings to its customers.

And yes, the large differences I mentioned was with mod_gzip on (or mod_gzip off and gzip on through php's ob_gzhandler)

kreativ
06-19-2002, 09:25 PM
Nobody else thinks this is a problem? I doubt hosts would care, but customers should.

It seems Enim and CPanel are massively overstating bandwidth usage when mod_gzip is enabled.

chrisb
06-20-2002, 05:41 AM
Originally posted by kreativ
FHDave,



If this is the case, then with mod_gzip on, Webalizer is the one reporting the true bandwidth consumption while the control panel is counting total bytes being sent BEFORE compression.
Is this right? If so, mod_gzip is helping the host save on bandwidth costs but the host isn't passing on the savings to its customers.


That's a MAJOR flaw to the customer. Has anyone reported this DarkOrb? What was the response?