« Previous Next »

Thread: Using both IIS Compression AND zlib.output_compression

Last post 06-08-2009 6:01 PM by brashquido. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 05-25-2009, 1:31 PM

    Using both IIS Compression AND zlib.output_compression

    Are there any downsides to enabling both the HTTP Compression option in IIS 6 (on the Service tab on the Web Site Properties dialog) AND the zlib.output_compression option in my php.ini file on my Windows 2003 STD SP2 (with 2gb RAM) server?

    Are there any benefits to enabling both compression options?

    Or should I enable just one of the two? If so, which one?

    The only application that I'm running on the server is the PHP based Moodle LMS.

    I'm using PHP version 5.2.8 with Microsoft's FastCGI.

    Thanks

  • 05-25-2009, 8:07 PM In reply to

    Re: Using both IIS Compression AND zlib.output_compression

    I'd say performance wise you are going to be a lot better off using one or the other as you aren't going to get any real compression benefits from trying to compress an already compressed stream. Personally I'd first look at the native HTTP compression in IIS 6 as I'd expect it to have a bit of a performance advantage over using PHP zlib. Be aware that you you are only able to define HTTP compression settings for static content when using the IIS MMC, and to enable compression for PHP (or any dynamic content) you will need to edit the metabase. If you get lost have a look at my guide on enabling IIS 6 native compression for PHP.

    Also keep in mind that there is no caching of dynamic content when using native IIS 6 HTTP compression. This means PHP output is compressed each time it is requested, which results in higher CPU usage. You'd need to use a 3rd party product like Port80's httpzip module if you want to both compress and cache PHP output. 

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 05-26-2009, 3:22 AM In reply to

    Re: Using both IIS Compression AND zlib.output_compression

    Thanks Dominic. I did use your excellent 'enabling IIS 6 native compression for PHP' article to setup the IIS compression. I will disable the zlib compression and see what performance I get.

    A big thanks for all the helpful info...

  • 05-28-2009, 8:02 AM In reply to

    Re: Using both IIS Compression AND zlib.output_compression

    One more thing regarding your caching dynamic content comment:

    Does PHP zlib compression cache dynamic PHP content?

    Would I still need a third-party module (like the httpzip you mentioned) to cache the PHP output if I was using zlib compression (instead of IIS compression)?

    Thanks.

  • 05-29-2009, 9:54 PM In reply to

    Re: Using both IIS Compression AND zlib.output_compression

    No, I don't believe so. PHP zlib compression does not cache files itself. On Apache you'd need to use mod_gzip for that. Caching only really becomes important with high traffic sites and/or have very limited CPU power.
    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 06-08-2009, 3:16 AM In reply to

    Re: Using both IIS Compression AND zlib.output_compression

    So, on a HP DL360 G5 (2 dual core 3000 MHz CPU) with 2GB Memory I shouldn't worry too much about caching if we don't normally have more than about 20 users logged in at the same time?

  • 06-08-2009, 6:01 PM In reply to

    Re: Using both IIS Compression AND zlib.output_compression

    Really depends how CPU intensive your scripts are, and how active your users are. However with that kind of processing power with only 20 odd users at a guess I would say you'll be fine without caching. Just keep an eye on your system resource usage.
    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
Page 1 of 1 (7 items)
Microsoft Communities