.NET Performance Profilers

March 8th, 2010

I have had to look at performance profilers for .NET recently.  I thought other people might be interested in the results – even if they don’t agree with my conclusions.

I’d rate (in terms of price, usability and features) the top three in the following order:

  1. YourKit
  2. ANTS
  3. dotTrace

An here’s the list of profilers I tried and my impressions:

VS 2010 Profiler
Available as part of VS2010 Premium Edition (what was the Team edition).  Doesn’t seen to support memory profiling.  A few quite good things said about it.  Summarised here: http://blogs.msdn.com/profiler/archive/2009/06/10/write-faster-code-with-vs-2010-profiler.aspx
Price: Part of the VS2010 Premium Edition (so the difference between the standard and premium price – usually quite a bit).

Prof-It for C#
Open Source.  No releases since 2004.
http://dotnet.jku.at/projects/Prof-It/
Price: Free

ProfileSharp
Open Source.  Very poor.
http://www.softprodigy.net/softprodigy/app/webroot/index.php?option=com_content&view=article&id=57&Itemid=28
Price: Free

SlimTune
Open Source.  Very good at collecting data, but poor at analysis of collected data.  (SQL interface for constructing your own queries even!)  No memory profiler.
http://code.google.com/p/slimtune/
Price: Free

AQtime
Seems to be pretty good.  UI is not very intuitive.  Locked up during test.  Didn’t shut down properly.
http://www.automatedqa.com/products/aqtime/
Price: $599 (desktop) / $1899 (floating)

YourKit
Seem to be very good captures a lot of information about the performance and memory profile of the application and displays it all in a useful way.
http://www.yourkit.com/dotnet/
Price: $499 (desktop) / $1999 (floating) – NB. A lot cheaper in “packs” of 5

Equatec
Nice UI, but not much real information.
http://www.eqatec.com/tools/profiler
Price: $199 (desktop) / $749 (entire company)

SciTech .Net Memory Profiler
Lots of good comments on the internet.  The application seems very detailed and useful.  I would recommend.  (Obviously this is only a memory profiler).
http://memprofiler.com/
Price: $209 (desktop) – NB. Volume discounts

IBM Rational Purify
Memory profiling only.  Couldn’t actually get it to run the test program without crashing!  A monster of an installation too (the IBM Installation Manager is based on Eclipse!  Overkill?)
http://www-01.ibm.com/software/awdtools/purifyplus/win/
Price: $738 (desktop)

NProf

Open source.  Very basic.  Collects the data and displays almost raw results.  Not much else.  No memory profiling.
http://code.google.com/p/nprof/
Price: Free

GlowCode

The UI is unintuitive and a bit flakey (some strange error messages).  But it seems to provide quite a bit of information and reasonably well structured.  Memory profiling isn’t very clear.
http://www.glowcode.com/index.htm
Price: $499 (desktop) / $1599 (floating)

DevPartner
This used to be Compuware DevPartner (I used it years ago with VB6 – it was very good back then).  Waiting for Micro Focus to get in touch with demo version.
http://www.microfocus.com/products/DevPartner/index.asp
Price: Not published

ANTS Performance/Memory Profiler
Looks very nice and provides most of the information in a fairly accessible format.  Not as configurable as I would like.  The memory profiler seems stronger than the performance profiler.  Memory profiler allows you to pick out objects in interesting states (finalised but not disposed, only on memory because of a delegate reference, etc.).,
http://www.red-gate.com/products/ants_performance_profiler/index.htm
Price: $495 (desktop bundle)

JetBrains dotTrace
Memory and performance profiling.  Not as many analytics as some other products.  UI a bit odd in places.  Seems to capture most, if not all, of the data necessary to make decisions.
http://www.jetbrains.com/profiler/
Price $390 (desktop) / $1950 (floating)

Stateful Blocks

March 5th, 2010

Right, true to my word – my first article on coding (abstract from Onyct to start with, but more will come) find it here on CodeProject.

Long silences

March 5th, 2010

I seem to have been too busy to post anything for some time. In fact I have been working on a major rewrite of large parts of the Onyct code. This includes parts of the configuration and communications code. These are nearing being ready to release into the wild. Maybe another months work. With all this change I have realised that I had been fighting against .NET rather than embracing it. That never really works in any environment and certainly doesn’t help other developers trying to use it. So I have moved away from the rather old-skool approach I had been taking to configuration and towards the .config support that comes out of the box.
In the spirit of all this change I’m going to try to write a series of articles about various aspects of .NET and how they are supported by Onyct. On the list are:
* Configuration
* WCF
* XML Serialization
* CodeDom
As an aside, someone criticised me a while ago for using UK spellings in my code and comments. In spite of myself I’ve had to agree with their point, which is that programming on the internet must be international and that US English is the standard – so I’ll try to use that in the code and comments. But not on the website.

Still Plugging Away

April 20th, 2009

It’s been a long time since I last wrote. I haven’t stopped but I have had a bit of a slow patch. Holidays, chaos at work and the tedium of rewriting the messaging stuff has caused lots of delays.
Anyway, I’ve decide to push myself into finishing the bloody remoting and getting back to the interesting stuff.

Random Jottings

February 17th, 2009

Often when I have an idea or find an article that I think might be useful I send myself an email. This tend to accumulate in my inbox until I tidy them up or file them. Here are some of them:

  • A useful, and very detailed, article about singletons and how to implement them reliably: http://www.yoda.arachsys.com/csharp/singleton.html;
  • There exists a .net INI project that looks as if it could be used as a the base-level for the Onyct configuration code (it doesn’t add the API richness that Onyct does, but does provide a consistent means of accessing data): https://sourceforge.net/projects/nini;
  • The following were a series of ideas that occurred to me during a BCS lecture on AOP:
    • Add helpers for detecting the existence of attributes in assemblies, classes and methods.
    • AOP based upon attributes, using blocks and explicit pointcuts.
    • How can AOP exception handling be implemented?  Explicit pointcuts only?
    • Attribute-based message subscription?
    • Observer pattern as explicit pointcut?  Use property type objects to identify the fields of interest.  Automatic and manual detection of changes. Batches to define start and end of groups of changes.  Communicate changes using messaging rather than direct calls.  Or allow both?
  • The Umbrella project fills some of the gaps in the .NET libraries.  Some of the features could be useful in Onyct but some directly compete with similar features: http://www.codeplex.com/umbrella;
  • Communicates using messaging.  Allows components to send messages to a UI that can then be used to populate a status bar or similar.  UI sends a message to all widgets when it becomes available.  Until then all status updates are ignored.  Except the last which is rebroadcast when a UI becomes available.  The messages are all dated to guarantee the correct order of display.  Each message is assigned a priority which can be used to guarantee for how long it is displayed if it can be ignored when the queue grows long;
  • An article on the principles of good OOD: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod.

Programming for Craftsmen

February 8th, 2009

I’ve just reread this article about “dumbing down” the teaching of computer science in American colleges.  I’m fairly sure it applies to a fair number of British universities too, I have certainly interviewed a few programmers who could write programs, but didn’t know how to program.  One argument put forward by the colleges is that they are teaching computer science, not programming, so the teaching of the craft of programming is not in their remit.  I would describe this as short-sighted and just plain wrong.  We don’t teach scientist pure science without any of the skills (experimentation, mathematics, statistical analysis and so on) necessary for practical work.  The same should be true for programmers.  That is lead me to think about what craft skills are necessary for programmers.  Here is my list so far:

  • Debugging.  This is a big subject and a vital skill.  It could included all sorts of defensive practices (detecting errors before they happen, inserting useful debugging aids such as logging) as well as the forensic skills necessary to track down the source of an error and fix it.
  • Memory management.  All of the tricky things like allocation, deallocation, pointer arithmetic and so on.
  • Functional and declarative programming.  These are totally different paradigms to the usual sequential business that we do and requires a different way of thinking; the kind of lateral thinking that can be very useful even when working in a “normal” language.  SQL is a good everyday example of when an understanding of declarative programming is useful – too often amateurs resort to cursors when a declarative approach is far more efficient.

False Dawn

February 8th, 2009

It doesn’t live. Well, at least not properly. I did a silly thing and wrote all of the remoting as if one-to-one connections were being made. But of course the switchboard negotiator needs to be one-to-many. Anyway, the whole business looks complicated and inefficient. So, I think a more sensible approach would be to use WCF and named pipes. Setting up a duplex connection is simple and marking the connection as long-term allows a reasonable level of reliability. I might still add a heartbeat to make it easier to detect connection loss (unless a built-in solution is provided by WCF). So, I will remove most of the existing remoting code and provide custom implementations of a WCF service model where necessart (I made add some utility classes and base-classes if I find them necessary).
My only doubt about this change is that it will mean a loss of compatibility with Mono as Olive (the Mono implementation of the Indigo/WCF libraries) is still some way from being complete. However by the time I get this finished and usable it will probably be compatible.
I have also upgraded to SHFB 1.8 which changes the file structure and moves compilation from a separate EXE and into the MSBuild framework.
Anyway, all of this has created another hiatus as I rewrite a load of code and of course it means that the app server functionality has been delayed again.

Version 0.4.2306.0 Released

December 6th, 2008

A new version that adds messaging at the appdomain and apphost level. Plenty of bug fixes have gone in. There are still plenty left though – beware!  Download from SourceForge.

The next step is to implemented the basic Service and Console hosts.

Remote Messaging Lives!

November 18th, 2008

It’s not fully tested yet, but the remote messaging is working in a very basic sense.  This is important, partly because I have been working on it, a little at a time, for ages; and also because it is a fundamental part of the application server structure.  It will be used for communicating between appdomains, and so is pretty critical.  Hopefully, within a few weeks, I will be able to get that part of the framework stable and possible release a new version.  This will be nearly a year after the last release (or at least that’s how it feels).

Development practices

October 9th, 2008

I have a rough plan of what I want to do in Onyct and, except when I’m feeling bored with a piece of work, more or less stick to it.  Here is a brief article on the slightly unusual approach taken at 37 Signals.