I am using the ants profiler to see performance problems. I have compiled my windows application in release mode and started the Ants profiler, but once I click the stop profiler, I can't see any results. Is there anything that needs to be done?
There're a few things that can cause this problem: have you tried the suggestions in Red Gate's support center for "Troubleshooting missing results"?
That suggests looking at the following possibilities:
Missing PDB files - either because you don't have them for the profiled code, or they're not stored in the expected directory and ANTS can't find them
No available managed code to profile - either because you're trying to profile on a remote machine, are profiling methods exclusively comprising unmanaged code, or are profiling something where no method contributes more than 1% of total CPU time
Unreadable performance counters - in which case rebuilding the performance counters will usually help.
Related
Currently I am running one .exe
I causes memory leakage issue. So I want to know how we could know which variable or process is responsible for this issue
I recommend getting a good memory profiler. I've used Redgate ANTS in the past. It is very good. JetBrains dotMemory is an alternative to this. If you need to profile your application then there are lots of options. A good profiler should be able to tell you what objects are growing over time
Is there some way to watch all my in memory (non-disposed) objects ?
this can help in complex dirty old apps to keep track of memory and find the leak reasons faster
thank you.
You'll want to use a profiler to track object allocation/de-allocation over the run of an application. Take a look at the Visual Studio Profiler or a commercial one like Red Gate ANTS memory profiler or JetBrains dotTrace. CLR Profiler is another useful tool specifically for this purpose.
This is a very strange issue that I am experiencing, and almost goes against anything logical that I can think of. I am currently profiling a website which we are building, which sometimes takes 5 seconds for a page to load. This happens both on IIS, and Visual Studio Development Server. However, when I profile it using ANTS Performance Profiler, it performs up to 5x faster, and loads in less than a second.
I am quite baffled as to why this can happen, because as far as I know, profiling should increase the time, not decrease it. Anyone could maybe shed some light on this?
Site is developed in Visual Studio 2010, ASP.Net v4.0, C#.
This is interesting as its very rare (I work on ANTS support). The main difference ANTS imparts on a process is permissions (since (usually) the process is fully initiated by ANTS and inherits the permissions). We have some routines that optimise the start-up procedure but I've never heard of a speed-up like this. Using Taskmanager, take a look at the login account that the process runs under ANTS and normally- then try to run your process under the account that ANTS uses. You may find this helps to explain the speed-up.
Performance testing needs to be done in carefully controlled setting. Things like system file cache, network, machine load, NGEN status, virus scanner could affect perf result.
Use Perfview to understand how 5s is spent (could be waiting for disk IO):
http://www.microsoft.com/en-us/download/details.aspx?id=28567
Are there any good, free tools to profile memory usage in C# ?
Details:
I have a visualization project that uses quite large collections. I would like to check which parts of this project - on the data-processing side, or on the visualization side - use most of the memory, so I could optimize it.
I know that when it comes to computing size of the collection the case is quite simple and I can do it on my own. But there are also certain elements for which I cannot estimate the memory usage so easily.
The memory usage is quite big, for example processing a file of size 35 MB my program uses a little bit more than 250 MB of RAM.
I've had success using RedGate's ANTS profiler. It is also worth reading Brad Abrams blog where he has talked about profiling memory
I'm amazed noone has mentioned the free CLR Profiler from Microsoft!
I didn't know of this tool until recently. I had a bug that made my program keep allocating more and more memory. The CLR Profiler can pinpoint memory-allocating "hot spots" in your program.
I identified the line of code responsible for the leak, within 15-20 minutes of installing the profiler.
Basically, it instruments your code and runs it with some profiling (which slows down your code considerably, 10x-100x are the official figures I think).
You run a certain workload for a certain amount of time, and you can then see which places in your code that allocated how much memory (and how much was freed versus how much was retained etc.).
Check it out at: https://clrprofiler.codeplex.com/
Also, here is a tutorial on how to use the tool: http://geekswithblogs.net/robp/archive/2009/03/13/speedy-c-part-4-using---and-understanding---clr.aspx
JetBrains DotTrace is also good. I have used both the RedGate and JetBrains products and they both do a very good job of identifying the bottlenecks and leaks.
We've build a Web Application which is performing horrible even with alot of resources available. My boss doesn't believe me that the application is consuming alot of Hardware IO, so I have to prove that the hardware is ok, but the web app is really crap.
The app is using:
SQL Server 2000 with SP4
The main web application (.NET 3.5)
Two Web Services (.NET 1.1)
Biztalk 2004
There are 30 people using this apps.
How can I prove I am right?
You can hook up a profiler like ANTS profiler or JetBrains DotTrace and see where the application's performance bottlenecks are.
One place you could start is getting a performance profiler like Red-Gate ANTS profiler. I've used this tool and it's very useful is weeding out performance bottlenecks.
Randy
You could start by using SQL Server Profiler to get an impression of the amount of database traffic that is going on.
I'm not saying that database interaction is the bottleneck, but it often is, and the tool is already there if you are using SQL Server, so it may be a good idea to take a look at that before you go out and buy a lot of profiling tools.
Visual Studio 2008 also have built-in performance analysis tools.
Windows performance counters are a good way to get some basic information about general system performance. Proper counters will show you if it's really the IO that's doing lots of stuff. If you take out the numbers from the counters and compare those to the specs, you should be able to tell if the system is maxing out or not.
If the system is maxing out, it's a problem with the web application, and it should be profiled to find out where to start optimizing.
You could use the system performance monitor built into windows since at least XP. You can get almost any information you could possibly need. This includes CPU time, .NET memory usage (include gen0 gen1 and gen2), native memory usage, amount of time spent garbage collection, disk access time, etc. If you just search codeproject or just the web there are many examples of using these counter to test for just about anything you want.
One of the benefits of this is you don't have to change your code and can be used with existing system.
I find this is the best starting point to point you to where you should look for bottle necks and issues.