PDA

View Full Version : Is GZIP compression really better?



dwh
Fri 12th Aug '05, 12:50pm
I just read something fascinating by Brett who wrote the bestbbs software (not for sale at this point)
http://www.webmasterworld.com/forum19/2828.htm
and I'm wondering if anyone did this analysis and benchmarking for gzip on vbulletin?

Zachery
Fri 12th Aug '05, 12:53pm
Can't see the topic, and I don't really want to register, so I am not sure of how to comment :)

Wayne Luke
Fri 12th Aug '05, 1:10pm
He hasn't done tests himself....



For example (numbers are all relative guesses):
NonGzip:
Time Slices: Action
0.5 find required files.
0.5 find user files.
0.5 generate header.
0.1 send out top of page.
0.5 find post
0.5 generate start of post.
0.1 send out top of post.
0.5 find posters user files.
...
Total time slices or approximate time to generate message to browser: 4
Time to put something Visible In Browser: 1.5
With GZip
Time Slices: Action
0.5 find required files.
0.5 find user files.
0.5 generate header.
0.5 find post
0.5 generate start of post.
0.5 find posters user files.
1.0 Gzip post.
x.x send out page.
Total time slices or approximate time to generate page to browser: 5
Time to put something Visible In Browser: 5

You can run page generation tests on your site by turning on debug mode. Add the following to your config.php:


$config['Misc']['debug'] = true;


Test it with GZIP on and with it off. Since we use GZIP within PHP by default, it should accurately be reflected. On my test installation (Windows XP SP2, Apache 2.0.52, PHP 5.0.4, MySQL 4.1.13a, 27 forums, 500 randomly created users, 12,000 random posts), it takes 1.13 seconds to generate the forum home page and display it on my screen. With GZIP off it takes .12792 seconds to generate the page on my test installation.

This isn't a dedicated machine. It is the machine I use for everything and is not optimized to be a webserver. The machine is an AMD Athlon 2700+ with 512 MB RAM and ATA 133 IDE drives.

The reason it is available and that you can turn it off is so you can decide whether to serve your pages faster or lower bandwidth costs. If you aren't near your bandwidth limits and can increase bandwidth 40-60% then turn it off. If bandwidth is a premium cost, then turn it on.

Shining Arcanine
Fri 12th Aug '05, 2:19pm
I just read something fascinating by Brett who wrote the bestbbs software (not for sale at this point)
http://www.webmasterworld.com/forum19/2828.htm
and I'm wondering if anyone did this analysis and benchmarking for gzip on vbulletin?
gzip should lower server loads as the server won't have to maintain connections as long as normally does and with less connections to juggle the server's load will go down more than the compression will push it up. With zlib, compression can be applied as the page is being sent so Brett's assumption that everything will be sent out at the end of the page's compilation is incorrect (in cases where gzip uses the zlib to work).

feldon23
Fri 12th Aug '05, 6:42pm
Is GZIP compression really better?
I guess this is from a server performance viewpoint? Cause it is a Godsend for 56k users and a bandwidth saver across the board.

My 56k users couldn't thank me enough when I upgraded to vB3 and turned on GZIP. They immediately noticed how much peppier the forum appeared. The text part of every forum pageview downloads 200-500% faster for them. This benefit may have been lessened by the 'accelerator' features instituted by NetZero and eventually most 56k ISPs but it's still worth it. I doubt broadband users notice a substantial speed difference.

As for the server end of things, I noticed an increase in load and a substantial memory usage increase (not surprising!) when I turned on GZIP and had to temporarily disable it on 2 particularly busy days because I hit the RAM limit on my lame VPS.