1

Machine: 8 Core processor with Centos 6.7

top command result

I am using node.js, PHP-FPM, NGINX, Redis, MongoDB.

I have checked with stopping all services created my me and PHP-FPM, NGINX, Redis, MongoDB processes but still getting 100%ni and 41% load average.

my node.js code sending files to another server using htpp request.

How can I check which process is getting more CPU and why?

4
  • 1
    Run something like ps -e -opcpu=,cmd= | sort -rn and look at the output near the top to find processes using most CPU.
    – pdp
    Jan 20, 2016 at 8:03
  • 1
    Also, sustained load average higher than the number of CPUs (grep -c ^processor /proc/cpuinfo) can be a sign of improper configuration. May be one or more of your applications are spawning too many threads as determined by their configuration.
    – pdp
    Jan 20, 2016 at 8:12
  • 100%ni doesn't tell much. Pls post output of top Jan 20, 2016 at 12:09
  • @user1700494 Follow the provided link [i.stack.imgur.com/Z5nGe.jpg]
    – Sham
    Jan 20, 2016 at 12:54

1 Answer 1

0

Without any further information, it is hard to say.

I'd guess you just have too much IO which is a common problem when databases are not configured correctly.

You can use iotop to see which processes use most IO and use iostat to see which partition has how much IO utilization.

2
  • Hi @steve, I am using connection pool for mongodb and redis to connect with node.js and http load is lite (not more traffic). And using Haraka for mail server. As per iotop haraka is using more IO. Can you help me how to reduce IO or should we increase resource?
    – Sham
    Jan 20, 2016 at 9:31
  • We are using SSD and iotop is getting Total DISK READ: 0.00 B/s | Total DISK WRITE: 0.00 B/s
    – Sham
    Jan 20, 2016 at 10:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .