searchn For t Guarantee isearch r Effective i Study l For , Formula Ia Effectivestudyformula searcho Guarantee nsearch For o Effective usearchean Supplements m Effectivestudyformula e Category fsearcht Effective o Formula s Guarantee ts Category ar Category hh Szh h Formula w, Effective b Study csearchusearche Szh .searchE Supplements searchp Study lca For iosearchsrnsearchonsearchto fsearchte For CRsearch Supplements hi Effectivestudyformula g Formula rsearch n Guarantee tsearchal Study asearchs searchssearchssearchrsearchi Szh h osearchwr For asearch hsearchysearchsesearch. Category &8search1;search Study lsog Effective i Study gtosearchp Effective ove Category t Study ou Category h Effective t Study h Guarantee gsearch C Men Usearchusasearche Szh an For ssearchosearch Guarantee e Supplements fsearchrmancesearchi Men searchor Study a Guarantee pl Formula cation Effectivestudyformula Men re nt l Category ay Study Effectivestudyformula ause Effective y lo Study code, but sometimes by poor or excessive memory use.
The example that I will use is of an ASP.NET website where users have complained of random slowness.  As usual, the DBA has been blamed, but has investigated and assured everyone that the database isn't responsible, so it’s time to grab a profiler and dig into the problem.
I should point out that this article is a walkthrough of how to use different tools to track down performance issues, rather than a stick to beat the garbage collector with.  In this case the performance issues can be frustrating, but the garbage collector is doing its best with what the ASP.NET developers have given it.  The behaviour we’ll be seeing is also limited to ASP.NET, as it uses the “server-mode” garbage collection, which aims to optimise throughput over responsiveness.

The Problem
The demo site (downloadable from the top of this article) is made up of one page with three buttons; the first button uses large chunks of memory, the second frees that memory, and the third performs an operation which normally takes around 1 millisecond to complete.  When any of the buttons are pushed, the time of day and time to run are displayed. To make it easier to reproduce a problem, I am using a 32-bit process, so we are limited to a mere 2GB of memory (yes, I know I could push it to 3GB, but let’s not complicate matters).  In case you are wondering how realistic this demo is, with respect to having one button to immediately allocate loads of memory, in a real life situation there may well be a background operation that suddenly uses up great chunks of memory, or it might be lots of users hitting pages all at once which causes the memory usage to abruptly go up.
This exciting screenshot shows how button 1 usually takes ages to complete and, before it suddenly failed with an OutOfMemory Exception at 12:49:38, the longest button 3 had taken to complete its operation was 21 milliseconds. After this inexplicable failure, we start to see memory pressure, and button 3 can randomly take anything from 0 to 561 milliseconds to complete, so there is clearly a lack of consistency.

Read more: Simple-talk
Posted via email from .NET Info
Delicious Twitter Facebook Digg Stumbleupon Technorati RSS
Links to this post
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Tags

.NET Tools General Programming Silverlight Security Tutorial Web OS General SQL Download Android Web-programming Free Linux Visual Studio WCF WPF ASP .NET C++ C# Debug Mobile Microsoft Career Javascript Network IIS Relax Windows Phone Games Hack Mono UI MVC NHibernate Videos XAML Java Application Facebook Internet Explorer Kinect HTML5 Office Hardware Chrome Python Virtual Machine Subversion Cloud XML Apache MVVM COM USB Firefox MSBuild Cryptography Twitter