Powered by Blogger.

Saturday, March 1, 2014

How to enable Prefetching for web applications in Windows server



Prefetcher  is a windows technology used to  reduce the disk-read cost of application startup. Because cold startup is a problem predominantly for client applications, this technology has not been included in Windows Server. Prefetching is now available in the latest version of Windows Server, where it can optimize the launch of individual websites.

For Windows Server, the prefetcher is not enabled by default. To enable and configure the prefetcher for high-density web hosting, run the following set of commands at the command line:

sc config sysmain start=auto
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 2 /f
reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Prefetcher" /v MaxPrefetchFiles /t REG_DWORD /d 8192 /f
net start sysmain
Then, to integrate the prefetcher with ASP.NET applications, add the following to the Web.config file:
<configuration>
  <!-- ... -->
  <system.web>
        <compilation enablePrefetchOptimization="true" />
  <!-- ... -->  



0 comments

Post a Comment