High CPU Usage Even when Upgraded

Hi Guys,

Forewarning, i'm not an experienced sys admin or anything, i'm kind of a noob!

I'm running a script on my linode that tracks traffic then redirects it elsewhere based on certain conditions. Anyways, my setup is NGINX / PHP5-FPM (MySQL is litely used, but it's only triggered when I login into panel)

I was running on Linode 16384 but recently upgraded to Linode 65536, as my CPU usage was peaking at 50-70% during peak hours, and I didn't want to deal with any more upgrades in the future.

Anyways! After the upgrade, my CPU usage is still about the same, not sure why, with the same traffic levels. On HTOP, it seems my CPU usage is pretty low, but on Linode it seems HIGH, what is the cause for the inconsistency?

Anyways, if anyone could offer an explanation or let me know if something is wrong then thank you so much!

Nginx:

user www-data;
worker_processes 20;
pid /run/nginx.pid;

events {
    worker_connections 15360;
    # multi_accept on;
}

PHp5-FPM

pm.max_children = 500
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 45
;pm.process_idle_timeout = 10s;
;pm.max_requests = 500

At High Load (Linode Graph 70% CPU Usage)

ps -ylC php5-fpm --sort:rss | awk '!/RSS/ { s+=$8 } END { printf "%s\n", "Total memory used by PHP-FPM child processes: "; printf "%dM\n", s/1024 }'

Memory Used by PHP-FPM Childs: 1082M

Linode Graph

~~![](<URL url=)http://i.imgur.com/e8J2WEW.png" />

HTOP

~~![](<URL url=)http://i.imgur.com/FH8aL0l.png" />

One thing i'm confused about is Linode graph is showing really high CPU usage, but HTOP load averages are extremely low for a 20 core server, right?

Thank you all very much! Please let me know if more info is needed!~~~~

3 Replies

The Linode graphs are based on the number of cores your Linode has. So, for example, for a Linode 64G, which has 20 cores, the range you'll see on the graphs would be between 0% to 2000%, not 0-100%.

If your graphs are showing 80%, it means you're using 80% of only one core. You still have another 19.2 cores to go :)

-Chris

Chris thanks a lot! I was in a panic for nothing then haha!

Assuming those are your usual stats (50% of a core, 1GB RAM used) your old 16gb node will probably be more than enough (or even the 8GB one)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct