VSTS中测试出来的Test per second与Concurrent user number是什么关系?

比如说, 我们要估计某种硬件条件下的一个有两台WFE的SharePoint服务器场能承受的最大并发用户数是多少. 那么我们该怎么做呢?

你一定想到了先搭一个这样的环境, 然后用Visual Studio Team System建立一个test application, 用Loat Tests来将NLB下的WFE的CPU压到某一个情况(可以是green zone, 也可以是red zone), 比如说70%. 那么后面该怎么计算呢?

 

微软网站上针对SharePoint有green zone的如下定义:

  • The server-side latency for at least 75% of the requests is less than 1 second.

  • All farm servers maintain an average CPU utilization of less than 60%.

  • Failure rate is less than 0.01%.

 

那么我们测出来了CPU在百分之70的情况下, 每秒种完成的请求数(requst per second, RPS). 剩下的就是完成RPS和Concurrent User Number(CUN)之间的映射了.

要完成这个映射, 我们还需要一个user load的概念. user load是一种等级划分, 用来衡量用户发出请求的频率.

 

根据下面解释VSTS中概念的部分, 上段里提起的request实际上是VSTS中的test. 那么实际上我们面临的问题是VSTS中测出来的Test per second与同时在线用户数concurrent user的关系.

 

在微软的文章Estimate performance and capacity requirements for Windows SharePoint Services collaboration environments (Office SharePoint Server)中, 对这种关系进行了解释:

下表体现了用户工作量的四个等级:

image

 

典型地估算吞吐量的方法是: 用户数x活跃用户的百分比.

比如说1000个用户, 同时在线的比率是30%, 那么在线用户数就是1000*30% =  300个.

那么在heavy的user load下, 即单个用户, 每分钟发出一个请求. 那么300个用户, 每分钟发出300个请求, 每秒就是300/60 = 5 TPS.

好了, 我们算出来了这样的式子CUN / 60 = TPS.

 

假设, 我们在环境中压WFE的CPU到70%的时候, VSTS告诉我们这种条件下的TPS是n. 那么这个场的这个配置下, 能承受的最大的并发用户数就是60*n.

 

其他情况, 根据不同的user load就都可以计算出来了.

 

概念解释

======================

Requests

Requests are the smallest load testing parameter with respect to a web page.

It contains details for individual requests issued during a load test. This includes all HTTP requests, and dependent requests such as images, css and java-script files.

Pages

Right after “Requests” we can consider “Pages” as the next level of load testing counter set, which is defined in MSDN as “Displays a list of pages accessed during a load test run. Some data in this table is available only after a load test has completed.”

For instance, we have a web page, which has a button, clicking on which shows a message on that page, which generate two entries for Page counter.

One important note is, any redirection to a separate page will not be counted with additional value, however the corresponding Requests for the redirected page will be counted.

Tests

Contains the details for individual tests run during a load test.

For instance, we have created a web test, that contains two web pages, pushing on a button on the first page will re-direct the user to the second page, although there will be multiple entries will be involved for Requests and Pages counters, but the whole process will be considered as a single Test.

 

参考资料

======================

Estimate performance and capacity requirements for Windows SharePoint Services collaboration environments (Office SharePoint Server)

http://technet.microsoft.com/en-us/library/cc261795(v=office.12).aspx

Capacity planning for SharePoint Server 2013

http://technet.microsoft.com/en-us/library/ff758645.aspx

Getting Started with Load Testing in Visual Studio 2012

http://blogs.msdn.com/b/visualstudioalm/archive/2012/06/04/getting-started-with-load-testing-in-visual-studio-2012.aspx

Understanding VSTS Load Test Counters: Requests, Pages and Tests

http://geekswithblogs.net/joycsharp/archive/2009/02/18/understanding-vsts-load-test-counters-requests-pages-and-tests.aspx

Visual Studio 2008 Load Test Gotchas

http://www.codeproject.com/Articles/110363/Visual-Studio-2008-Load-Test-Gotchas

posted on 2013-05-09 17:43  中道学友  阅读(673)  评论(0编辑  收藏  举报

导航

技术追求准确,态度积极向上