<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Omar AL Zabir blog on ASP.NET Ajax and .NET 3.5 : optimize</title><link>http://msmvps.com/blogs/omar/archive/tags/optimize/default.aspx</link><description>Tags: optimize</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>7 tips for for loading Javascript rich Web 2.0-like sites significantly faster</title><link>http://msmvps.com/blogs/omar/archive/2009/09/25/7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx</link><pubDate>Fri, 25 Sep 2009 14:46:19 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1726818</guid><dc:creator>omar</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/omar/rsscomments.aspx?PostID=1726818</wfw:commentRss><comments>http://msmvps.com/blogs/omar/archive/2009/09/25/7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx#comments</comments><description>&lt;h2&gt;Introduction&lt;/h2&gt;  &lt;p&gt;When you create rich Ajax application, you use external JavaScript frameworks and you have your own homemade code that drives your application. The problem with well known JavaScript framework is, they offer rich set of features which are not always necessary in its entirety. You may end up using only 30% of jQuery but you still download the full jQuery framework. So, you are downloading 70% unnecessary scripts. Similarly, you might have written your own javascripts which are not always used. There might be features which are &lt;strong&gt;not&lt;/strong&gt; used when the site loads for the first time, resulting in unnecessary download during initial load. Initial loading time is crucial – it can make or break your website. We did some analysis and found that every 500ms we added to initial loading, we lost approx 30% traffic who never wait for the whole page to load and just close browser or go away. So, saving initial loading time, even by couple of hundred milliseconds, is crucial for survival of a startup, especially if it’s a Rich AJAX website.&lt;/p&gt;  &lt;p&gt;You must have noticed Microsoft’s new tool &lt;a title="Doloto download optimizer" href="http://research.microsoft.com/en-us/projects/doloto/"&gt;Doloto&lt;/a&gt; which helps solve the following problem:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Modern Web 2.0 applications, such as GMail, Live Maps, Facebook and many others, use a combination of Dynamic HTML, JavaScript and other Web browser technologies commonly referred as AJAX to push page generation and content manipulation to the client web browser. This improves the responsiveness of these network-bound applications, but the shift of application execution from a back-end server to the client also often dramatically increases the amount of code that must first be downloaded to the browser. This creates an unfortunate Catch-22: to create responsive distributed Web 2.0 applications developers move code to the client, but for an application to be responsive, the code must first be transferred there, which takes time.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Microsoft Research looked at this problem and published &lt;a title="Doloto Research Papper" href="http://research.microsoft.com/en-us/projects/doloto/fse08.pdf"&gt;this research paper in 2008&lt;/a&gt;, where they showed how much improvement can be achieved on initial loading if there was a way to split the javascripts frameworks into two parts – one primary part which is absolutely essential for initial rendering of the page and one auxiliary part which is not essential for initial load and can be downloaded later or on-demand when user does some action. They looked at my earlier startup &lt;a title="Web 2.0 Start Page" href="http://www.pageflakes.com"&gt;Pageflakes&lt;/a&gt; and reported:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;2.2.2 Dynamic Loading: Pageflakes      &lt;br /&gt;A contrast to Bunny Hunt is the &lt;a title="Pageflakes Web 2.0 start page" href="http://www.pageflakes.com"&gt;Pageflakes&lt;/a&gt; application, an       &lt;br /&gt;industrial-strength mashup page providing portal-like functionality.       &lt;br /&gt;While the download size for Pageflakes is over 1 MB, its initial       &lt;br /&gt;execution time appears to be quite fast. Examining network activity       &lt;br /&gt;reveals that Pageflakes downloads only a small stub of code       &lt;br /&gt;with the initial page, and loads the rest of its code dynamically in       &lt;br /&gt;the background. As illustrated by Pageflakes, developers today can       &lt;br /&gt;use dynamic code loading to improve their web application’s performance.       &lt;br /&gt;However, designing an application architecture that is       &lt;br /&gt;amenable to dynamic code loading requires careful consideration       &lt;br /&gt;of JavaScript language issues such as function closures, scoping,       &lt;br /&gt;etc. Moreover, an optimal decomposition of code into dynamically       &lt;br /&gt;loaded components often requires developers to set aside the semantic       &lt;br /&gt;groupings of code and instead primarily consider the execution       &lt;br /&gt;order of functions. Of course, evolving code and changing       &lt;br /&gt;user workloads make both of these issues a software maintenance       &lt;br /&gt;nightmare.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Back in 2007, I was looking at ways to improve the initial load time and reduce user dropout. The number of users who would not wait for the page to load and go away was growing day by day as we introduced new and cool features. It was a surprise. We thought new features will keep more users on our site but the opposite happened. Analysis concluded it was the initial loading time that caused more dropout than it retained users. So, all our hard work was essentially going to drain and we had to come up with something ground breaking to solve the problem. Of course we had already tried all the basic stuffs – &lt;a title="IIS 6 compression setup quick and easy way" href="http://msmvps.com/blogs/omar/archive/2006/08/10/iis-6-compression-quickest-and-effective-way-to-do-it-for-asp-net-compression.aspx"&gt;IIS compression&lt;/a&gt;, &lt;a title="Making best use of cache for faster page loading" href="http://msmvps.com/blogs/omar/archive/2006/08/10/iis-6-compression-quickest-and-effective-way-to-do-it-for-asp-net-compression.aspx"&gt;browser caching&lt;/a&gt;, &lt;a title="Ensure - loading javascript, css, html on demand" href="http://www.codeplex.com/ensure"&gt;on-demand loading of JavaScript, css and html&lt;/a&gt; when user does something, &lt;a title="Deferred Javascript Execution" href="http://ajaxian.com/archives/gmail-mobile-latency"&gt;deferred JavaScript execution&lt;/a&gt; – but nothing helped. The frameworks and our own hand coded framework was just too large. So, the idea tricked me, what if we could load functions inside a class in two steps. First step will load the class with absolutely essential functions and second step will inject more functions to the existing classes.&lt;/p&gt;  &lt;p&gt;I published a codeproject article which shows you 7 tricks to significantly improve page load time even if you have large amount of Javascript used on the page.&lt;/p&gt;  &lt;p&gt;&lt;a title="7 Tips for Loading JavaScript Rich Web 2.0-like Sites Significantly Faster" href="http://www.codeproject.com/KB/ajax/fastjavascript.aspx"&gt;7 Tips for Loading JavaScript Rich Web 2.0-like Sites Significantly Faster&lt;/a&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Use Doloto &lt;/li&gt;    &lt;li&gt;Split a Class into Multiple JavaScript Files &lt;/li&gt;    &lt;li&gt;Stub the Functions Which Aren&amp;#39;t Called During Initial Load &lt;/li&gt;    &lt;li&gt;JavaScript Code in Text &lt;/li&gt;    &lt;li&gt;Break UI Loading into Multiple Stages &lt;/li&gt;    &lt;li&gt;Always Grow Content from Top to Bottom, Never Shrink or Jump &lt;/li&gt;    &lt;li&gt;Deliver Browser Specific Script from Server &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;If you like these tricks, please vote for me!&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px;padding:0px 0px 0px 0px;"&gt;&lt;a href="http://dotnetburner.com/vote?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2009%2f09%2f25%2f7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx" rev="vote-for"&gt;&lt;img src="http://dotnetburner.com/image.axd?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2009%2f09%2f25%2f7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx" style="border:0px;" alt="Burn!" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2009%2f09%2f25%2f7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx" rev="vote-for"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2009%2f09%2f25%2f7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx" style="border:0px;" alt="kick it" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a rev="vote-for" href="http://dotnetshoutout.com/Submit?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2009%2f09%2f25%2f7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx"&gt;&lt;img alt="Shout it" src="http://dotnetshoutout.com/image.axd?url=http%3a%2f%2fmsmvps.com%2fblogs%2fomar%2farchive%2f2009%2f09%2f25%2f7-tips-for-for-loading-javascript-rich-web-2-0-like-sites-significantly-faster.aspx" style="border:0px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1726818" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/omar/archive/tags/performance/default.aspx">performance</category><category domain="http://msmvps.com/blogs/omar/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://msmvps.com/blogs/omar/archive/tags/javascript/default.aspx">javascript</category><category domain="http://msmvps.com/blogs/omar/archive/tags/ajax/default.aspx">ajax</category><category domain="http://msmvps.com/blogs/omar/archive/tags/optimize/default.aspx">optimize</category></item><item><title>Reduce website download time by heavily compressing PNG and JPEG</title><link>http://msmvps.com/blogs/omar/archive/2008/04/07/reduce-website-download-time-by-heavily-compressing-png-and-jpeg.aspx</link><pubDate>Mon, 07 Apr 2008 13:17:47 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1576733</guid><dc:creator>omar</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/omar/rsscomments.aspx?PostID=1576733</wfw:commentRss><comments>http://msmvps.com/blogs/omar/archive/2008/04/07/reduce-website-download-time-by-heavily-compressing-png-and-jpeg.aspx#comments</comments><description>&lt;p&gt;PNG and JPEG are two most popular formats for web graphics. JPEG is used for photographs, screenshots and backgrounds where PNG is used for all other graphics need including cliparts, buttons, headers, footers, borders and so on. As a result, these two types of graphics file usually take up 80% of the total graphics used in a website. Of course, there&amp;#39;s the GIF, which is very popular. But as it supports only 256 colors, it is losing its popularity day by day. PNG seems to be a all rounder winner for all kinds of graphics need. As all browsers support PNG well enough and PNG supports alpha transparency, it&amp;#39;s surely the best format so far on the web for all purpose graphics need for websites. So, if you can optimize all PNG and JPEG on your website and compress them rigorously, you can easily shed off several seconds of load time from your website without doing any coding. Especially if your website is graphics rich like &lt;a href="http://www.pageflakes.com"&gt;Pageflakes&lt;/a&gt;, 30% reduction in total size of graphics throughout the website is a big performance win.&lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;Optimize all PNG on your website&lt;/h3&gt; &lt;p&gt;PNG has a lot of scope for optimization. Generally regular graphics tools like Photoshop, Paintshop pro, Paint.NET all generate PNG using a moderate compression. So, PNG can be compressed further by using advanced compression tools. &lt;a href="http://en.wikipedia.org/wiki/OptiPNG"&gt;OptiPNG&lt;/a&gt; is such a tool that can compress PNG and sometimes produce 50% smaller output. At Pageflakes, we have around 380 PNG which when compressed using OptiPNG, gives us 40% reduction in total size. This is a big win for us.&lt;/p&gt; &lt;p&gt;Here&amp;#39;s what wikipedia says about OptiPNG:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;OptiPNG is an open source command line computer program that reduces the size of PNG files. The compression is lossless, meaning that the resulting image will have exactly the same appearance as the source image.  &lt;p&gt;The main purpose of OptiPNG is to reduce the size of the PNG IDAT data stream by trying various filtering and compression methods. It also performs automatic bit depth, color type and color palette reduction where possible, and can correct some data integrity errors in input files.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Here&amp;#39;s a poweshell script that you can run from the root folder of your website. It will scan through all the PNG files in the webtree and run OptiPNG on each file. This takes quite some time if you have hundreds of files. So, you should make it a part of your build script.&lt;/p&gt;&lt;pre class="csharpcode"&gt;gci -include *.png -recurse | &lt;span class="kwrd"&gt;foreach&lt;/span&gt;
 { $fileName = $_.FullName; cmd /c &amp;quot;C:\soft\png\optipng.exe -o7 `&amp;quot;&lt;span class="str"&gt;$fileName`&amp;quot;&amp;quot;&lt;/span&gt; }&lt;/pre&gt;
&lt;p&gt;Here I have stored the optipng.exe on the c:\soft\png folder.&lt;/p&gt;
&lt;p&gt;OptiPNG gives very good compression. But there&amp;#39;s even more scope for compression. &lt;a href="http://en.wikipedia.org/wiki/AdvanceCOMP"&gt;AdvanceCOMP&lt;/a&gt; is the ultimate in compression technology for PNG as it uses the mighty &lt;a href="http://www.7-zip.org/"&gt;7zip&lt;/a&gt; compression algorithm. It can squeeze down PNG even further after being compressed by OptiPNG using its maximum compression mode. PNG files are compressed using DEFLATE algorithm. DEFLATE has 0 to 9 compression level, where 9 is the highest. AdvanceCOMP uses 7zip DEFLATE encoder, that extends the compression factor even more. During 7zip compression, a much more detailed search of compression possibilities is performed, at the expense of significant further processor time spent on searching. Effectively, the 10-point scale used in gzip is extended to include extra settings above 9, the previous maximum search level. There will be no difference in decompression speed, regardless of the level of compressed size achieved or time taken to encode the data.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a poweshell script that you can run from the root folder of your website. It will scan through all the PNG files in the webtree and run AdvanceCOMP on each file. You need to run AdvanceCOMP after running OptiPNG.&lt;/p&gt;&lt;pre class="csharpcode"&gt;gci -include *.png -recurse | &lt;span class="kwrd"&gt;foreach&lt;/span&gt;
 { $fileName = $_.FullName; cmd /c &lt;span class="str"&gt;&amp;quot;C:\soft\png\advpng.exe 
 --shrink-insane -z `&amp;quot;&lt;/span&gt;$fileName`&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt; }&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have collected &lt;a href="http://omar.mvps.org/tool/png.zip"&gt;both optipng and advpng in this zip&lt;/a&gt; file.&lt;/p&gt;
&lt;h3&gt;Optimize all JPEG on your website&lt;/h3&gt;
&lt;p&gt;Unfortunately, there&amp;#39;s not much powerful tool like OptiPNG for jpeg that you can run on all your jpeg files and compress them rigorously. JPEG file is compressed when it is saved. Generally all graphics applications provide you an option to select what&amp;#39;s the quality ratio of the jpeg being saved. So, you have to consciously make the best compression vs quality choice while saving the jpeg file. However, &lt;a href="http://en.wikipedia.org/wiki/Libjpeg"&gt;libjpeg&lt;/a&gt; project has a jpeg optimizer tool that does some optimization on jpeg files. It has a jpegtran utility which does the optimization according to wikipedia:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;jpegtran - a utility for lossless transcoding between different JPEG formats. The jpegtran command-line program is useful to optimize the compression of a JPEG file, convert between progressive and non-progressive JPEG formats, eliminate non-standard application-specific data inserted by some image programs, or to perform certain transformations on a file — such as grayscaling, or rotating and flipping (within certain limits) — all done &amp;quot;losslessly&amp;quot; (i.e. without decompressing and recompressing the data, and so causing a reduction of image quality due to generation loss).&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;However, when we ran jpegtran on all the jpeg files in Pageflakes, we are able to reduce about 20% total size of all jpeg. So, that was not too bad. &lt;/p&gt;
&lt;p&gt;Here&amp;#39;s how you run jpegtran to get all the jpeg files within your website directory optimized:&lt;/p&gt;&lt;pre class="csharpcode"&gt;gci -include *.jpg -recurse | &lt;span class="kwrd"&gt;foreach&lt;/span&gt;
 { $fileName = $_.FullName; $newFileName = $fileName + &lt;span class="str"&gt;&amp;quot;.tmp&amp;quot;&lt;/span&gt;; 
cmd /c &lt;span class="str"&gt;&amp;quot;C:\soft\jpeg\jpegtran.exe -optimize -outfile `&amp;quot;&lt;/span&gt;$newFileName`&lt;span class="str"&gt;&amp;quot; `&amp;quot;&lt;/span&gt;$fileName`&lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;; 
copy $newFileName $fileName; del $newFileName; }&lt;/pre&gt;
&lt;p&gt;The &lt;a href="http://omar.mvps.org/tool/jpeg.zip"&gt;libjpeg binaries are uploaded here&lt;/a&gt; for your convenience.&lt;/p&gt;
&lt;p&gt;Warning: You have to run all these powershell commands in a single line. I have broken the commands in multiple line for better readability.&lt;/p&gt;
&lt;p&gt;Let&amp;#39;s save global bandwidth, go green.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1576733" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/omar/archive/tags/performance/default.aspx">performance</category><category domain="http://msmvps.com/blogs/omar/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://msmvps.com/blogs/omar/archive/tags/production/default.aspx">production</category><category domain="http://msmvps.com/blogs/omar/archive/tags/powershell/default.aspx">powershell</category><category domain="http://msmvps.com/blogs/omar/archive/tags/compress/default.aspx">compress</category><category domain="http://msmvps.com/blogs/omar/archive/tags/optimize/default.aspx">optimize</category><category domain="http://msmvps.com/blogs/omar/archive/tags/jpeg/default.aspx">jpeg</category><category domain="http://msmvps.com/blogs/omar/archive/tags/png/default.aspx">png</category></item><item><title>A significant part of sql server process memory has been paged out. This may result in performance degradation</title><link>http://msmvps.com/blogs/omar/archive/2007/09/19/a-significant-part-of-sql-server-process-memory-has-been-paged-out-this-may-result-in-performance-degradation.aspx</link><pubDate>Wed, 19 Sep 2007 07:46:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1205524</guid><dc:creator>omar</dc:creator><slash:comments>31</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/omar/rsscomments.aspx?PostID=1205524</wfw:commentRss><comments>http://msmvps.com/blogs/omar/archive/2007/09/19/a-significant-part-of-sql-server-process-memory-has-been-paged-out-this-may-result-in-performance-degradation.aspx#comments</comments><description>&lt;p&gt;If you are using SQL Sever Server standard edition 64 bit on a Windows 2003 64bit, you will frequently encounter this problem where SQL Server says:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;A significant part of sql server process memory has been paged out. This may result in performance degradation. Duration 0 seconds. Working set (KB) 25432, committed (KB) 11296912, memory utilization 0%&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The number in working set and duration will vary. What happens here is SQL Server is forced to release memory to operating system because some other application or OS itself needs to allocate RAM.&lt;/p&gt; &lt;p&gt;We went through many support articles like:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/918483"&gt;918483&lt;/a&gt;: How to reduce paging of buffer pool memory in the 64-bit version of SQL Server 2005  &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/905865/"&gt;905865&lt;/a&gt;: The sizes of the working sets of all the processes in a console session may be trimmed when you use Terminal Services to log on to or log off from a computer that is running Windows Server 2003  &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/920739/"&gt;920739&lt;/a&gt;: You may experience a decrease in overall system performance when you are copying files that are larger than approximately 500 MB in Windows Server 2003 Service Pack 1 &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;But nothing solved the problem. We still have the page out problem happening every day.&lt;/p&gt; &lt;p&gt;The server has 16 GB RAM where 12 GB is maximum limit allocated to SQL Server. 4 GB is left to OS and and other application. We have also turned off antivirus and any large backup job. 12 GB RAM should be plenty because there&amp;#39;s no other app running on the dedicated SQL Server box. But the page out still happens. When this happens, SQL Server becomes very slow. Queries timeout, website throws error, transactions abort. Sometimes this problems goes on for 30 to 40 minutes and website becomes slow/unresponsive during that time.&lt;/p&gt; &lt;p&gt;I have found what causes SQL Server to page out. File System cache somehow gets really high and forces SQL Server to trim down.&lt;/p&gt; &lt;p&gt;&lt;img height="663" alt="clip_image002" src="http://omar.mvps.org/images/SQLServerhaspagedoutsignificant_10B/clip_image002.jpg" width="557" /&gt; &lt;/p&gt; &lt;p&gt;You see the System cache resident bytes are very high. During this time SQL Server gets much less RAM than it needs. Queries timeout at very high rate like 15 per sec. Moreover, there&amp;#39;s high SQL Lock Timeout/sec (around 15/sec not captured in screen shot).&lt;/p&gt; &lt;p&gt;&lt;img height="191" alt="clip_image004" src="http://omar.mvps.org/images/SQLServerhaspagedoutsignificant_10B/clip_image004.jpg" width="549" /&gt; &lt;/p&gt; &lt;p&gt;SQL Server max memory is configured 12 GB. But here it shows it’s getting less than 8 GB.&lt;/p&gt; &lt;p&gt;While the file system cache is really high, there’s no process that’s taking significant RAM.&lt;/p&gt; &lt;p&gt;&lt;img height="648" alt="clip_image006" src="http://omar.mvps.org/images/SQLServerhaspagedoutsignificant_10B/clip_image006.jpg" width="340" /&gt; &lt;/p&gt; &lt;p&gt;After I used SysInternal’s &lt;a href="http://www.microsoft.com/technet/sysinternals/FileAndDisk/CacheSet.mspx"&gt;CacheSet&lt;/a&gt; to reset file system cache and set around 500 MB as max limit, memory started to free up.&lt;/p&gt; &lt;p&gt;&lt;img height="285" alt="clip_image008" src="http://omar.mvps.org/images/SQLServerhaspagedoutsignificant_10B/clip_image008.jpg" width="557" /&gt; &lt;/p&gt; &lt;p&gt;SQL Server started to see more RAM free:&lt;/p&gt; &lt;p&gt;&lt;img height="92" alt="clip_image010" src="http://omar.mvps.org/images/SQLServerhaspagedoutsignificant_10B/clip_image010.jpg" width="564" /&gt; &lt;/p&gt; &lt;p&gt;Then I hit the “Clear” button to clear file system cache and it came down dramatically.&lt;/p&gt; &lt;p&gt;&lt;img height="668" alt="clip_image012" src="http://omar.mvps.org/images/SQLServerhaspagedoutsignificant_10B/clip_image012.jpg" width="553" /&gt; &lt;/p&gt; &lt;p&gt;Paging stopped. System cache was around 175 MB only. SQL Server lock timeout came back to zero. Everything went back to normal.&lt;/p&gt; &lt;p&gt;So, I believe there&amp;#39;s either some faulty driver or the OS itself is leaking file system cache in 64bit environment.&lt;/p&gt; &lt;p&gt;What we have done is, we have a dedicated person who goes to production database servers every hour, runs the CacheSet program and clicks &amp;quot;Clear&amp;quot; button. This clears the file system cache and prevents it from growing too high.&lt;/p&gt; &lt;p&gt;There are lots of articles written about this problem. However, the most informative one I have found is from the SQL Server PSS team:&lt;/p&gt; &lt;p&gt;&lt;a title="http://blogs.msdn.com/psssql/archive/2007/05/31/the-sql-server-working-set-message.aspx" href="http://blogs.msdn.com/psssql/archive/2007/05/31/the-sql-server-working-set-message.aspx"&gt;http://blogs.msdn.com/psssql/archive/2007/05/31/the-sql-server-working-set-message.aspx&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;UPDATE - THE FINAL SOLUTION!&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The final solution is to run this program on Windows Startup:&lt;/p&gt; &lt;p&gt;SetSystemFileCacheSize 128 256&lt;/p&gt; &lt;p&gt;This sets the lower and higher limit for the System Cache. You need to run this on every windows startup because a restart will undo the cache setting to unlimited.&lt;/p&gt; &lt;p&gt;You can run the program without any parameter to see what is the current setting.&lt;/p&gt; &lt;p&gt;Download the program from this page:&lt;/p&gt; &lt;p&gt;&lt;a title="http://www.uwe-sieber.de/ntcacheset_e.html" href="http://www.uwe-sieber.de/ntcacheset_e.html"&gt;http://www.uwe-sieber.de/ntcacheset_e.html&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Go to the end and you will get the link to the SetSystemFileCacheSize.zip&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1205524" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/omar/archive/tags/sql+server/default.aspx">sql server</category><category domain="http://msmvps.com/blogs/omar/archive/tags/performance/default.aspx">performance</category><category domain="http://msmvps.com/blogs/omar/archive/tags/pageflakes/default.aspx">pageflakes</category><category domain="http://msmvps.com/blogs/omar/archive/tags/production/default.aspx">production</category><category domain="http://msmvps.com/blogs/omar/archive/tags/optimize/default.aspx">optimize</category></item></channel></rss>