我的地盘我做主! 博客:http://tester2test.cnblogs.com/   msn:win_soft@163.com

Application Center Test知识点滴积累

上一篇 / 下一篇  2007-07-12 12:19:40 / 个人分类:其他

V,i/Z%h)?3zvYN0Application Center Test 在测试运行中自动监视 HTTP 性能统计信息,但性能计数器必须在测试运行之前明确进行配置。

.qL*\:fy3YVY0 51Testing软件测试网,kB0@F#I

请检查 ACTTrace.log 文件和报告,并确保不存在以下错误:
k? CSk8]I@c4? w0脚本错误
!}w/d+D!G0DNS 错误 51Testing软件测试网;Z"JL }$E&B b
套接字连接错误
q$V!O8^s&I"K;v S0HTTP 错误 51Testing软件测试网(j(^7N&i#mN)i3?c.~
如有必要,请在重新运行测试之前改正其中的错误。

\UA zm(`Zf0 51Testing软件测试网2CN~ D)O^)^n c AW


K$_;x8MLw-g/?(S0dcomcnfg.exe 启动 DCOM 配置工具

T+@$toQ0 51Testing软件测试网 ikV'c|

51Testing软件测试网;bDf$o q'u/`AZ
计算页面性能的公式51Testing软件测试网1Y,Z|*H-u
以下公式通过测量每个请求所需的处理器周期数来量化 Web 应用程序的性能。该公式用所消耗的周期数除以所处理的请求数。51Testing软件测试网-_Q j T@3E KA*@

v;[4ae@$@.F6F2Jk0(sum of processor speed x processor use)51Testing软件测试网E6p!J@8i!d
________________________________________  = cost, in cycles/request (or Hz/rps)51Testing软件测试网C,c s y[:o)} a p1o
     number of requests per second
^1NYZu`"|0例如,在应力测试中,ASP 页面的最大容量可达每秒 800 个请求,同时 Web 服务器的处理器使用率为 85%。如果 Web 服务器的处理器频率为 700 MHz(每秒 700,000,000 周期),可以使用以下公式来计算页面的成本:51Testing软件测试网5p \ zQn^\8{#d

Q ZN+wU$?Iqk0((4 x 700 000 000 cycles/s) x 0.85)
)KoK1L5?P.U0___________________________________ = 2 975 000 cycles/request
zu!DC,O0         800 requests/s
$FX }i!q:n6`0计算页面性能的 VBScript 代码
0ewG4A)F:su ni0使用以下 VBScript 函数计算成本:51Testing软件测试网*u8H I bPkf'i2n$R

51Testing软件测试网qa H H:rO4x&?

 51Testing软件测试网Y)i i5Q"J(mH/s-Z a;t
'''''''''''''''''''''''''''''''''''''''''''''''''''''''51Testing软件测试网Em"GPZcH ^'{
' Function to return the cost of a page, based on 51Testing软件测试网G(O1I.O } {
' stress test values and Web server/cluster hardware.
{5N[ h LRZ,_0'
h#cW3X4RYu7\eD A0' Returns: page cost, in millions of cycles per request51Testing软件测试网k:L0wv,|)j{
'
.iw_ Uc6ty2Rd0Function GetPageCost(iSumOfProcessorSpeeds, _
[%omN7M7O!tY"d u8~0                  fAverageProcessorUse, iAverageRPS)51Testing软件测试网R BF8Oyw| S
   Dim iSpentCyclesPerSecond

j m$j.u!jzx0 51Testing软件测试网 boW/o6h3k_m

   ' calculate the number of cycles used over the testing period51Testing软件测试网 @?'qR&U mN.[+t
   iSpentCyclesPerSecond = iSumOfProcessorSpeeds _
M&]I'MX4\0                              * fAverageProcessorUse

~g hnU;i(f tA0

Q'|C#Kl8d{+{4a0   ' calculate the amount of work performed by the Web server
,WWPQ3g3@vo"a9g0   If (iAverageRPS > 0) Then51Testing软件测试网 ~0j6zb&a \NR c
      GetPageCost = iSpentCyclesPerSecond / iAverageRPS
'X3RQ;p2v _ KW\0   Else51Testing软件测试网8|Utf LlU4j9r
      GetPageCost = 051Testing软件测试网.x qe.q!B*FF J
   End If
)jb V H-HkzD#YG8w0End Function
xd5L%Lbs_0 
]^&TA/V.ob1r0使用页面成本的示例
/f{_XW0了解页面成本有许多用途。

*YGQ'yk0[0 51Testing软件测试网B+V%M3`H0}

最显而易见的用途是比较两个不同页面的性能,或者比较同一页面在调整前后的成本。51Testing软件测试网poW;_${_e5u h$?~

51Testing软件测试网 b6ORn$|0OZ&|5]

特别是当测试对站点中的所有页面进行请求时,可以通过成本初步估计是否需要随着要处理的通信量的增加、CPU 使用率的更改(或者同时处理两者)添加附加硬件。 51Testing软件测试网H*m]'fd!z

@-p|1Q1b${0在前面的示例中,需要多大的处理器速度才能保证处理两倍的站点通信量,同时使处理器的使用率保持在 40% 左右,以便可以轻松处理至少达到 3200 rp 的临时负载增长?

%[M:D iX4\0

1r!B3qf"];e0B:C0以下计算表明需要的处理器速度大约为 11900 MHz:51Testing软件测试网o u(^+e%~1Q%n

51Testing软件测试网;XuwZ Hz'G [

                            page cost x target RPS51Testing软件测试网tZ0o%] mty
estimated processor speed = ______________________
.qL$g2I#A vNC0                                 processor use 51Testing软件测试网gxo'[M8J]+^

P,k b+s$sN0                            2 975 000 cycles/request x 1600 requests/s51Testing软件测试网-X8Ku5pp{.Q\
estimated processor speed = __________________________________________51Testing软件测试网v2X w%l!w8}p`
                                                0.40 51Testing软件测试网tQo"q6HzN-{

k.E*Z4rR0estimated processor speed =  11 900 000 000 cycles/s

6z)[?q"s#Fq ]0

~+Ow&Kn0number of 700 MHz processors needed = 11 900 MHz / 700 MHz = 1751Testing软件测试网3VL(}&b%j&ePP%L
新的性能目标要求 Web 服务器群集中有大约 17 个处理器,而原来只需 4 个。再次强调,这些估计仅当处理器速度是限制 Web 应用程序性能的因素时才有意义。51Testing软件测试网$C2Z#T5z6zDV x

Mgv(F#a%R4d]0 51Testing软件测试网.{m#|.Y0X6L*m~;}

51Testing软件测试网#ZO~ qx@
51Testing软件测试网1\ D2ypW A&G
测试者家园 2006-07-13 13:31 发表评论

.z.K,AA hN#Z0
|f4np"B0Link URL: http://www.cnblogs.com/tester2test/archive/2006/07/13/449809.html

TAG:

 

评分:0

我来说两句

Open Toolbar