Forum Discussion

Larry_124999's avatar
Larry_124999
Icon for Nimbostratus rankNimbostratus
May 13, 2013

http-compression in low performance

Hi All

 

We have a LTM web accelerator running v11.1.

 

Behind LTM it is a ASP.net application which can be accessed via internet. The total of in and out internet traffic is about 100Mb. Most of the data is in text type. However, after enable http-compression, the http-compression in dashboard shows only 20Kb traffic in average!

 

The LTM has http-compression license up to 4Gb.

 

The compression in IIS has been turned off.

 

We have tried the selective compression options either URL or content type, but the results are the same. http-compression traffic is about 20Kb in average.

 

The setting in http-compression profile is follow LTM default.

 

In HttpFox, we can see most of the responses with type of http/html (some may up to 200KB or more) are non-compressed. Even do not have Content-Encoding header in respose.

 

Does it normal? Could anyone guide me to fix this issue?

 

 

Thanks!

 

 

Larry

 

 

 

18 Replies

  • SSH again by using root id, and here is the outputs:

     

     

    [root@f5:Active] config tmsh show ltm profile

     

     

    -------------------------------------------------------------

     

    Ltm::HTTP Compression Profile: wan-optimized-compression

     

    -------------------------------------------------------------

     

    Content Type Compression (bytes) Pre-Compress Post-Compress

     

    HTML 11.4K 5.9K

     

    CSS 0 0

     

    JavaScript 105.4K 41.5K

     

    XML 0 0

     

    SGML 0 0

     

    Plain 0 0

     

    Octet Stream 0 0

     

    Images 0 0

     

    Video Files 0 0

     

    Audio Files 0 0

     

    Other 0 0

     

    Total 116.8K 47.5K

     

    NULL-Compress 0 0

     

    Compression Ratio (%) 59.310

     

     

    [root@f5:Active] config tmsh list ltm profile

     

    ltm profile http-compression wan-optimized-compression {

     

    allow-http-10 enabled

     

    buffer-size 131072

     

    defaults-from httpcompression

     

    gzip-memory-level 16k

     

    gzip-window-size 64k

     

    vary-header enabled

     

    }

     

    [root@f5:Active] config

     

  • OK, sorry, can you confirm that is the profile assigned to the VS? Also, can you post the httpcompression profile settings too please?
  • It is confirmed the profile has been applied in VS. I can see this in VS configuration > HTTP Compress Profile.

     

    What command I can list the configuration of httpcompression profile? It remains system default. I have changed nothing.

     

     

    Thanks

     

  • OK, in that case can I suggest you either;

     

     

    1) Use a tool like HTTPWatch, LiveHTTPHeaders or whatever at the client and check what HTTP header Content-Types you see. Perhaps the default list isn't matching.

     

    2) Do a tcpdump on the F5 and look for the same in HTTP responses.
  • I need tol learn how to do tcpdump on the F5 and update you later.

     

     

    Here is the result from httpfox. The content type is correct.

     

     

    00:00:20.6114.125550279792GET200text/htmlhttp://beta4.pushauction.com/Listing/ProfileEdit.aspx?Key=78b8dc6a-f5fa-4c48-a77b-677ec3f61d11

     

    RESPONSE:

     

    (Status-Line)HTTP/1.1 200 OK

     

    Cache-Controlprivate

     

    Content-Typetext/html; charset=utf-8

     

    ServerMicrosoft-IIS/7.5

     

    X-AspNet-Version4.0.30319

     

    X-Powered-ByASP.NET

     

    DateMon, 13 May 2013 18:22:03 GMT

     

    Content-Length336093

     

     

  • Hi Steve

     

     

    The request and response captured in F5 via tcpdump are exactly the same as shown in HttpFox at client browser.

     

    Here is an example of request header, all include Accept_Encoding tag

     

    Host: 4.pushauction.com

     

    Connection: keep-alive

     

    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11 QIHU THEWORLD

     

    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

     

    Referer: http://4.pushauction.com/Listing/Listing.aspx?parentID=103&page=10&btn=hrefListOnline

     

    Accept-Encoding: gzip,deflate,sdch

     

    Accept-Language: zh-CN,zh;q=0.8

     

    Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3

     

    Cookie: __utma=131059338.1972362686.1355392282.1355392282.1355392282.1; __utmz=131059338.1355392282.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); ASP.NET_SessionId=box1anmvqyav31sfstdpy2tc; Lang=en-us; cateid=; folderkey=

     

     

    And only javascript / css got compressed in response, which include vary tag:

     

    16:12:18.828781 IP (tos 0x0, ttl 255, id 49326, offset 0, flags [DF], proto: TCP (6), length: 40) 192.168.0.90.http > 112.90.90.17.ias-admind: ., cksum 0x96ed (correct), 1:1(0) ack 682 win 65535

     

    ....E..(..@.../....ZpZZ..P.](_.S....P.........

     

    16:12:18.828781 IP (tos 0x0, ttl 255, id 49327, offset 0, flags [DF], proto: TCP (6), length: 1480) 192.168.0.90.http > 112.90.90.17.ias-admind: ., cksum 0x3e3b (correct), 1:1441(1440) ack 682 win 65535

     

    ....E.....@...*....ZpZZ..P.](_.S....P...>;..HTTP/1.1 200 OK

     

    Date: Tue, 14 May 2013 08:12:18 GMT

     

    Connection: Keep-Alive

     

    Content-Type: text/css

     

    Last-Modified: Wed, 09 Jan 2013 11:10:36 GMT

     

    Accept-Ranges: bytes

     

    ETag: "WA827ca453e86248d3"

     

    Server: Microsoft-IIS/7.5

     

    X-Powered-By: ASP.NET

     

    Expires: Thu, 16 May 2013 04:51:04 GMT

     

    Cache-Control: public, max-age=172800, s-maxage=14400

     

    Age: 11749

     

    Content-Length: 8852

     

    X-WA-Info: [S10101.C100018.A12236.RA0.U1196752467].[OT/all.OG/includes]

     

    Vary: Accept-Encoding

     

     

    F5 just not to compress plain text like this:

     

    Cache-Control: private

     

    Content-Type: text/xml; charset=utf-8

     

    Server: Microsoft-IIS/7.5

     

    X-AspNet-Version: 4.0.30319

     

    X-Powered-By: ASP.NET

     

    Date: Tue, 14 May 2013 08:06:57 GMT

     

    Content-Length: 11877

     

    X-WA-Info: [S10203.C100018.A12164.RA0.U0].[OT/xml.OG/pages]

     

     

    More samples:

     

    Cache-Control: private

     

    Content-Type: text/html; charset=utf-8

     

    Server: Microsoft-IIS/7.5

     

    X-AspNet-Version: 4.0.30319

     

    X-Powered-By: ASP.NET

     

    Date: Tue, 14 May 2013 08:06:59 GMT

     

    Content-Length: 7352

     

    X-WA-Info: [S10203.C100018.A12164.RA0.U0].[OT/html.OG/pages]

     

     

    Everything settings in F5 is so straight forward. However, I just cannot make F5 compress these plain text!

     

     

    Thanks!

     

     

    Larry

     

     

     

     

     

     

     

  • OK, strange. Could you try a few things please;

     

     

    1) Add the following to the Content Include List of the httpcompression profile: text/*

     

    2) Change the preferred method to Deflate

     

    3) Change the compression level to 6

     

    4) Disable Vary Header insertion