0

I have a VPS server. At the CPU usage chart I see long periods of 50% CPU usage that are not related to chart of visitors of my site: http://c2n.me/iRJplq. I checked top and most of the time fastcgi dispatcher that call python scripts takes most of the cpu: http://c2n.me/iRJqRD. I suspect that probably other users at the same physical server use resources a lot, is it possible to understand with more details, why processes started to consume more cpu?

dbf
  • 73
  • 7

1 Answers1

1

Attach strace to the dispatch.fcgi and see where they are spending most of the CPU time (strace -p PID). You should also enable some tracing/profiling in your Python script to track this (if they have any decent logging features).

It's unlikely your VPS provider is mixing the CPU usage of your virtual machine with that of others in the same physical server.

gtirloni
  • 5,746
  • 3
  • 25
  • 52
  • I tried to attach to one of the dispatch processes and here is a sample output: http://pastie.org/9532757. It is interesting, that even if there are no requests (records in access.log and output in strace) this process also has more than 30% in top. – dbf Sep 06 '14 at 21:58
  • It's accepting connections over and over on fd 12. Try using `lsof -p PID` to see what that file description actually is and perhaps who is connecting to it all the time. – gtirloni Sep 06 '14 at 22:11