压测开发服务器/生产服务器
我对压力测试非常陌生,只是想了解其中的诀窍。 所以我的问题是:
如果我有一台开发服务器,其软件方面相同,但硬件方面的规格比生产服务器低得多,是否值得对开发服务器进行压力测试以识别明显的软件缺陷?
如何最好地对实时生产服务器进行压力测试而不可能损害用户的体验? 或者应该避免对实时生产服务器进行压力测试。
I am very new to stress testing and am just trying to learn the ropes. So my questions are:
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?
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是各种提示/建议:
如果您的应用程序是新的,因此您不知道它是否可以处理生产中的负载,那么您需要进行“容量”测试。 您应该在生产硬件上进行容量测试,由于它尚未“上线”,因此不会影响用户。
如果您的应用程序是已经在生产中部署的现有应用程序,那么您应该做的是“性能回归”测试。
如果您的应用程序
性能回归测试包括对开发服务器上的所有单独“功能”(无论这对您的应用程序意味着什么)进行压力测试,以衡量其性能。 您将结果记录下来作为“基线”。
如果您的开发服务器上的性能回归结果与基线相比没有太大变化,那么您应该可以安全地部署到生产环境,而服务器利用率不会发生变化(即过载)。
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).
我认为您应该避免任何工作,包括在生产机器上进行压力测试,除非您知道您遇到了无法在测试环境中重现的问题 - 也就是说您可能知道您的用户不使用晚上系统? 如果测试是非侵入/只读的,那么我会说这是一个附加选项。
至于在较弱的机器上的分析性能,它并没有那么糟糕 - 大多数瓶颈是由系统的不良架构引起的,并且应该在不同的硬件配置上、不同的负载场景下可见 - 在一台机器上可能更容易注意到问题所以我想说,对你的开发系统进行压力测试和优化,你会知道至少理论上你的生产系统应该更好。
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.