Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two servers connected via LAN. On one is Apache which handles and executes all php requests. On other is solely MySQL, with a 11 GB database.

Everything works fine for days (having load ~1.0), when we have about 10.000 users online. When that number hits ~20.000, Apache tends to have a very high load, of about 1.000 (up to 3.000), while MySQL load stays at about 2.0-3.0 ...

On the other side, MySQL is filled with unfinished queries and sleep processes.

We also have a HTML caching engine which makes .html of the buffer output, and saves it on server. There is about 50.000 of those .html files in one folder...

What do you people think, why does the Apache load spikes up, while MySQL remains calm?

How could I test which processes take most time and how to simulate 20.000 people online after, maybe, fixing the problems?

share|improve this question
    
Are you talking about having 20k simultaneous users? –  John Wheal Aug 2 '12 at 9:58
    
What do you mean by "10,000 users online"? Does that mean 10,000 unique IP addresses in the last 10 minutes? Or 10,000 simultaneous TCP connections? Or 10,000 requests (not necessarily unique) in the last hour? Also, what filesystem are those 50,000 .html files on? –  Ladadadada Aug 2 '12 at 10:00
    
10.000 users in last 10 minutes, determined by IP address (so it could be more PCs on one IP) –  kosturko Aug 2 '12 at 10:50

1 Answer 1

up vote 0 down vote accepted

I use blitz.io to simulate extreme online traffic.

Apache isn't considered the best web server to use for high traffic sites. Nginx or litespeed would be better because Apache is a process-based server, while nginx is an event-based web server.

share|improve this answer
    
Blitz seems great! If I buy 25k users for 1 hour, does that mean that I have 60 minutes that I can distribute over a few days? –  kosturko Aug 2 '12 at 10:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.