1

My current application is comprises of 3 tier- Web tier - App Tier - Database

While testing with 100 users, we found that App tier's cpu is touching almost 90% where as web server and database server are doing fine.

I am not able to figure out what code is causing high cpu usage. Majorly we have CRUD operation there. We take input in the form of DTO, we transfer them into entities (using Entity framework), add/update/delete into database. In case of Get operation, we fetch data into EF entities, store them in DTO and then send DTO to client.

I have tried to use DebugDiag but could not figure out any useful information.

Following are the server's configuration:

Web Server (Quantity = 1) Processor Intel Xeon CPU X5675 @3.07 GHz 2.19 GHz

Number of Cores (Virtual) 8

RAM 8GB

Operating System Windows Sever 2012 Standard

Processor Type 64 Bit

Softwares Installed NET Framework 4.5

App Server (Quantity = 1) Processor Intel Xeon CPU X5675 @3.07 GHz 3.07 GHz

Number of Cores (Virtual) 8

RAM 8GB

Operating System Windows Sever 2012 Standard

Processor Type 64 Bit

Softwares Installed NET Framework 4.5

DB Server (Quantity =1) Processor Intel Xeon CPU E7-4830v2 @ 2.20 GHz 2.19 GHz

Number of Cores (Virtual) 8

RAM 8GB

Operating System Windows Sever 2012 Standard

Processor Type 64 Bit

Softwares Installed Microsoft SQL Sever 2014

Pragmatic
  • 3,093
  • 4
  • 33
  • 62
  • 2
    Use built-in VS profiler, [DotTrace](https://www.jetbrains.com/profiler/) or [Ants Profiler](http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/) to identify CPU-heavy operations in your App-tier – Alexandr Sugak Aug 04 '15 at 07:30

2 Answers2

1

There is no better solution than to install an APM tool. With them you'll find the root cause very quickly. AppDynamics or NewRelic are easy, Dynatrace a bit more complex but maybe more powerful. Else go on shooting in the dark

cristian v
  • 1,022
  • 6
  • 8
0
  • Windows sysinternal tool Process Explorer(Procexp) is a good tool to find the high CPU process and thread call stack(method calls)

OR - Collect multiple full user dump using task manager/Procexp on the high CPU process

And collect perfmon log with Thread counter. Perfmon -> Add counter -> Thread under thread select %Processor Time, ID thread, ID process.

From the perfmon you can find the high CPU thread ID. Now you can co-relate the thread ID with debug diag analysis report and find the thread call stack.

Hope this helps.

Thanks,

Parthiban