Previous Thread
Next Thread
Print Thread
Rate Thread
#215419 04/23/2002 6:08 PM
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
UBB.threads 6.0 beta 5, UBB.classic 6.2.1.2, PHP 4.1.2, zlib 1.1.4, Apache 1.3.12, Linux Redhat 7.0.

I'm interested in measuring the traffic savings achieved by using zlib-compression.

Each Apache access log entry contains the size of the response content in bytes. For pages that are zlib-compressed, is this the compressed page size or the uncompressed page size?

(If there's a more appropriate place to post this, on this board or elsewhere, please move it or make a suggestion. []/forum/images/icons/smile.gif[/] )

Sponsored Links
Joined: Oct 2000
Posts: 29
Power User
Power User
Offline
Joined: Oct 2000
Posts: 29
hmm, i'd be interested in finding that out too.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
An easy way to test this and get a rough estimate is to check file sizes with compression turned off and on in your control panel.

This page (before this post was made)
with compression: 3755 bytes / without compression: 21029

the forum summary (ubbthreads.php)
with compression: 4423 bytes / without compression: 30248

You get roughly a 80-85% savings on the html part of your forum, tho none on your graphics - this means the % will go down depending on how much of your site loads new graphics on new pages. The graphics do get saved in the user's cache once they are downloaded the first time, so savings go up with repeat customers []/forum/images/icons/smile.gif[/]

There is a hit on the server's cpu fpr doing the compression, so a busy site on a less-than-stellar server might need to have compression turned off.


- Allen wavey
- What Drives You?
Joined: Oct 2000
Posts: 29
Power User
Power User
Offline
Joined: Oct 2000
Posts: 29
wow, thats nice, as far as bandwidth thats saved, but yeah, with slow server specs.. hmm..

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Thanks, Allen, I might try that.

But what I really need is to be able to measure the total traffic.

I wrote a simple Perl script which analyzes the access logs and produces daily, weekly and monthly totals and averages. But I don't know whether these stats reflect the compressed or uncompressed sizes.

I know that mod_gzip allows you to add the compressed size, uncompressed size and compression ratio to the access log. Maybe I should use that instead of zlib. It would probably be better anyway, since it would compress pages served from outside the scripts.

Server resource utilization shouldn't be an issue, since it's a dedicated server, but we have bandwidth contraints, so compression is a priority.


Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Up to you, zlib compression will compress all .php pages served as long as it is enabled in the php.ini []/forum/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: Jul 1999
Posts: 118
Enthusiast
Enthusiast
Offline
Joined: Jul 1999
Posts: 118
does it require a special browser to do decompression?

do you have a link?

why don't you make more efficient output (see my post in the version 6 feature suggestion thread) in the first place, instead of trying to compress it?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)