I recently spent several days figuring this out, so I thought I would report my findings to the community in case anyone else is having the same problem.

For one of my sites Analog has been reporting total bytes transferred numbers of several times what the router is reporting, larger than the Internet connection is capable of in fact. The affected site has several large (>100 Meg) downloads, but is otherwise "normal".

It turns out that Apache does not report bytes sent, but instead reports the number of bytes that "could have been" sent. In most situations these numbers are the same, but in certain cases they can be very dramatically different. On this particular site, Apache is reporting *ten* times the data transferred then is actually going across the wire.

The crucial case is caused by the combination of very large downloads (>100 Meg in my case, but anything over 1 Meg is probably being affected to some extent) and particular download managers on Windows. Many download managers will start several transfers at the same time, each starting from a different place in the file. When one transfer gets to a point covered by another transfer the download manager will abort the transfer. When this happens Apache will report the number of bytes from the start of the transfer to the end of the file, but the actual transfer will be much shorter (because it was aborted).

This situation is most common with 206 Partial Transfer status codes, but can also affect regular requests. The Apache developers are aware of this "issue", but don't consider it a bug. Instead they developed the logio module to report actual numbers of bytes transferred. If you are using Apache, have large downloads on your site, and care about accurate byte counts in Analog I suggest you start using the logio module and use the %O format specifier instead of %b in your log formats.

There exists a download manager which will start a transfer for every 1 Meg of file size. With a 100 Meg file Apache will report 100 requests with a total size of about 5 Gig! Meanwhile the actual data transferred will be only slightly more than 100 Meg, a difference of nearly 5000%! Other download managers have less dramatic behaviors, but still routinely result in 300% to 700% differences between reported and actual byte counts on large downloads.

Jason

--
[EMAIL PROTECTED]
--
Dr. Seuss books . . . can be read and enjoyed on several levels. For
example, 'One Fish Two Fish, Red Fish Blue Fish' can be deconstructed
as a searing indictment of the narrow-minded binary counting system.
  -- Peter van der Linden, Expert C Programming, Deep C Secrets
+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.meer.net/mailman/listinfo/analog-help
|
|  Analog Documentation: http://analog.cx/docs/Readme.html
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
+------------------------------------------------------------------------

Reply via email to