1

We are doing some load testing on a PHP (Kohana) application. One funny thing we noticed is that each request seems to be creating 4 process each time and increases the load on the sever by 4 times. And when there are, for example, 500 users per second hitting it acts as 500*4.

I really don't understand what could be creating all these processes. My understanding is that each PHP request creates one thread, it shouldn't be creating processes, especially not 4. Could it be an Apache issue? Or PHP issue?

I didn't find any information about this on Google. Any suggestion on what could be causing this problem would be appreciated.

laurent
  • 88,262
  • 77
  • 290
  • 428
  • 2
    Do you have Ajax call ? Then it may be the browser that will do 4 requests at a time. You may take a look at http://stackoverflow.com/questions/985431/max-parallel-http-connections-in-a-browser – Michael Laffargue Apr 25 '12 at 07:36

1 Answers1

0

My first guess is you are simply seeing the effect of Apache MinSpareServers setting. Rather than spin up a process when a request comes it, Apache will have one ready and waiting. So if this is set to 4, Apache will always try to have active processes + 4 running.

It could also be ThreadsPerChild setting, depending on how you have Apache configured. In this case, each child always spins up the number of threads specified so they are ready.

Lots of processes or threads isn't necessarily an issue. They may not be doing anything except waiting to handle incoming traffic.

Brent Baisley
  • 12,641
  • 2
  • 26
  • 39