针对虚拟机中安装的 Web 应用程序进行负载测试

发布于 2024-10-22 08:44:25 字数 246 浏览 7 评论 0原文

众所周知,修复用于加载测试的 Web 应用程序安装点的硬件规格与找到满足测试目的的良好指标一样重要。然而,现实是没有可用的物理机可供我利用,这迫使我寻找替代解决方案 - 虚拟机。

幸运的是,我的公司使用 vmware (ESXI),我很高兴能够访问它。但是当我尝试为自己创建虚拟机时,似乎我什至无法说出实际的硬件规格。我要创建的虚拟机的类型,因此很难映射回我正在模拟的物理机类型。

这对于负载测试真的很重要吗?意见将不胜感激

谢谢

As everyone knows fixing hardware specs for webapp installation point for loading testing is as important as finding good metrics to address the testing purpose. However, the reality is there isn't an available physical machine that i can leverage with, which forces to find alternative solution - a virtual machine.

Fortunately, my company uses vmware (ESXI) and I am grateful that I can have access to it. But when I attempt to create a VM for myself, it seems that I am not even able to tell the actual hardware spec. of the VM I was going to create, so it's kind of hard to map back to the kind of physical machine i am simulating for.

Does this really matter to load testing? Word of advice will be appreciated

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陌路黄昏 2024-10-29 08:44:25

是的,这对于负载测试确实很重要。

如果没有要测试的架构,您就无法验证您选择的架构是否支持计划的应用程序负载。

但是,您可以计算出不同页面相对于彼此的响应时间。您可以获得有关虚拟机正在执行的操作的一些统计信息,如果您对硬件所有者友好,则可以从运行虚拟机的基本硬件收集一些统计信息。

您还可以衡量站点中页面之间的相对差异。因此,在虚拟机上进行负载测试并不是完全浪费时间,但如果您打算在生产中安装在物理机上,则不是在进行比较。

Yeah, it really matters for load testing.

Without the an architecture to test against, you cannot verify that your chosen architecture will support the planned application load.

However, you can figure out the response times of different pages relative to each other. You can get some stats on what the virtual machine says it is doing and if you are nice to the owner of the hardware, can gather some stats from the base hardware running the VM.

You can also measure the relative differences between pages in your site. So load testing on the VM is not a complete waste of time, but is not comparing apples with apples if you intend to install on a physical machine in production.

陈独秀 2024-10-29 08:44:25

虚拟化的巨大好处是您不必关心正在运行的硬件类型 - VMWare 层允许服务器管理员将计算机从一个硬件平台移动到另一个硬件平台,而应用程序或用户对此一无所知。然而,从您的角度来看,这是一个缺点,因为您没有接触底层硬件,因此无法知道您拥有什么。虚拟机管理员可以通过多种方式屏蔽甚至限制您可以使用的资源。例如,您可以“看到”双核、2.33 Ghz 处理器、2 GB RAM、100 GB 硬盘虚拟机,但您不知道的是,您的服务器可能会在幕后受到限制,以便它会切勿使用超过 33% 的可用 CPU 资源。另一方面,您的虚拟机管理员可以制定一项为您保留资源的策略,以便在 8 核虚拟机主机上,您的 2 核服务器保证始终有两个核心 - 即 100 个服务器的 CPU 可用性百分比。如果不知道虚拟机策略是什么,您实际上无法映射到物理服务器的特征。最好的办法是花半个小时与您的虚拟机管理员交流,让他们告诉您有关其虚拟主机基础设施的所有信息。如果他们花时间构建资源池,他们可能会很乐意告诉您有关预订政策和日程安排的所有信息。

在您的来宾虚拟机中,您应该能够了解一些信息,例如处理器系列是什么、您是否有一个或两个核心、有多少可用内存等。请考虑虚拟机管理员的反馈 - 如果他们这么说您的虚拟机与其他服务器位于一个资源池中,并且仅拥有总可用服务器 CPU 资源的 50%,那么这可能会帮助您进行推断。尝试在晚上 8 点或凌晨 3 点运行负载,看看得到的数字是否与白天看到的不同。如果您承诺只在工作时间之后运行全面测试,也许他们可以为您预留 CPU 资源。

现在,就测试而言,如果测试的目标是找出应用程序瓶颈在哪里,那么这是一个“有效测试”场景。您已被赋予任意约束,您的测试将确定您是否需要更多内存、更多 CPU、更多磁盘 I/O。您可以从那里调整您的应用程序。

希望这有帮助 -
詹姆斯

The great benefit of virtualization is that you don't have to care about what kind of hardware you are running on - the VMWare layer lets the server admins move machines around from one hardware platform to another without the application or users knowing anything about it. From your perspective, however, this is a disadvantage, since you aren't exposed to the underlying hardware and therefore can't know what you have. There are many ways that the VM admins can mask or even limit what resources are available to you. For example, you can "see" a dual-core, 2.33 Ghz processor, 2 gb of RAM, 100 GB of hard disk VM, but what you don't know is that behind the scenes your server could be throttled so that it will never use more than 33% of the available CPU resources. On the other hand, your VM admins could build a policy that reserves resources for you so that on an 8-core VM host, your 2-core server is guaranteed two cores at all times - i.e., 100% cpu availability for your server. Without knowing what the VM policies are, you really can't map to a physical server's characteristics. The best thing would be to spend half an hour with your VM admins, getting them to tell you everything about their virtual host infrastructure. They'll probably enjoy telling you all about the reservation policies and scheduling, if they have spent any time crafting the resource pools.

Inside your guest VM, you should be able to tell some things like what the processor family is, whether you have one or two cores, how much memory is available, etc. Take into account the feedback from the VM administrators - if they say that your VM is in a resource pool with other servers and will only have 50% of the total available server CPU resources, then that may help you extrapolate out. Try running your load at 8 PM or 3 AM to see if you get different numbers than what you see during the day. Maybe they can give you a reservation for CPU resources if you promise to only run your full-out testing after business hours.

Now, as far as testing goes, it's a "valid test" scenario if the goal of your testing is to find out where your application bottlenecks are. You have been given an arbitrary constraint, and your tests will determine whether you need more memory, more CPU, more disk i/o. You can tweak your application from there.

Hope this helps -
James

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文