Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stress testing development server / production server

I am very new to stress testing and am just trying to learn the ropes. So my questions are:

  1. If I have a development server which in terms of software is identical but in terms of hardware has a much lower spec that the production server, is it worth stress testing the development server to identify obvious software defects?

  2. How is it best to stress test a live production server without potentially jeopardising the experience of you users? Or should stress testing a live production server be avoided.

like image 360
ChrisInCambo Avatar asked Mar 17 '09 07:03

ChrisInCambo


2 Answers

Here are various tips/suggestions:

  • If your application is new, so you don't know if it can handle the load it will have in production, then you need to do "capacity" testing. You should do your capacity testing on your production hardware, which since it hasn't gone "live" yet, won't affect users.

  • If your application is an existing application that is already deployed in production then what you should be doing is "performance regression" testing.

  • A performance regression test consists of doing a stress test of all the individual "features" (whatever that means for your application) on your development server to measure it's performance. You keep a record of the results as your "baseline".

  • As you make changes to your application, re-run your performance regression tests to see if any results have changed significantly from the baseline (and record the new numbers as your new baseline).

  • If the performance regression results on your development server didn't change much from the baseline then you should be safe to deploy to production without your server utilization changing (i.e. getting overloaded).

like image 52
jwanagel Avatar answered Oct 03 '22 09:10

jwanagel


I think you should avoid any work including stress testing on production machines unless you know you have a problem that you can't reproduce in your test environment - that said maybe you know your users don't use the system during the night? If the tests are non intrusibe/read only then I'd say it's an additional option.

As to the analyzing performance on a weeker machine it's not so bad - most bottlenecks are caused by bad architecture of your system and should be visible on different hardware configurations, just at different load scenarios - it may be even easier to notice the problems on a weeker machine so I'd say stress test and optimize on your development system and you'll know that at least theoreticaly your production system should be even better.

like image 44
RnR Avatar answered Oct 03 '22 09:10

RnR