I have created a new app, and I plan on adding caching, cdn, and other performance improving methods. I would like to check the current performance and also after each of these methods I would like to check the performance again. This is a Rails app.
How should I go about it? Is there a command I can use to check this? do I need to run a test? how? From what I've searhced it seems that new relic gives a lot of this information, but it seems to me that that's only on live data, and I'd like to test the max that the app can handle (for instance before and after performing the above changes) in addition to monitoring live data.
To calculate requests per second you divide the memory by memory required for an instance and then multiple it by the inverse of task time taken to complete an instance.
Why Go server can't handle more than 1000 requests per second?
The from-the-box number of open connections for most servers is usually around 256 or fewer, ergo 256 requests per second. You can push it up to 2000-5000 for ping requests or to 500-1000 for lightweight requests.
One easy way is to use apache bench:
ab -n 2000 -c 200 http://yourdomain.com/
where n is the number of requests to make and c is the number of clients to use.
You will get a report like
Document Path: /
Document Length: 36153 bytes
Concurrency Level: 200
Time taken for tests: 4.544 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Total transferred: 72732000 bytes
HTML transferred: 72306000 bytes
Requests per second: 440.17 [#/sec] (mean)
Time per request: 454.366 [ms] (mean)
Time per request: 2.272 [ms] (mean, across all concurrent requests)
Transfer rate: 15632.19 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 72 77 59.1 73 1075
Processing: 160 357 96.3 325 636
Waiting: 73 196 95.9 165 488
Total: 234 434 109.9 398 1340
Percentage of the requests served within a certain time (ms)
50% 398
66% 419
75% 440
80% 468
90% 607
95% 671
98% 688
99% 700
100% 1340 (longest request)
New Relic also allows you to store data. Depending on your account type, you can get up to unlimited data retention. The standard type account gives you 7 days of data retention. That should be enough for your purpose.
You can then use load testing apps, like jMeter or Apache bench. There are also web based tools like blitz.io and Loadimpact.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With