c# - How can I identify which functions and sql procedures are causing high cpu usage on the host server -


i have c#/asp.net web application (non mvc) has pages access sql database many times, using stored procedures , views. application has 5-10 users, , hosts have informed me it's causing 95%+ cpu usage on server.

my question, how can identify functions/procedures/threads causing high cpu use can cache or optimise them? note hosts not give me access server logs, stats, or serversystem database tables, application's database, causes major headache!

you can use sqlprofiler trace performance , behavior of sql procedure, function , etc.

you can check this: sqlprofiler it's helpful tool , it's me lot in enhancing sql stored procedures performance.

you run application before go sql profiler , configure listen on needed events, 'procedure completed' , select filtering criteria database or execution user when make action in app related database, profiler track , analyze it.

you can check step step usage of here.

about c# functions not related data access can measure it's performance using stopwatch class calculate it's execution time:

var watch = stopwatch.startnew(); // code want measure comes here watch.stop(); var elapsedms = watch.elapsedmilliseconds; 

or can analyze performance while debugging in visual studio 2015


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -