Skip to content

Knowledgebase

Finding a Windows Server CPU or memory bottleneck

servers, performance

Investigate a Windows Server performance problem by correlating resource use with the customer's slow operation. A short CPU spike or a large memory allocation alone does not establish which component needs changing.

01 Record a representative slowdown

Note the application action, duration, affected users and time. Determine whether it occurs continuously, at startup, during backups or only under a particular workload. Record the server's assigned resources and any recent application or configuration change.

02 Collect the relevant counters

  1. During the slowdown, open Task Manager and identify the processes consuming CPU or memory. Record process IDs so similarly named worker processes can be distinguished.
  2. Open perfmon. Use Performance Monitor for a live view, or create a Data Collector Set for an intermittent issue.
  3. Add counters appropriate to the symptom. Start with processor use, process CPU, available memory, committed memory and process private bytes. Include disk or network counters when the application waits on those resources.
  4. Choose a sample interval and collection duration that can capture the problem without creating unbounded logs. Use a protected output directory with sufficient free space.
  5. Start collection, reproduce the approved workload or wait for the normal occurrence, then stop collection after the relevant period.
  6. Compare the timeline with application requests, scheduled tasks and Event Viewer entries. For IIS, map the busy worker process to the actual application pool.

03 Interpret the pattern

Sustained CPU pressure should be traced to the responsible process and workload. Memory growth needs a time series: compare process private bytes, system commit and available memory instead of treating cached memory as automatically wasted.

Low CPU during a slow request can indicate waiting on storage, a database or an external service. On a virtual server, ask the provider to review host-level constraints when guest evidence does not explain the observed delay.

04 Apply one measured correction

Choose a change tied to the evidence, then repeat the same workload and compare results. Record any effect on correctness, error rate and other applications. Preserve the baseline before changing several settings at once.

05 Example: identify large Windows processes without terminating them

In PowerShell on the affected server, list the ten processes with the largest current working sets. The output is a point-in-time diagnostic. It does not stop services or establish whether the reported memory use is a leak.

Command example
Get-Process | Sort-Object WorkingSet64 -Descending |
  Select-Object -First 10 Id, ProcessName,
    @{Name="WorkingSetMB";Expression={[math]::Round($_.WorkingSet64 / 1MB, 1)}},
    CPU

Read the result: WorkingSetMB reports memory currently resident for the process. CPU here is accumulated processor time, not its current percentage of CPU use. A long-running process can have a large CPU total while being idle now, so compare with Task Manager or Performance Monitor over the incident window.

Match a process to its application pool, database or customer workload before taking action. Preserve the timestamp and repeat a bounded sample during normal operation. Killing the largest process can interrupt unrelated customers and erase evidence without correcting the workload problem.

Common questions

Should I kill the largest process immediately?

Identify its role and active work first. Terminating a database or worker process can interrupt requests and lose useful diagnostic evidence.

Will adding more RAM fix every slow website?

Only a demonstrated memory constraint supports that conclusion. Application locks, expensive queries, storage delay and external calls need different corrections.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support