High CPU Usage Even when Upgraded
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
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