performance managment
Post on 22-Apr-2015
378 Views
Preview:
DESCRIPTION
TRANSCRIPT
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Performance Management
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
1. System.Console.WriteLine(int.MaxValue);//0 to 2147483647
2. Expensive Arithmetic Operations
3. A lot of work with no output / burning many Cpu Cycles for no reason
4. Look for stored procedure which will returnTrue/false value
5. Same output irrespective of inputs
6. Code duplication
observations
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Line of business applications
1.lob does not focus on video games, compilers, scientific calculations, etc.
2. Mostly liner logic – do a , if b do c else do d 10 times and return results
3. 60-70% of the code will be if-else, for/foreach, switch, try/catch. Focused on projections ,transformations, filtering, crud, reporting, etc.
4. Focused on solving well defined problem with tight scope . For example, % of discount calculations based on zip code
5. A lot of immutable lookup / static data used as input in decision making logic. For example, zip code, cpt/icd codes, state list, ssn, etc.
6. Mutable data stored mostly in rdbms and shared via web services
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
visual Studio 2010 Profiling Tools
If you don’t have VS 2010 premium - DownloadVS 2011 Developer preview Ultimate Edition- Its FREE
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
demo...
Execution Bottlenecks
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Keep your vsp file[s] under tight security
No additional code and solution is clean
Execution Bottlenecks
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Method Description
Sampling Collects statistical data about the work done by an application.
Instrumentation Collects detailed timing information about each function call.
Concurrency Collects detailed information about multi-threaded applications.
.NET memoryCollects detailed information about .NET memory allocation and garbage collection.
Tier interactionCollects information about asynchronous ADO.NET function calls to a SqlServer database.
Microsoft Visual Studio Premium Profiling Tools provide five methods that you can use to collect performance data. This topic describes the different methods and suggests some scenarios in which collecting data with a particular method can be appropriate.
Execution Bottlenecks
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Execution Bottlenecks
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
memory Bottlenecks
Task Manager VM Map
Managed Memory
Native Memory
SoS
WinDbg
XPerf
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Memory Bottlenecks
Heap: Native heap – objects your app is allocating
Managed heap : .NET heap – objects your app is allocating
Image : Modules you have loaded
Private data is virtual memory allocations
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
memory Bottlenecks
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
demo...
Execution Bottlenecks
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Database Bottlenecks
SELECT [Extent1].[DocumentID] AS [DocumentID], [Extent1].[DocumentTitle] AS [DocumentTitle], [Extent1].[DocumentDescription] AS [DocumentDescription], [Extent1].[DocumentTypeID] AS [DocumentTypeID], [Extent1].[IsEnabled] AS [IsEnabled], [Extent1].[Author] AS [Author], [Extent1].[Category] AS [Category], [Extent1].[IsDeleted] AS [IsDeleted], [Extent1].[IsTemporary] AS [IsTemporary], [Extent1].[Gender] AS [Gender], [Extent1].[LowerAgeLimit] AS [LowerAgeLimit], [Extent1].[UpperAgeLimit] AS [UpperAgeLimit]FROM [dbo].[Document] AS [Extent1]
msec
while(i < int.MaxValue) { i = i * 10; }
Abhijit.Gadkari@Gmail.COM
Reference
Reference:
http://blogs.technet.com/b/markrussinovich/archive/2008/07/21/3092070.aspx
Silverlight Performance Blog : http://blogs.msdn.com/b/slperf/
If you have LOB application[s] that needs tuning – contact me. Deal is : I will use anonymous performance data with your permission in my research and you will get free service
I am @ Twitter: @Objectmapperblog: http://soaas.blogspot.comhttp://www.linkedin.com/pub/abhijit-gadkari/10/618/583
top related