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

Application Center Test知识点滴积累

上一篇 / 下一篇  2007-04-24 12:12:26 / 个人分类:其他

o~6]~7C0\:~Sp0Application Center Test 在测试运行中自动监视 HTTP 性能统计信息,但性能计数器必须在测试运行之前明确进行配置。51Testing软件测试网eX3WG{a5y,Em

,U {RM!RDq'_D%@/}0请检查 ACTTrace.log 文件和报告,并确保不存在以下错误:51Testing软件测试网 MLE}2Yz_f
脚本错误
F%u~"D}"Z'Y\ ] [ {\0DNS 错误
4RM1X+`5s0套接字连接错误
bKeh`J;P"m0HTTP 错误 51Testing软件测试网7U/P p(`"\k
如有必要,请在重新运行测试之前改正其中的错误。51Testing软件测试网y-@oC1l"F"]5Zr

,N$wd` xw!`051Testing软件测试网vU_AG
dcomcnfg.exe 启动 DCOM 配置工具

R c g? }0

D*r$c TC@051Testing软件测试网e1t \!B4T8@:]-r
计算页面性能的公式
)Cg4K8kEPA0以下公式通过测量每个请求所需的处理器周期数来量化 Web 应用程序的性能。该公式用所消耗的周期数除以所处理的请求数。

Ex&P.uM m1j0 51Testing软件测试网+M\/_V&K U!WI$~v

(sum of processor speed x processor use)
9aU_G(L0cHDe,W0________________________________________  = cost, in cycles/request (or Hz/rps)51Testing软件测试网xxAS S#V#xR
     number of requests per second
%BqKu,Xk0例如,在应力测试中,ASP 页面的最大容量可达每秒 800 个请求,同时 Web 服务器的处理器使用率为 85%。如果 Web 服务器的处理器频率为 700 MHz(每秒 700,000,000 周期),可以使用以下公式来计算页面的成本:

#hOQz5ajK%h0 51Testing软件测试网9Y?,ORSg6j?/e-Fa

((4 x 700 000 000 cycles/s) x 0.85)
0T/lo+OC{!cD0___________________________________ = 2 975 000 cycles/request
Dy fo Rb,w0         800 requests/s
y~z0L e:F I L0计算页面性能的 VBScript 代码
;l'y0f.y%QH0使用以下 VBScript 函数计算成本:51Testing软件测试网 A:n'Q'|,B)VR|

51Testing软件测试网a&V%]a d"|

 51Testing软件测试网&L5I4_ a,B?K
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
`%N&](hPq@C0' Function to return the cost of a page, based on
'F8I(iO'p+KDL6s|0' stress test values and Web server/cluster hardware.
ek.m1b,QBOb,m0'
l Hqx9I y0' Returns: page cost, in millions of cycles per request51Testing软件测试网dqh8];@-QYt1h'Kw
'51Testing软件测试网HK2yB4O+h
Function GetPageCost(iSumOfProcessorSpeeds, _ 51Testing软件测试网7jkt'K*H-T
                  fAverageProcessorUse, iAverageRPS)
C9Eu [1Mlg0   Dim iSpentCyclesPerSecond

!a)b(v7V!OVJ0 51Testing软件测试网t T C&Z3Y L/\ l

   ' calculate the number of cycles used over the testing period
*qHb;}.Ie0   iSpentCyclesPerSecond = iSumOfProcessorSpeeds _ 51Testing软件测试网W.RWYT
                              * fAverageProcessorUse

Q;Jwx+b(j W&Tz0 51Testing软件测试网YPU.B L

   ' calculate the amount of work performed by the Web server51Testing软件测试网 ~+brjt5F2^@R-Y{
   If (iAverageRPS > 0) Then51Testing软件测试网3RP@z.m*t
      GetPageCost = iSpentCyclesPerSecond / iAverageRPS
XHEL"UB y/F&{]0   Else
m`y {7Ow;|5D0      GetPageCost = 0
j7F C U*x]%iw0   End If
vd4Wi#eP.A Rap0End Function51Testing软件测试网 W0wJ'f6@P'd
 51Testing软件测试网/\5A4n1N\;b
使用页面成本的示例
OMrlqHIr0了解页面成本有许多用途。 51Testing软件测试网0P2D0{/vuT b8F

/XqE&jg-nA[0最显而易见的用途是比较两个不同页面的性能,或者比较同一页面在调整前后的成本。51Testing软件测试网8h]N#X6h

},U(El fK|aDO0特别是当测试对站点中的所有页面进行请求时,可以通过成本初步估计是否需要随着要处理的通信量的增加、CPU 使用率的更改(或者同时处理两者)添加附加硬件。 51Testing软件测试网 xKC$S/`V.`

51Testing软件测试网jx+x#T@`

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

U.H ^'EX!s U*|0 51Testing软件测试网B F R;jz-hI

以下计算表明需要的处理器速度大约为 11900 MHz:51Testing软件测试网1qZ'ps*|1o

uXaO,By2S t(u0b(A0                            page cost x target RPS51Testing软件测试网ej3`V U?q!z%~ua
estimated processor speed = ______________________
"Z:@4E5cO8FD/b;j Yd8N0                                 processor use 51Testing软件测试网T^*F;[`v7[s

)\8Vu(W3Lf3\0                            2 975 000 cycles/request x 1600 requests/s
0i x+q6r~4UgP G0estimated processor speed = __________________________________________
6V$I*wK_u0                                                0.40 51Testing软件测试网CKn$j]'Hq([

51Testing软件测试网6] XS a8\Q;N

estimated processor speed =  11 900 000 000 cycles/s

B-IS+K C8a t d0

V z na$an'M0number of 700 MHz processors needed = 11 900 MHz / 700 MHz = 17
%e&F }g,t}f4f0新的性能目标要求 Web 服务器群集中有大约 17 个处理器,而原来只需 4 个。再次强调,这些估计仅当处理器速度是限制 Web 应用程序性能的因素时才有意义。51Testing软件测试网1b0}/M&i@9lw0O)o9B+R Ay

51Testing软件测试网/^8ZY*d X)B$GN"z-}

 

`6n;k6g U d$Z)A0 51Testing软件测试网/?+qC1K#|0~4E,?JU)OT
51Testing软件测试网.t W7{bY.v;e6j
测试者家园 2006-07-13 13:31 发表评论
51Testing软件测试网$n)x] J](wM'Sdt
51Testing软件测试网h1T9@nF#Y#y,nv W
Link URL: http://www.cnblogs.com/tester2test/archive/2006/07/13/449809.html

TAG:

 

评分:0

我来说两句

Open Toolbar