Can the performance timer "% Time in GC" be wrong?

We found that, since today, the "% Time in GC" (percent time in Garbage Collector) performance timer, steadily stood on 100% with only occasionally a bit lower. Even when at night no visitors were online.

Then I placed App_Offline.htm in the root. Usually this brings down all ASP.NET activity. But for some odd reason, the "% Time in GC", while lowered to 34%, remained steady.

Am I looking over something obvious here? Some other GC related performance counters also seem to still act, but marginally.

EDIT: I had written "only today", but it's really "since today". It hasn't gone away since.

-------------Problems Reply------------

If the application is performing no work most of the time (say 1% of the time is actual work at individual moments throughout the day, but for the whole day it is more like .0000001%), then wouldn't that mean that, when work is being done, it is GC work? If there is only .0000001% of work being done by the web application for the whole day, then it certainly seems logical that 100% (for all intents and purposes) of the total work done for the whole day IS done by the GC. The GC will run periodically regardless of work being done, and if there is no other work being done...

Or am I misunderstanding the question?

Jrista pointed in the right direction with his answer, but the actual reason of this behavior turned out to be rather different:

The "% Time in GC" counter is not a realtime counter. Instead, it shows the last value measured when the last GC happened. When you close your web application with App_Offline.htm, the GC will run and take a certain percentage. After that, the CLR is totally inactive (the purpose os App_Offline), so no further garbage collections will happen and the percentage remains the same. Hence the straight line, even when ASP.NET CLR activity is zero.

Here's a description of this counter, which I copied here for reference (and to remind myself to read the explanation of a counter before asking silly questions).

% Time in GC is the percentage of elapsed time that was spent in performing a garbage collection (GC) since the last GC cycle. This counter is usually an indicator of the work done by the Garbage Collector on behalf of the application to collect and compact memory. This counter is updated only at the end of every GC and the counter value reflects the last observed value; its not an average. Views:0 Time:2009-12-01

Related post

  • Evidence for sealed class performance benefit 2008-08-05

    I have come across a lot of optimization tips which say that you should mark your classes as sealed to get extra performance benefits. I ran some tests to check the performance differential and found none. Am I doing something wrong? Am I missing the

  • DataTable Loop Performance Comparison 2008-08-07

    Which of the following has the best performance? I have seen method two implemented in JavaScript with huge performance gains, however, I was unable to measure any gain in C# and was wondering if the compiler already does method 2 even when written l

  • How much database performance overhead when using LINQ? 2008-08-07

    How much database performance overhead is involved with using C# and LINQ compared to custom optimized queries loaded with mostly low-level C, both with a SQL Server 2008 backend? I'm specifically thinking here of a case where you have a fairly data-

  • Performance Considerations for throwing Exceptions 2008-08-09

    I have come across the following type of code many a times, and I wonder if this is a good practice (from Performance perspective) or not: try { ... // some code } catch (Exception ex) { ... // Do something throw new CustomException(ex); } Basically,

  • Does running a SQL Server 2005 database in compatibility level 80 have a negative impact on performance? 2008-08-10

    Our software must be able to run on SQL Server 2000 and 2005. To simplify development, we're running our SQL Server 2005 databases in compatibility level 80. However, database performance seems slower on SQL 2005 than on SQL 2000 in some cases (we ha

  • Has anyone run performance benchmarks comparing LINQ 2008-08-11

    to yesteryear's standards such as nHibernate, good old custom ORM, or something like LLBGenPro? Also, having run the benchmarks, what are your suggestions? --------------Solutions------------- Rico Mariani is the performance guy at MSFT and he has a

  • How to obtain good concurrent read performance from disk 2008-08-12

    I'd like to ask a question then follow it up with my own answer, but also see what answers other people have. We have two large files which we'd like to read from two separate threads concurrently. One thread will sequentially read fileA while the ot

  • What is good server performance monitoring software for Windows? 2008-08-14

    I'm looking for some software to monitor a single server for performance alerts. Preferably free and with a reasonable default configuration. Edit: To clarify, I would like to run this software on a Windows machine and monitor a remote Windows server

  • Considering N2 CMS but worried about performance. Is this justified? 2008-08-15

    Hy, does anyone worked with N2 Content Management System( If yes, how does it perform, performance wise(under heavy load)? It seems pretty simple and easy to use. Adrian --------------Solutions------------- Maybe try this

  • Is there a performance benefit single quote vs double quote in php? 2008-08-17

    (assume php5) consider <?php $foo = 'some words'; //case 1 print "these are $foo"; //case 2 print "these are {$foo}"; //case 3 print 'these are ' . $foo; Is there much of a difference between 1 and 2? If not, what about between 1/2 and 3? --------

  • 64bit .NET Performance tuning 2008-08-18

    I know that .NET is JIT compiled to the architecture you are running on just before the app runs, but does the JIT compiler optimize for 64bit architecture at all? Is there anything that needs to be done or considered when programming an app that wil

  • How to organize dataset queries to improve performance 2008-08-18

    I don't know when to add to a dataset a tableadapter or a query from toolbox. Does it make any difference? I also dont know where to create instances of the adapters. Should I do it in the Page_Load? Should I just do it when I'm going to use it? Am I

  • How do I track down performance problems with page rendering? 2008-08-19

    I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration between Begin

  • Measuring Developer Performance 2008-08-19

    Every day after I finish a hard days coding (or an easy days youtubing) I log work done against the tickets I have been (ostentibly) working on. Then Mr. Manager takes this oh-so-useful information and builds a burn-down chart. This then allows us to

  • Best traffic / performance / usage monitoring module? 2008-08-20

    Are there any open source (or I guess commercial) packages that you can plug into your site for monitoring purposes? I'd like something that we can hook up to our ASP.NET site and use to provide reporting on things like: performance over time current

  • Favourite performance tuning tricks 2008-08-20

    When you have a query or stored procedure that needs performance tuning, what are some of the first things you try? --------------Solutions------------- Here is the handy-dandy list of things I always give to someone asking me about optimisation. We

  • Best way to perform dynamic subquery in MS Reporting Services? 2008-08-21

    I'm new to SQL Server Reporting Services, and was wondering the best way to do the following: Query to get a list of popular IDs Subquery on each item to get properties from another table Ideally, the final report columns would look like this: [ID] [

  • What strategies have you employed to improve web application performance? 2008-08-22

    Any personal experience in overcoming web application performance hurdles? Any recommended strategies for improving the performance of a data-driven web application? My development team works on a web application (JSP reports, HTML, JavaScript) that

  • How do I perform a Perl substitution on a string while keeping the original? 2008-08-22

    In Perl, what is a good way to perform a replacement on a string using a regular expression and store the value in a different variable, without changing the original? I usually just copy the string to a new variable then bind it to the s/// regex th

  • Do you have any tips to improve ReSharper and/or Visual Studio performance? 2008-08-22

    I'm using visual studio 2008 and ReSharper 4 and it's kind of slow. My machine has 2 GB of RAM, dual core processor and a 7200 rpm hard disk. I know more RAM and a faster hard disk could improve performance, but do you have any tips to improve ReShar

Copyright (C), All Rights Reserved.

processed in 0.078 (s). 11 q(s)