user776676
user776676

Reputation: 4385

ASP.NET: How to test for server memory usage?

Is it possible to test for server memory usage on local machine? If so, what is the simplest way?

My scenario: I am using a gridview with default paging which is supposed to be memory intensive because each paging request retrieves the whole database table. Now I am trying to implement custom paging that retrieves only the few records from the database that are needed to display on one page of the gridview.

Obviously, I want to test and find out if my implementation works. If there are other better/more reliable ways to test, please let me know. Thanks.

Upvotes: 2

Views: 574

Answers (3)

James Johnson
James Johnson

Reputation: 46077

It sounds like you need a profiling tool. Personally, I would suggest taking a look at ANTS Memory Profiler and ANTS Performance Profiler from Red Gate:

ANTS Memory Profiler:
http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/

ANTS Performance Profiler:
http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/

The ANTS profilers do a fantastic job of identifying bottlenecks and memory leaks. They're not free, but they're very affordable and offer fully functional trials so you can evaluate the products.

Upvotes: 4

Pavel Podlipensky
Pavel Podlipensky

Reputation: 8269

My favorite is dotTrace tool from JetBrains company:

http://www.jetbrains.com/profiler/features/index.html

enter image description here

Good memory profiling results grouping/sorting: enter image description here

Also you can use basic CLR profiler, and here is how.

Upvotes: 1

Jeremy McGee
Jeremy McGee

Reputation: 25200

If you're concerned about SQL database query performance in an ASP.NET application then it's worth looking at the (free!) MVC Mini-Profiler:

http://code.google.com/p/mvc-mini-profiler/

screenshot

Although it doesn't show memory consumption, it does show query execution time, and in particular highlights repeated queries that may be optimised.

We've used this on our product and it's been a real timesaver.

Upvotes: 1

Related Questions