Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. .NET 2.0 application cold-start time [modified]

.NET 2.0 application cold-start time [modified]

Scheduled Pinned Locked Moved .NET (Core and Framework)
performancecsharpc++asp-netdotnet
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adrian Cole
    wrote on last edited by
    #1

    Let's say I have a .NET 2.0 application that needs to load about 30 different .NET 2.0 assemblies during startup. Said application is taking about 35 seconds to cold-start and about 13 seconds to warm-start under a specific environment. I am aware that these numbers are fairly typical of .NET 2.0 applications. Our company did not develop said application, but am tasked with coming up with suggestions on how to improve the cold-start performance. The reading I have done suggests that the difference in the two times is due to pages still being available in memory and not as many hard-faults (disk accesses) need to be performed to reload an assembly. Things I have identified as potential solutions are: 1. Update the minimum hardware requirements (not sure what they currently are, but the tests above were done on a 1.8 GHz P4 with 512MB RAM). The cold-start time drops from 35 to 13 seconds on my development box which is a 3.0 GHz Dual Core with 2GB RAM. Warm-start time drops from 13 seconds to 3 seconds. 2. Update the application and all its assemblies to .NET 3.5. Any idea what improvement is this likely to achieve? 3. Generate native images for the assemblies. This is a trade-off between the time needed to load larger disk images and the time required to JIT-compile a CLR assembly. Is this worth pursuing further? 4. Rebase the assemblies. Using Process Explorer from SysInternals I observed that 30 assemblies were relocated by the OS Loader. Preliminary tests indicate that the performance improvement is negligible. 5. Preload the assemblies. What this would try to achieve is to mimic a warm-start, but I'm not sure how it would have to work. If I have a pre-loader application that loads the assemblies needed by the actual application, aren't different copies of the assemblies loaded by each application into its own AppDomain? How would this help improve cold-start performance unless the assemblies are put in a common place? As you can see I'm a little confused. Help? I have gleaned most of my information online from http://msdn.microsoft.com/en-us/magazine/cc163655.aspx[^]. I look forward to hearing suggestions, ideas. Thanks.

    modified on Thursday, April 30, 2009 7:41 PM

    D 1 Reply Last reply
    0
    • A Adrian Cole

      Let's say I have a .NET 2.0 application that needs to load about 30 different .NET 2.0 assemblies during startup. Said application is taking about 35 seconds to cold-start and about 13 seconds to warm-start under a specific environment. I am aware that these numbers are fairly typical of .NET 2.0 applications. Our company did not develop said application, but am tasked with coming up with suggestions on how to improve the cold-start performance. The reading I have done suggests that the difference in the two times is due to pages still being available in memory and not as many hard-faults (disk accesses) need to be performed to reload an assembly. Things I have identified as potential solutions are: 1. Update the minimum hardware requirements (not sure what they currently are, but the tests above were done on a 1.8 GHz P4 with 512MB RAM). The cold-start time drops from 35 to 13 seconds on my development box which is a 3.0 GHz Dual Core with 2GB RAM. Warm-start time drops from 13 seconds to 3 seconds. 2. Update the application and all its assemblies to .NET 3.5. Any idea what improvement is this likely to achieve? 3. Generate native images for the assemblies. This is a trade-off between the time needed to load larger disk images and the time required to JIT-compile a CLR assembly. Is this worth pursuing further? 4. Rebase the assemblies. Using Process Explorer from SysInternals I observed that 30 assemblies were relocated by the OS Loader. Preliminary tests indicate that the performance improvement is negligible. 5. Preload the assemblies. What this would try to achieve is to mimic a warm-start, but I'm not sure how it would have to work. If I have a pre-loader application that loads the assemblies needed by the actual application, aren't different copies of the assemblies loaded by each application into its own AppDomain? How would this help improve cold-start performance unless the assemblies are put in a common place? As you can see I'm a little confused. Help? I have gleaned most of my information online from http://msdn.microsoft.com/en-us/magazine/cc163655.aspx[^]. I look forward to hearing suggestions, ideas. Thanks.

      modified on Thursday, April 30, 2009 7:41 PM

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Based on the description of your problem, number 3 is where I'd start. Google "NGEN" and you'll find the command line utility that creates the native images for your assemblies.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups