I am running a API server on an EC2 C1.medium instance. Our API call takes around 3-5 seconds to finish (runs a python call and uses NLTK calls which are little memory consuming). We have configured it atop an Apache server and when we try ab to benchmark, we can just about make 100 concurrent calls. If push this above 100, we get apr_poll: The timeout specified has expired (70007) or apr_socket_recv: Connection reset by peer (104) When the checked the system load, Apache usually crashes with out of memory, but the CPU load is also around 90-100 all the time. Is this the absolute limit of EC2 C1.medium instance, should we move to a bigger instance or is it because of improper tuning of Apache?
Asked
Active
Viewed 608 times
1
-
There are often ways to improve performance and scalability of applications without resorting to upgrading hardware, but it takes a lot of detailed work to diagnose where the issues are and to test potential improvements. It's going to be difficult for somebody not familiar with your application to give a relevant answer using the high level overview you have provided. It looks like you may be CPU bound, so finding out what part of the application is using CPU would be a good place to start. – Eric Hammond Nov 11 '11 at 11:11
-
@EricHammond Yeah as I mentioned CPU load remains almost 100% during ab-testing, and it breaks with out of memory. The actual API framework is in the best of tuning as well. I was asking if the web server tuning has any effect in increasing the API capacity or is C1.medium too small for such operations. – Codevalley Nov 11 '11 at 11:23
-
Then the answer continues to be "maybe" without further details and experimentation :-) – Eric Hammond Nov 15 '11 at 02:52
1 Answers
1
Before upgrading instance type, First try to find out that which resource is consuming so much system resources. For example, in your case, the TCP/IP kernel parameters can be tuned to withstand high level of bandwidth. Also, disk can optimized as well as apache can tuned for optimal performance. But before doing all of this, try to look at your application, that it actually does require that level of resources or not. then go for other steps, one by one. and in the END, take step to upgrade instance type from medium to Large. By doing this analysis, you will also come to know that your application is CPU intensive or Memory intensive, so you can choose High cpu or High memory instance, based on your demand.
Farhan
- 4,210
- 9
- 47
- 76