Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
Article3 min readViews1

How to Find the Process That Is Overloading the CPU

Use ps and top for quick CPU diagnostics: compare snapshots with current activity, account for multiple cores, and do not stop processes at random.

Comments 0

Processor next to the socket and cooling system
In this article

The site has become slow, and the CPU usage graph has risen. You need to identify which process is doing the work and whether its activity aligns with the delays. The most prominent process in a single snapshot is not necessarily the cause: it might have been active earlier or performing a useful background task.

Get a list of candidates

Examples are for Linux with procps. The command below lists processes sorted by CPU usage:

ps -eo pid,ppid,user,stat,pcpu,pmem,comm --sort=-pcpu

The output includes the process ID, parent process, user, state, and a short command name. We intentionally omit the full command line: its arguments sometimes contain secrets. If the list is sent to support, check it for sensitive user and application names.

The CPU share for ps is calculated over the process lifetime. This is useful for filtering but does not replace monitoring the last few seconds. A long-running service with a recent spike may not appear at the top.

Compare multiple intervals

For brief observation, you can obtain three batch snapshots top:

top -b -d 2 -n 3

The update interval is two seconds. The output can be long, so look for recurring processes and the overall CPU picture, not just the first line. Do not use the first snapshot as the sole evidence of current load.

On a multi-core system, a process may show more than one hundred percent in the accepted top counting mode. This is not necessarily a measurement error: multiple threads use multiple logical processors. Available resources and display settings are what matter.

Separate computation from waiting

If a single worker process constantly consumes CPU, link it to a task: request handling, import, compression, or another operation. If the load is distributed among many identical processes, check whether the number of concurrent requests has increased.

Low CPU usage on a slow site does not rule out the problem. The application may be waiting for a database, disk, or external service. High average system load is also not equivalent to CPU utilization percentage; these are different metrics.

Check the working context

Example: during catalog loading, the import process appears at the top of the list. If response time returns to normal after the task completes, a link is likely, but it is still useful to check the import schedule and resources. If delays persist after the process disappears, the cause may be different.

Process identifiers are reused. Do not save a number for deferred intervention without rechecking the owner and purpose. Terminating a found process based on a single snapshot is not allowed: it may be performing an important operation or automatically restarting.

Result of short diagnostics

Record the time, command, user, load stability, and the action performed on the site. After the fix, compare the same metrics under a similar request flow. The goal is to identify which scenario consumes CPU and whether it affects users, then select a change with measurable results.

Discussion 0

Share your experience and ask questions. Comments without links appear after editorial review.

No comments yet. Start the discussion.