# Bandwidth, transfer, I'm confused

#### Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

•  Subject
• Author
• Posted on

According to the Apache log files of a web site, the "number of bytes
transferred", cumulated for each day and averaged over a period of
time equals 6123 mB

However, a bandwidth monitor, for the same web site, over the same
period of time, indicates a fluctuating bandwidth of between 10 k bits
per second and peaking at 50 k bits per second. The most common,
average bandwidth being around 26 k bits per second.

These figures don't match.

Assuming a sustained bandwidth of 26 k bits per second, non-stop over
a 24 hour period (one day) the total bytes transfered would be:

26 / 8 (convert kbits into kbytes)

x 86400 (number of seconds in 24 hours)

== 280,800 kb

or 274 mB

To realise a data transfer of 6,123 mB in 24 hours one should require:

6123 x 1024 (convert mbytes into kbytes)

= 6,269,952 kb / 86400 (divided equally by seconds in 24 hours)

= 72.57 kbytes per second * 8 (multiply by bits in a byte to convert
to k bits per second)

== 581 k bits per second

Anyone?

Matt

--
Woe to him that willfully innovates, while ignorant of the constant.
http://www.probertencyclopaedia.com

## Re: Bandwidth, transfer, I'm confused

Matt Probert wrote:

<snipping far too much/>

Do the Apache logs take into account internal transfer, eg. opening a
text file &c on the server for use by Perl/PHP/&c? If so, then the
throughput for Apache could be a lot higher than the reported transfer
to the public side.

I'm not entirely sure how these things work, so it's pretty much
conjecture ;)

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.

## Re: Bandwidth, transfer, I'm confused

On Tue, 17 Oct 2006 09:43:35 +0100, Dylan Parry

No. These are bytes transferred in response to requests to the http
server.

In simple terms, these are the number of bytes sent from the web
server to the remote browser (or ISP cache or spider)

Matt

--
Woe to him that willfully innovates, while ignorant of the constant.
http://www.probertencyclopaedia.com

## Re: Bandwidth, transfer, I'm confused

Matt Probert wrote:

<bullsh*tting>
Okay, in which case, do the Apache logs take into account data
compression? I'm pretty certain that your bandwidth monitoring tool
*will* be taking this into account, which if the Apache logs aren't,
could be why there is such a difference.

For example, a text file compresses over HTTP pretty well, and whilst
Apache will says it's served say 1MB of data, as it's been sent
compressed over HTTP it will be considerably less data transfer.
</bullsh*tting>

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.

## Re: Bandwidth, transfer, I'm confused

On Tue, 17 Oct 2006 11:41:55 +0100, Dylan Parry

I am not aware of any compression taking place. I have certainly not
instigated any, and examination of the http headers does not reveal
any compression (Content-Type: text/html and Content-Length: also
reports the full file size)

I rather hoped (ho ho ho) that one of the professional hosting bods
here might have an idea. I dread asking in one of the Unix groups <g>

Matt

--
Woe to him that willfully innovates, while ignorant of the constant.
http://www.probertencyclopaedia.com

## Re: Bandwidth, transfer, I'm confused

Matt Probert wrote:

Doesn't some sort of compression happen regardless though? Ie. doesn't
the underlying protocol transmit data in such a way as to efficiently
send text data?

Heh :)

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.

## Re: Bandwidth, transfer, I'm confused

Matt Probert wrote:

This is a Unix group!

--
Dancin' in the ruins tonight
Tayo'y Mga Pinoy

## Re: Bandwidth, transfer, I'm confused

Matt Probert wrote:

Bandwidth monitor hooked to the wrong site.

--
Dancin' in the ruins tonight
Tayo'y Mga Pinoy