
Your website suddenly takes forever to load, and you notice the CPU is running high. Your first instinct might be to reboot the server. I get it. A reboot can bring CPU usage back down, but the slowdown can return as soon as the same process starts misbehaving again. To fix high CPU usage on Linux, start by finding what’s keeping the CPU busy and why.
That’s real problem with high CPU usage on Linux server. Reboot hide it for while, but cause is still sitting there. If you ignore it, you can end up with slow website, failed request, unhappy visitor, and sometime a server that stop responding completely.
The good news? You don’t need to be Linux expert to fix this. In this guide, I will show you exactly how to find what’s eating CPU and how to fix it safely, using few simple commands. This guide is for you if you run VPS or cloud server, manage WordPress or PHP site, or you are beginner who just got “high CPU” alert and does not know where to start.
TL;DR
- High CPU usage mean your server’s processor is working at or near its limit, so everything else has to wait.
- Run “
uptime” and “nproc” first. If load average stay higher than your number of CPU core, you have real problem. - Use “
top” or “htop” to see which process is using most CPU, and “ps” to list top offender. - Usual cause stuck processe, traffic spike or bad bot, heavy plugin or slow code, badly timed cron job, and sometimes malware.
- Fix cause, not symptom; restart or stop bad process, lower its priority, move heavy jobs to quiet hour, block bad traffic, and upgrade only when server is genuinely too small.
What Does “High CPU Usage” Actually Mean?
Before we touch any command, let’s make sure idea itself is clear. Once you understand it, number on your screen stop looking scary.
CPU in Plain Word
Think of your server’s CPU (Central Processing Unit) as chef in restaurant kitchen. Every request that hit your server, like page load, database query, or backup, is order handed to that chef.
When order come in at normal pace, the chef keeps up and every plate goes out on time. When too many orders arrive at once, or one order takes forever to cook, the queue grows. Customers wait. That waiting is exactly what your visitors feel as slow website.
Most server have more than one CPU core, which is like having more than one chef. 2-core server has two chefs, a 4-core server has four, and so on.
Normal vs. Worrying CPU Usage
CPU spike is not automatically problem. Your CPU is supposed to work. When you install update, run backup, or get burst of visitors, it’s normal to see 80–100% for short time.
It becomes problem when CPU usage stay high for long time, even when nothing special is happening. That usually mean something is stuck, broken, or misused.
| What you see | What it usually means |
| Short spike that settle down within few minutes | Normal work, nothing to fix |
| High usage during backups or updates only | Expected, but you may want to reschedule them |
| Usage stuck near 100% for long time | Something need your attention |
| High usage with no traffic and no scheduled jobs | Investigate right away (possible stuck process or malware) |
Load Average Simply Explain
You will often see number called load average next to CPU usage. It show how many tasks are running or waiting for CPU, average over last 1, 5, and 15 minute.
Easiest way to read it is to compare it with your number of cores. To find how many core you have, run:
nprocIf this print 2, you have two cores. Now rule of thumb is simple:
- Load average below number of CPU cores: Your server has enough CPU capacity to handle current workload.
- Load average around number of CPU cores: Your CPU is running at or near full capacity.
- Load average consistently higher than number of CPU cores: More process are waiting for CPU time, which can cause your website and application to become slow.
So load average of 4 is fine on an 8-core server but real problem on 2-core one. This one comparison save beginners lot of unnecessary worry.
Signs Your Linux Server Has CPU Problem
Sometimes you won’t see CPU graph at all. Instead, server quietly tells you something is wrong. These are signs I pay attention to:
- Page load slowly or hang before showing anything
- Terminal lags, you type command over SSH and letter appear second late
- 502 or 504 error show up, because web server gave up waiting for response
- Your hosting provider send high CPU alert or usage warning email
- Background task fail or run late, like backup or scheduled email
If you notice two or more of these at same time, CPU is one of first thing worth checking.
How to Check CPU Usage on Linux
This is routine I follow every time. It’s just four step, and you don’t need to install anything except “htop”. You will need to be logged in to your server over SSH.
Step 1: Quick Health Check With “uptime”
Start with fastest command there is:
uptimeYou’ll see output as mentioned below:

For example, the output will be something like below:
14:32:10 up 12 days, 3:41, 1 user, load average: 3.85, 3.60, 2.10Last three values represent your system’s load average over the last 1, 5, and 15 minute. Compare them with output of “nproc”.
In this example, if server has 2 core, load of 3.85 mean work is piling up. And because 1-minute number is higher than 15-minute number, problem is getting worse, not better. That’s sign to keep digging.
Step 2: Find Busy Process With “top”
“top” come installed on almost every Linux server. Run it using below command:
topYou will get live screen that refresh every few second as mentioned below:

Don’t let all number overwhelm you. As beginner, focus on just these part:
The “top” utility provide real-time view of running process, CPU activity, and system load. If you want to explore its available option and keyboard shortcuts, refer to official Linux top command manual.
| What to look at | What it tells you |
“%Cpu(s)” line, “us” value | CPU used by your apps (like PHP or MySQL) |
“%Cpu(s)” line, “sy” value | CPU used by system itself |
“%Cpu(s)” line, “wa” value | Time spent waiting for disk; if this is high, disk is real bottleneck |
“PID” column | Process ID, number you’ll need to manage process |
“%CPU” column | How much CPU each process is using right now |
“COMMAND” column | Name of program |
Press “P” (capital P) to sort by CPU usage. Worst offender jump to top of list. Press “q” to quit.
One thing that confuse lot of beginner: on multi-core server, single process can show more than 100% CPU. Process at 200% on 4-core server is using two full core. It look alarming, but it’s just how “top” count.
Step 3: Get Easier View With “htop”
If “top” feel too plain, “htop” is friendlier version. It show colorful bar for each CPU core and let you scroll with arrow key.
Install it on Ubuntu or Debian:
sudo apt update
sudo apt install htop -yThen run:
htopYou can see the output as mentioned below:

Bar at top show each core separately. If one core is full and other are almost empty, single process is usually to blame. If every core is full, you are more likely dealing with heavy traffic or many process at once. Press “F6” to choose how to sort, and “F10” to exit.
Personally, “htop” is what I reach for first when I am explaining server problem to someone new, because colored bar make situation obvious in second.
Step 4: List Top CPU-Hungry Process With “ps”
“top” and “htop” are live, which means list keep moving. When I want calm snapshot to read, or to copy into support ticket, I use “ps”:
ps aux --sort=-%cpu | head -n 11This show header line plus 10 process using most CPU, highest first. Look at “USER”, “%CPU”, and “COMMAND” column.
You can see the output as mentioned below:

The ps command supports several options for filtering, sorting, and displaying process information. You can explore its available options in the Linux ps command manual.
Common mistake here is judging by one snapshot. Run command two or three time minute apart. If same process keep showing up at top, you have found your suspect.
Common Cause of High CPU Usage
Once you know which process is busy, next question is why. In my experience, almost every case fall into one of these five buckets.
1. Stuck or Runaway Process
Sometimes program get stuck in loop and keep using CPU even though it’s doing nothing useful. Crashed script, frozen PHP worker, or leftover process from failed deployment can all do this.
How to spot it: one process sits at top of “top” for long time, with no traffic or job to explain it.
2. Sudden Traffic Spikes or Bad Bots
More visitor means more work. That part is good news. Bad news is that lot of traffic, isn’t human at all. Aggressive crawler, scraper, and login-guessing bot can hit your site hundred of times minute.
How to spot it: many web server or PHP process (like “apache2”, “nginx”, or “php-fpm”) share CPU, and your access logs show lots of requests from the same few IP addresses.
3. Heavy WordPress Plugins or Slow PHP Code
On WordPress sites, this is one of most common cause I see. Single poorly built plugin, page builder doing too much on every load, or site with no caching can make CPU build same page from scratch for every visitor.
How to spot it: “php-fpm” or “mysqld” sit at top, and problem started after installing or updating plugin or theme.
4. Cron Job and Backup Running at Busy Hours
Cron jobs are task your server run on schedule. Backup, report, and cleanup script are useful, but if they run at 7 PM when your traffic peak, they compete with your visitor for same CPU.
How to spot it: High CPU happen at same time every day. Check your scheduled jobs with:
crontab -l5. Malware or Hidden Crypto Miners
This is the one nobody wants to find, but it does happen. Attacker who get into server often install crypto-mining programs, because those program turn your CPU into money for them.
Warning signs: process with strange or random-looking name, process running from “/tmp”, or full CPU usage at 3 AM when nobody is visiting your site. If you see this, don’t just kill process. Treat it as security incident, because attacker’s way in is still open.
How to Fix High CPU Usage Safely
Now, let’s talk about solution to cause that found, and work from gentlest option to strongest.
Restart or Stop Problem Process
If busy process belongs to service, like PHP-FPM or MySQL, restart service instead of killing it:
sudo systemctl restart php8.3-fpmReplace “php8.3-fpm” with your actual service name. For single stuck process, use its PID from “top”:
kill 12345This ask process to stop politely. If it ignores you, use “kill -9 12345” to force it.
The kill command send signals to process, allowing you to request graceful shutdown or force termination when necessary. Refer to Linux kill command documentation to understand available signal.
Caution to keep in mind: never kill process you don’t know, and never kill “systemd”, “sshd”, or your database in middle of writing data. You can lock yourself out or damage data. When you are not sure, look up for the process name before taking action.
Lower Process’s Priority With “renice”
Some heavy jobs, like backup, need to run but shouldn’t slow down your website. “renice” tell Linux to let more important work go first:
sudo renice +10 -p 12345Higher number mean lower priority. To start new job at low priority from beginning, use “nice -n 10 your-command”.
Linux use scheduling priorities to determine how CPU time is shared between processes. For more details about changing priority of an existing process, see Linux renice documentation.
Move Heavy Cron Jobs to Quiet Hours
Open your scheduled job with “crontab -e” and move backup and report to hours when your traffic is lowest. For example, this line runs backup script at 3:00 AM every day:
0 3 * * * /home/user/backup.shBlock Bad Bots and Limit Traffic
If your access log show one IP address hammering your site, block it with your firewall. On Ubuntu with UFW:
sudo ufw deny from 203.0.113.25For ongoing bot problem, CDN or rate limiting on your web server is longer-term fix.
Optimize Application
For WordPress and PHP site, caching is single biggest win. Cached page is served without rebuilding it for every visitor. Also deactivate plugin one at time to find heavy one, and make sure your PHP worker setting match your server size.
Know When It’s Time to Upgrade
If you have ruled out stuck process, bots, bad plugins, and badly timed jobs, and your load average is still above your core count during normal traffic, your site may simply have outgrown server. That’s when upgrading to more CPU cores is right move. Upgrading first, before diagnosing, usually just means paying more for same problem.
Quick Troubleshooting Cheat Sheet
Save this table. It’s whole guide in one place.
| Symptom | Likely cause | What to check | Fix |
| One process stuck at top for long time | Runaway or frozen process | “top”, “ps” | Restart service or “kill” PID |
Many “php-fpm” or web server processes busy | Traffic spike or bad bots | Access logs | Block abusive IPs, add caching or CDN |
| CPU jumps after plugin or theme change | Heavy plugin or slow code | Recent changes | Deactivate plugins one by one, enable caching |
| High CPU at same time every day | Cron job or backup at peak hours | “crontab -l” | Move job to quiet hours, use “nice” |
| Strange process name, high CPU at night | Malware or crypto miner | “top”, process path | Treat as security incident |
High “wa” value in “top” | Slow disk, not CPU | “top” | Look at disk usage and I/O instead |
How to Prevent High CPU Usage in Future
Fixing problem once is great. Not having to fix it again is better. Few habits make real difference:
- Check in regularly. Quick “
uptime” once week show you trends before they turn into outages. - Set up alerts so you hear about high CPU before your visitors do.
- Keep software updated, including plugins, PHP, and operating system, since updates often fix performance and security bugs.
- Schedule heavy jobs for your quietest hours from day one.
If you would rather not do all of this from command line, platform such as ServerAvatar let you monitor server resources and manage your applications, PHP settings, and cron jobs from one dashboard, which makes it easier to spot problems early.

Beginner Mistakes to Avoid
- Killing processes blindly. Always check what process is before stopping it
- Using reboot as only fix. It clear symptom and leaves cause
- Panicking over short spikes. Brief 100% moment are often normal
- Upgrading before diagnosing. Bigger server won’t fix stuck process or bot attack
Key Takeaways
- Compare your load average with your core count (“
nproc”) before deciding there’s problem. - “
top”, “htop”, and “ps” tell you exactly which process is using CPU. - Most cases come down to stuck process, bot, heavy plugin, badly timed cron job, or malware.
- Fix cause, starting with gentlest option, and upgrade only after ruling everything else out.
Keep Your Server Running Smoothly
If you want simpler way to keep eye on server resource and manage your application, PHP setting, cron jobs without living in terminal, ServerAvatar can help streamline lot of this work.
For your next read, check out these related guides:
- How to Check Running Processes in Linux Using ps, top, htop & atop
- How to Fix High CPU Usage Issue in WordPress Site
- Optimize WordPress Performance with Rewrite Rules & Cache
- How to Reduce HTTP Requests in WordPress to Improve Site Speed
- WordPress Toolkit for WordPress Management in ServerAvatar
Conclusion
High CPU usage look scary first time, but it’s usually one of easier server problem to solve once you know where to look. Next time your server slows down, skip instant reboot. Run “uptime”, open “top” or “htop”, find process at top, and match it to one of causes in this guide.
I personally recommend to try these command today, while your server is healthy. Knowing what “normal” looks like on your own server makes abnormal much easier to spot later.
FAQs
What is normal CPU usage for Linux server?
There is no single perfect number. Short spike up to 100% are normal during updates, backups, or busy moments. What matters is average over time; if your load average stay below your number of CPU core, your server is healthy.
How to find which process is using most CPU in Linux?
Run “top” and press “P” to sort by CPU, or run “ps aux --sort=-%cpu | head -n 11” for snapshot of top 10 process. One at top is using most CPU.
Is 100% CPU usage harmful to my server?
It won’t physically damage server. But if it lasts long time, your website slow down, requests can time out with 502 or 504 errors, and server may become hard to reach over SSH.
What is difference between “top” and “htop”?
Both show running process and CPU usage live. “top” is installed by default and very lightweight. “htop” needs quick install but is easier to read, with colored bars for each core and simple keyboard shortcuts.
Can malware cause high CPU usage on Linux?
Yes, crypto-mining malware is well-known cause. Watch for unknown process names, processes running from “/tmp”, and high CPU at time when your site has no visitor. If you find one, treat it as security incident, not just performance problem.
About the author
Meghna Meghwani is a technical writer focused on Linux, Ubuntu, VPS hosting, server management, WordPress, PHP, Node.js, cloud hosting, and DevOps. She creates beginner-friendly tutorials, practical hosting guides, troubleshooting articles, and server security content designed to help developers and businesses manage applications and servers more efficiently.
