Important to know when building scalable .NET applications

All, Just to let you know below some more information on building scalable .NET applications

a performance killer is the CLR build mode being used.. almost every .net app runs in the "workstation build" mode instead of server build.  (even microsoft apps like reporting server)

The difference is that besides the Garbage Collection impact, the workstation mode dll will only use 1.5 - 2 cpu's versus all available 8,16 or 32 cpu's

basically blocking serious throughput. (we have seen apps that after we forced it to run in server mode, the throughput went up by a factor 3x..)

Easy check to see in what mode it runs, is to check which dll the app is using :
when it runs in the workstation CLR mode , it is recognisable by the usage of MSCORWKS.DLL , the server clr uses MSCORSVR.DLL.

( A utility like www.Sysinternals.com - Process Explorer will show it quickly and also which threads a truly doing some work within the app)

click here to see how to enable Server Build mode

Click here to see how this setting affects the number of processors

Published 09-16-2004 9:43 AM by Patrick Wellink
Filed under:

Comments

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 9:53 AM by Patrick Wellink
Ok now the interresting question is how do you set an application to server build ?

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 9:57 AM by Patrick Wellink
I don't knwo but surely there is something about it on google......

hey and if you find it post it here please.....

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 10:50 AM by Patrick Wellink
Found a link.... Added it to the article

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 11:00 AM by Patrick Wellink
Finally something usefull from you, Patrick...

And something that works with both VB.NET and C# ;-)

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 11:11 AM by Patrick Wellink
From what I understand is that the config file only influences the way the GC works.

Why do you think it also makes a difference in the usage of CPU's? Do you have some info or link?

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 12:09 PM by Patrick Wellink
Well thanks Ernst....

added another link from MSDN where the number of processors is explained

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 1:10 PM by Patrick Wellink
I've read a number of articles on this topic.

Conclusion: there is NO supported way with v1.0 or v1.1 to specify server GC mode without an unmanaged host...!

With Whidbey (v2.0) and v1.1 SP1 (recently released) there is the ability to specify the gc mode in the application's config file.

# re: Important to know when building scalable .NET applications

Thursday, September 16, 2004 11:45 PM by Patrick Wellink
According to this article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/highperfmanagedapps.asp you do not have to worry about ASP.NET applications because they always use the Server GC.

# re: Important to know when building scalable .NET applications

Friday, September 17, 2004 9:32 AM by Patrick Wellink
Hmmm... a lot of contradictory info on this topic.

Why does the article, posted by Erwyn, mention the MSDN article from March 01 in which the CLR is explicitly hosted by an unmanaged host?

How can this article say that ASP.NET always hosts the server GC automatically when in other articles it is said that the workstation GC is loaded when only 1 CPU is available?