[solved] Increased Bandwidth Under LS

Discussion in 'Install/Configuration' started by ShannonA, Mar 31, 2014.

  1. ShannonA

    ShannonA Member

    A few months ago I moved over all my Apache configuration files to native LS configuration. When I did, my bandwidth dramatically increased:

    [​IMG]

    The old apache setup was using mod_deflate, but the new LS setup is set to use gzip, so I'd expect the two setups to be similar.

    Just to verify that gzip was working today I turned it off for 20 minutes or so, and sure enough my bandwidth jumped up another 500 kb/s. On the flip side, I tried this gzip detector on my site (forum.rpg.net) and it says that there's no gzip running:

    http://gzipcheck.jgate.de/

    Result: BAD: not using gzip encoding
    Headers:
    Transfer-Encoding["chunked"]
    Connection["Keep-Alive"]
    Content-Type["text/html; charset=ISO-8859-1"]
    Expires["0"]
    Set-Cookie["PHPSESSID=7701bb2f9d6baaf7ef624860228bf79a; path=/", "bb_lastactivity=0; expires=Tue, 31-Mar-2015 21:08:55 GMT; path=/; domain=.rpg.net", "bb_lastvisit=1396300135; expires=Tue, 31-Mar-2015 21:08:55 GMT; path=/; domain=.rpg.net"]
    Pragma["no-cache"]
    Date["Mon, 31 Mar 2014 21:08:56 GMT"]
    Keep-Alive["timeout=5, max=100"]
    Server["LiteSpeed"]
    null["HTTP/1.1 200 OK"]
    Cache-Control["private, post-check=0, pre-check=0, max-age=0", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"]
    X-Powered-By["PHP/5.3.27"]​

    Color me confused.

    Just to make sure that nothing further is going, I used "iftop" to look at my outgoing bandwidth, and it looks to be all www traffic (mostly crawlers, GRR), which suggests that LS just isn't offering the same amount of compression that it used to when I had it running an Apache configuraiton.

    Any idea how to debug this and/or get the bandwidth back to where it used to be?
    Last edited: Mar 31, 2014
  2. ShannonA

    ShannonA Member

    For completeness sake, here's our gzip setup from the general configuration:

    [​IMG]
    The individual virtual machine I'm looking at (forum.rpg.net) also has GZIP set to on.
  3. ShannonA

    ShannonA Member

    Hmm. Here's another bit of weirdness. If I look at a TXT or XML page, http://gzipcheck.jgate.de/ says that there is "
    Content-Encoding["gzip"]".
    Just not on the PHP pages that make up almost all of the site. However, those PHP pages *do* show a "text/html" type that should be compressed.
  4. ShannonA

    ShannonA Member

    Our forums use vBulletin, so I was able to get GZIP turned on by telling vBulletin to do the ZIPing itself. However, the LS server itself still seems unable to ZIP for the rest of the site. Here's a look at another page, www.rpg.net:

    Result: BAD: not using gzip encoding
    Headers:
    Connection["Keep-Alive"]
    Content-Type["text/html"]
    Keep-Alive["timeout=5, max=100"]
    Server["LiteSpeed"]
    X-Powered-By["PHP/5.3.27"]
    Transfer-Encoding["chunked"]
    null["HTTP/1.1 200 OK"]
    Date["Mon, 31 Mar 2014 22:16:03 GMT"]
    This virtual host should also be using GZIP according to its configuration.

    Shannon
  5. ShannonA

    ShannonA Member

    Alrighty, so the problem with GZIP was that when I went over to the LS configuration, I also went over to LSPHP and to the php.ini for LSPHP wasn't set to support compression. I turned it on and suddenly everything is gzipped:

    zlib.output_compression = On​

    Now of course the next question is if this solves the root problem of increased bandwidth!
  6. ShannonA

    ShannonA Member

    Unfortunately, getting GZIP working again doesn't actually seem to be making a notable difference in our output bandwidth. So, any ideas what might have caused that big increase when we went from Apache config to LS config? Or how to debug it further? Thanks.
  7. NiteWave

    NiteWave Administrator

    have you installed any statistic tool like google analytics ?
    if visits have increased a lot since switch to litespeed, the traffic will increase of course.
  8. tomksoft

    tomksoft New Member

    Given the details you have provided, it is clear for me that gzip works(because once disabled, bandwidth increases), but does not work as well as mod_deflate. I would suggest to modify compression level parameters, as LiteSpeed uses level 1 for dynamic content and mod_deflate most likely uses much more aggressive compression.

    It still all depends on your website(Do you serve big dynamically generated HTML? What kind and sizes of static content etc.), but what I would do is I would try to increase both Dynamic and Static compression levels as high as possible.

    If you have plenty of CPU power available, just crank it up to the limit and see what happens :)
  9. ShannonA

    ShannonA Member

    Thanks. Making sure that the GZIP option for the server, the GZIP option for the Virtual host, and zlib.output_compression option for PHP were all on did the trick.

Share This Page