Announcement

Collapse
No announcement yet.

mod_gzip makes things slower

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mod_gzip makes things slower

    A note to anyone who's thinking of installing mod_gzip:

    I installed mod_gzip on my server, disabled the GZIP output in vBulletin and got mod_gzip to handle the compression of PHP output. It slowed down vBulletin's performance.

    Now I've re-enabled GZIP output in vBulletin, and got mod_gzip to exclude PHP files, and performance is back to normal again.

  • #2
    your performance is back but it will never be as good as running without compression entirely. Just like all other software based compressions scheme; it eats up cpu cycles to compress the data. I've been using VB for almost a year now and I have a very active board. In all of my testing (and I have done quite a bit) I have found that enabling gzip and setting the compression level to 2 works the best.

    In addition I get much better page display times by increasing the output buffer size in both apache and php. In apache I use the following setting:
    sendbuffersize 64000


    and in php, I use these settings:

    output_buffering = 40000

    and
    output_buffering = On
    (the default is only 4096)
    Last edited by JeffJ; Sun 19 Jan '03, 6:35am.

    Comment


    • #3
      I would have GZIP output off completely, but I do need to save bandwidth. Plus, the users on slow dial-up connections like it!

      Many thanks for the Apache & PHP tips!

      Comment


      • #4
        Originally posted by ummahforums
        I would have GZIP output off completely, but I do need to save bandwidth. Plus, the users on slow dial-up connections like it!

        Many thanks for the Apache & PHP tips!
        mod_gzip's compression level is fixed at a higher value = 6

        whereas vB's admin gzip can be set to 1 which is less server intensive

        i have mod_gzip on my server and it handles fine for my hardware
        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
        :: Nginx SPDY SSL - World Flags Demo [video results]
        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

        Comment


        • #5
          Originally posted by eva2000
          mod_gzip's compression level is fixed at a higher value = 6
          I always wondered what is was set at. Is there no hidden parameter that allows you change it?
          http://britishexpats.com/ - British expatriate community

          Comment


          • #6
            Originally posted by fastforward
            I always wondered what is was set at. Is there no hidden parameter that allows you change it?
            not right now from http://i4net.tv/marticle/mod_gzip/enhancements.htm

            Possible enhancements in future versions of mod_gzip
            This document describes some possible functional enhancements which hopefully could be implemented into the current version 1.3.26.1a of mod_gzip without too much effort and enhance the usability of this module


            ===

            Configurable gzip compression level
            Currently mod_gzip uses the gzip compression level 6. This is hard-coded by the assignment gz1->level = 6 inside the function gz1_init.

            The higher the compression level, (gzip normally allows values between 0 and 9), the better the compression effect, but the higher the CPU time consumption as well. By adapting this compression level a user could solve the trade-off between CPU load and bandwidth saving according to his own requirements. Own experiments have shown that level 3 already takes you near the effect of compression level 6 - at least the choice between these two values should be left to the user.

            Thus it would be reasonable to have this compression level configurable by offering another directive mod_gzip_compression_level
            :: Always Back Up Forum Database + Attachments BEFORE upgrading !
            :: Nginx SPDY SSL - World Flags Demo [video results]
            :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

            Comment


            • #7
              Originally posted by eva2000
              not right now from http://i4net.tv/marticle/mod_gzip/enhancements.htm
              So I guess we could just change that in the code and recompile... I might give it a try.
              http://britishexpats.com/ - British expatriate community

              Comment


              • #8
                Is it true that zlib (on php) is a form of mod_gzip hardcoded to 3?

                Comment


                • #9
                  Thanks Eva. I guess I need to upgrade my hardware (again!).

                  Baragon0 - zlib in PHP is not hard-coded to 3. You can set the compression level to whatever you want.

                  Comment


                  • #10
                    Originally posted by fastforward
                    So I guess we could just change that in the code and recompile... I might give it a try.
                    I tried that, it compiled fine (I set gz1->level to 3), but after installing it mod_gzip wasn't compressing anything at all!
                    I went back and set it to 6 again, compiled and installed again, and it worked fine!

                    Comment


                    • #11
                      My vBulletin install is in a directory of the web root called "forum". How do I configure mod_gzip to ignore all files in this directory?

                      (I want mod_gzip to ignore vBulletin's PHP files, as vBulletin handles the compression itself, but I want it to compress other PHP scripts.)

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...
                      X