{"id":2000,"date":"2012-03-19T06:26:02","date_gmt":"2012-03-19T06:26:02","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=2000"},"modified":"2024-05-13T10:48:41","modified_gmt":"2024-05-13T10:48:41","slug":"compression-in-iis","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/compression-in-iis\/","title":{"rendered":"Compression In IIS"},"content":{"rendered":"<p>There\u2019s a relatively obscure setting in IIS that can have a dramatic effect on the performance perceived by SharePoint users.\u00a0 By enabling IIS to compress the communication to the user, communication to the user can consume less bandwidth.<\/p>\n<p>The trade-off is with CPU usage to compress the messages.<\/p>\n<ul>\n<li>Note the setting is quite fine-grained, allowing you to find the optimal balance of bandwidth conversation against the available SharePoint farm WFE (Web Front End) CPU.<\/li>\n<\/ul>\n<p>If you open a simple CMD window on your SharePoint WFE, run the following commands (all commands below assume this drive and directory):<\/p>\n<pre>c: CD WindowsSystem32Inetsrv appcmd\u00a0list config\u00a0-section:httpcompression<\/pre>\n<p>This will show you the current compression settings.\u00a0\u00a0 Note there are two categories of compression: Static and Dynamic.\u00a0 We will want to set both.\u00a0 There are more than one compression mechanism.\u00a0 GZip is recommended.\u00a0 The compression can be set between 0 (no compression) and 9 (ultimate).\u00a0 I would suggest the sweet spot is between 4 and 7 (your mileage may vary).\u00a0 Here\u2019s the command:<\/p>\n<pre>Appcmd.exe\u00a0 set config\u00a0-section:httpCompression\u00a0\u00a0 -[name='gzip'].staticCompressionLevel:9\u00a0\u00a0 -[name='gzip'].dynamicCompressionLevel:7<\/pre>\n<p>I look at each environment; not just Production, but Dev and UAT\u00a0environments.\u00a0 Where are they located?\u00a0 How many CPUs are available?\u00a0 If you are running below Microsoft CPU minimums (shame on you!) then perhaps adding to the CPU load isn\u2019t for you.\u00a0 If you access your environment over a thin pipe to a remote location, then IIS Compression can make a significant difference in performance.<\/p>\n<p>Let\u2019s look a bit closer at Dynamic Compression.\u00a0 There are two settings that control when compression is enabled and disabled.\u00a0 The default is that when the CPU utilization is below 50% compression gets enabled.\u00a0 Above 90% compression gets disabled.\u00a0 The CPU utilization is sampled by IIS every 30 seconds.\u00a0 I think 90% CPU utilization is rather high, given all the SharePoint wonderfulness going on in my farm, so I crank these settings down a bit with these two commands:<\/p>\n<pre>appCmd\u00a0set config\u00a0-section:httpCompression\u00a0\/dynamicCompressionDisableCpuUsage:50 appCmd\u00a0set config\u00a0-section:httpCompression\u00a0\/dynamicCompressionEnableCpuUsage:30<\/pre>\n<p>There is a setting to control the minimum size of the object before compression is applied.\u00a0 The default is 256 bytes.\u00a0 This applies the overhead of compression to some pretty small files.\u00a0 You can choose to increase it to 512:<\/p>\n<pre>appCmd\u00a0set config\u00a0-section:httpCompression\u00a0\/MinFileSizeForComp:512<\/pre>\n<p>I found a dramatic improvement in perceived SharePoint performance for users connected over a thin pipe to SharePoint.\u00a0 This includes remote users.\u00a0 Give it a try, and let me know what you experience!\u00a0 For more information, please reference Bill Baer\u2019s in-depth TechNet article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There\u2019s a relatively obscure setting in IIS that can have a dramatic effect on the performance perceived by SharePoint users.\u00a0 By enabling IIS to compress the communication to the user, communication to the user can consume less bandwidth. The trade-off is with CPU usage to compress the messages. Note the setting is quite fine-grained, allowing [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":2002,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[38],"tags":[],"class_list":["post-2000","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ils"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/2000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=2000"}],"version-history":[{"count":2,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/2000\/revisions"}],"predecessor-version":[{"id":3961,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/2000\/revisions\/3961"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/2002"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=2000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=2000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=2000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}