如何测试 1000 个客户端 Windows 7 客户端

发布于 2024-10-19 11:58:31 字数 459 浏览 7 评论 0原文

我们有在嵌入了 sql server express 的 Windows 7 上运行的 .net 客户端。它们在断开连接的情况下运行,并且经常会拨入中央服务器并转储它们的信息并获取相关的新信息。我们想要对整个分布式系统进行压力测试,并正在尝试寻找一种具有成本效益的方法来做到这一点。我们的一位开发人员有使用亚马逊云并启动 1000 个客户端的想法,但他们只支持 Windows 服务器操作系统,并且如果您必须多次重新运行测试,看起来可能会花费一些钱,这很可能。

我们考虑过在一台机器上模拟 1000 个客户端,假装有 1000 个客户端并异步进行所有调用,但如果您在一台机器上运行,那么您的一些上限将是一台机器的 RAM 和处理器,而不是更大的机器系统,所以我不确定它会给我们提供的图片有多“真实”。

所有调用都通过 WCF 在客户端和服务器之间进行。

有人在这方面有过经验吗?如果有的话,你是如何解决的?

谢谢,

超级蒂米

We have .net clients running on Windows 7 embedded with sql server express. These run disconnected and every so often will dial in to a central server and dump their information and pull down pertinent new info. We want to do a stress test of the entire distributed system and are trying to think of a cost effective way to do this. One of our devs had the idea to use amazon cloud and spin up a 1000 clients, but they only support windows server O/S and looks like it could run into some money if you have to re-run the test multiple times which is likely.

We thought about simulating the 1000 clients all on one machine, which would pretend to have a 1000 clients and make all the calls asynchronously, but if you are running on one machine some of your ceilings will be RAM and processor of one machine versus a larger system, so I'm not sure how "real" of a picture it will give us.

All the calls happen with WCF between the client and server.

Anyone have any experience in this area and if so how did you tackle it?

thanks,

Super Timmy

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

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

发布评论

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

评论(3

请你别敷衍 2024-10-26 11:58:31

你看过SOASTA吗?他们提供基于云的 SOA 负载测试。

Have you looked at SOASTA? They provide cloud-based SOA loadtesting.

陪我终i 2024-10-26 11:58:31

分而治之,看看是否可以将目标测试服务器连接到与开发人员相同的交换机。将客户端划分到这些机器上,让每个人都在测试服务器上运行。 (坚持使用相同的开关可以消除网络效应,从而扭曲硬件上的结果)

开发人员通常拥有相当糟糕的机器,而且通常有几个。这样您就不会破坏测试机器并可以监视发生的情况。

理想情况下,您将能够在开发计算机上使用 Visual Studio 2010 负载测试代理。
该工具将使您能够监控测试中所有机器的统计数据,并很好地了解服务器的响应情况。

如果运行测试测试的计算机在本地主机上托管一个调用所需 Web 服务的网页,则可能是进行测试的最佳选择。

这取决于您的开发环境的确切性质和 Visual Studio 许可安排。

需要弄清楚的关键事项之一是每个客户端每秒会对 WCF Web 服务发出多少个请求。获得该数字后,您可以将该数字除以每台测试机器的每秒最大请求数,以便计算出需要多少台测试机器。

出于负载测试的目的,您不需要拥有 Web 服务的“实际”客户端。由于 Web 服务是一个接口,您可以模拟普通客户端的活动并在没有正常“思考时间”暂停的情况下运行该活动,从而使您能够测试 1000 个客户端的负载,而无需每个客户端都运行一个实例。

例如,如果每个客户端每分钟访问一次 Web 服务,则每秒总共 1000/60 = 16.7 次调用。如果每个调用在 3 秒内完成,则 50 个虚拟用户将能够创建相同的负载 (50/3=16.7)。根据经验,运行 Visual Studio 负载测试的两台计算机将能够生成负载并且不会使 CPU 过载。

Divide and conquer, see if you can get the target test server attached to the same switch as your developers. Use divide the clients across those machines and get everyone to run against the test server. (sticking to the same switch removes network effects from distorting the results on the hardware)

Developers usually have pretty grunty machines and there are normally a few of them. That way you will not destroy the test machine and can monitor what occurs.

Ideally you would be able to use Visual Studio 2010 Load Test agent on the dev machines.
This tool will give you the ability to monitor stats from all the machine in the test and give a really good picture of how your server responds.

If the machines running test test host a webpage on localhost that calls the required web service may be the best bet for getting the test going.

This depends on the exact nature of your dev environment and Visual Studio licencing arrangments.

One of the key things to figure out is how many requests/second each client would make of the WCF web service. Once you have that number you can divide that number be the maximum requests/second of each test machine in order to figure out how many test machines are required.

For the purposes of load testing, you do not need to have "actual" clients of your web service. As the web service is an interface you can simulate the activity of a normal client and run that without the normal "think time" pauses giving you the ability test the load of 1000 clients without needing an instance of each client running.

E.g. if each client accesses the web service once every minute for a total of 1000/60 = 16.7 calls per second. IF each call completes in 3 seconds, 50 virtual users would be able to create the same load (50/3=16.7). From experience, two machines running Visual Studio load test would be able to generate the load and not overload thier CPU.

看海 2024-10-26 11:58:31

如果您将 WCF 与基于 HTTP 的基于文本的协议一起使用(这似乎是可能的),那么您可以使用许多工具。大多数 Web 负载测试工具可以通过充当浏览器代理来记录 HTTP 流量,这通常也允许从富客户端进行记录。您可能需要对测试用例进行一些额外的自定义,因为这些工具已针对模拟浏览器进行了优化。我们已经为一些客户做到了这一点,效果非常好。

许多负载测试工具支持从云生成负载(包括我们的 - Web Performance Load Tester - 以及 BrowserMob、LoadStorm 等其他工具),因此请从这些工具开始您的评估 - 这将使模拟 1000 个虚拟用户变得非常容易且经济实惠,因为出色地。

If you are using WCF with a text-based protocol over HTTP (which seems likely), then you have a number of tools available to you. Most Web Load Testing tools can record HTTP traffic by acting as a proxy to a browser, which typically allows for recording from rich clients as well. You may need to do some additional customization of your testcases since the tools are optimized to simulate browsers. We've done this for a few of our clients and it worked pretty well.

A number of the load testing tools support generating load from the cloud (including ours - Web Performance Load Tester - and others like BrowserMob, LoadStorm, etc) so start your evaluation with those - it will making simulating 1000 virtual users very easy and affordable as well.

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