The problem
2 apache
servers have a long response time, but I do not see CPU or memory max out.
Details
I have 2 apache
server servering static content for client.
- This web site has a lot of traffic.
- At high traffic I have ~10 request per second (html, css, js, images).
- Each HTML is making 30 other request to the servers for loading js, css, and images.
- Safari developer tool show that 2MB of that is getting transfer each time I hit a html page
- These two server are running on
Amazon Web Service
- both instances are m1.large (2 CPUS, 7.5 RAM)
- I'm serving images in the same server
- server are in US but a lot of traffic comes from Europe
I tried
- changing from prefork to worker
- increasing processses
- increasing threads
- increasing time out
I'm running benchmarks with ab
(apachebench) and I do not see improvement.
My question are:
- Is it possible that serving the images and large resorouces like js (400k) might be slowing down the server?
- Is it possible that 5 request per second per server is just too much traffic and there is no tuning I can do, so only solution is to add more servers?
- does
amazon web services
have a problem with bandwidth?
New Info
My files are being read from a mounted directory on GlusterFS
Metrics collected with ab (apache bench) run on a EC2 instance on same network
Connections: 500
Concurrency: 200
Server with files on mounted directory (files on glusterfs)
Request per second: 25.26
Time per request: 38.954
Transfer rate: 546.02
Server without files on mounted directory (files on local storage)
Request per second: 1282.62
Time per request: 0.780
Transfer rate: 27104.40
New Question
Is it possible that a reading the resources (htmls, js, css, images) from a mounted directory (NFS or GlusterFS) might slow down dramatically the performance of Apache?
Thanks