1

I have this server:

4 Xeon CPU
4G Ram
Centos5+Apache+php+Mysql+Redis+directadmin

Right now i have a problem. because of my high range of users, Apache can't handle all of them and puts them in queue that system gets very slow. I searched and it seems if a have good MaxClients configuration, i can overcome this. but what can be my configuration with this system that i explain?

My CPU and RAM is not full when system goes to slow down!

UPDATE:

this is result of htop command:

Here, When the number in front of Tasks: section goes bigger than 600, my server starts slowing down! enter image description here

this is result of atop command: enter image description here

1 Answer 1

1

This could have nothing to do with apache. The fact that your MaxClients is good should be an indication that apache might not be the problem. Maybe Redis or Mysql is slowing down and needs more memory. Either of those could cause requests to take longer and cause apache to backup.

Do you have graphs for these systems? What does your P90 response time look like? Does the number of requests handled go down when you see the slowness? You need these graphs for Redis, Mysql, and Apache. Otherwise you're just shooting in the dark until you get lucky.

A few minor suggestions:

  • CentOS5 is pretty old. With a newer kernel you could squeeze better performance out of your same hardware.
  • That's a lot to run on a single box. Splitting things up across a few machines would allow each to specialize and use the Linux cache more effectively. It will also make it easier to figure out who is chewing up the CPU since they'll be using CPU on their own box.
2
  • i updated my question with two screenshots of htop and atop commands. as i say in the update, in the htop command, When the number in front of Tasks: section goes bigger than 600, my server starts slowing down! My CPU and RAM is not full when system goes to slow down.
    – Fcoder
    Nov 11, 2015 at 16:08
  • Graphs means you can see how these values over time. You need to compare how things look when it is good versus when it isn't.
    – chicks
    Nov 11, 2015 at 18:46

You must log in to answer this question.

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