2

My server seems to be a bit slow, so I decided to install munin to see what is happening. One statistic that stands out is that the server is forking 50 times a second, which seems a little excessive for my server.

How do I find out what is forking all the time? I am using nginx, postgres and uwsgi, but I can't see why any of them should be causing this many.

How can I find out what processes are responsible for this? I tried google but I can only find vmstat -f that tells me the current number - so nothing more then munin gives me.

The box is a VM using Centos 5 (it has been up for 4 years now, so a little old, I just have not got time to reconfigure something newer)

2 Answers2

1

You could maybe attach to various processes with strace then look for calls to fork/vfork/clone.

frankster
  • 121
  • 5
0

I know I asked this a long time ago, but the answer turned out to be that the number is from the physical machine and not the VM. So all VM's together on the physical server had processing forking 50 times a second. Rather good really as a stat then