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

Application Center Test知识点滴积累

上一篇 / 下一篇  2006-12-06 11:36:59

u:t~ T,U2S^L0s s0Application Center Test 在测试运行中自动监视 HTTP 性能统计信息,但性能计数器必须在测试运行之前明确进行配置。51Testing软件测试网c7h&|E$J T,['l

51Testing软件测试网7dO7q.nbA

请检查 ACTTrace.log 文件和报告,并确保不存在以下错误:51Testing软件测试网S?#d/TE"l3y*j~
脚本错误51Testing软件测试网+|[ A ? zh,e+b&}b
DNS 错误51Testing软件测试网%hA5|xe,}-M
套接字连接错误51Testing软件测试网6C!Q z0Q!h7QOl
HTTP 错误
I?H4K6H)YI8U,uQ0如有必要,请在重新运行测试之前改正其中的错误。51Testing软件测试网;Z T^DQ7\zs

@"F!uj|"h0
dJ0Hz W/S4rDQ0dcomcnfg.exe 启动 DCOM 配置工具51Testing软件测试网 y!_5Upk,sk

51Testing软件测试网!A0q)`.PhC

51Testing软件测试网z1L9N;a'q#@S4o huw H
计算页面性能的公式51Testing软件测试网-]N&t"w$QK? O
以下公式通过测量每个请求所需的处理器周期数来量化 Web 应用程序的性能。该公式用所消耗的周期数除以所处理的请求数。51Testing软件测试网 CS3{7A$P

!}V+k9?9N3be ]6|f}0(sum of processor speed x processor use)
)F)pr"x$i5|9j0________________________________________  = cost, in cycles/request (or Hz/rps)
3pr1ji/f:m0     number of requests per second51Testing软件测试网:`t7fV,f?@e}5V
例如,在应力测试中,ASP 页面的最大容量可达每秒 800 个请求,同时 Web 服务器的处理器使用率为 85%。如果 Web 服务器的处理器频率为 700 MHz(每秒 700,000,000 周期),可以使用以下公式来计算页面的成本:

4o?gR6MJ5hp0

4P F#O4r*d+m D0((4 x 700 000 000 cycles/s) x 0.85)
Px:~!W:JP@B4s0___________________________________ = 2 975 000 cycles/request
3p.yEbxJb,l5|P0         800 requests/s51Testing软件测试网AKb)t~%q%rA6?
计算页面性能的 VBscrīpt 代码51Testing软件测试网6E0Z!FcSio)X
使用以下 VBscrīpt 函数计算成本:51Testing软件测试网2@ }"S_~_5r)x%cb9s

9|6GK2X1W @(L0
i3_V!l ]X0'''''''''''''''''''''''''''''''''''''''''''''''''''''''
L.h f&B`vd0' Function to return the cost of a page, based on
r8v Y)F/qfP1pe"b0' stress test values and Web server/cluster hardware.
El*tN4u;n0'
E[mE3w0' Returns: page cost, in millions of cycles per request
z mRg%n.P+Un0'
Y*fe:dtP2` o0Function GetPageCost(iSumOfProcessorSpeeds, _51Testing软件测试网rKRs&MJrU H%j
                  fAverageProcessorUse, iAverageRPS)
And0W)q)h-c[0   Dim iSpentCyclesPerSecond

*X'Ct&C8W*mv0

$}h~~%{5}1Z0   ' calculate the number of cycles used over the testing period
Mq&R.Z`/A+Yb3?0   iSpentCyclesPerSecond = iSumOfProcessorSpeeds _51Testing软件测试网`4q&x8wh~v7Bq+[
                              * fAverageProcessorUse

g$ppK:HE#{"p%PPq0

n}/b.@;v[ i6b0   ' calculate the amount of work performed by the Web server
%S~5[O q8[f0   If (iAverageRPS > 0) Then51Testing软件测试网 SA j^/Yh Kh6`%t W4h
      GetPageCost = iSpentCyclesPerSecond / iAverageRPS51Testing软件测试网"p x2\D3GL1Y `m/j4N
   Else
+LE|p+})e^0      GetPageCost = 051Testing软件测试网/QXn%cm8?+`)A
   End If
#b1}!S$zHO-?7e0End Function
[ `+CA!cz%[0 
:|u.p!z4hq.K }E8{0使用页面成本的示例51Testing软件测试网%Z&DX)T'ocH @2`
了解页面成本有许多用途。

?D I(G6u^D'@]0

/D H |qh(Y4h0最显而易见的用途是比较两个不同页面的性能,或者比较同一页面在调整前后的成本。

)b#QJ$SYM Y1R]8K0

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

#{AU8c$yG A051Testing软件测试网*qs } l+_/l.Y K s"E

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

#`gs%Ol0

DJ4CZA|+ld0以下计算表明需要的处理器速度大约为 11900 MHz:51Testing软件测试网:O$Hm+UN_6TC'|

51Testing软件测试网f}"r4?x'I

                            page cost x target RPS51Testing软件测试网5]~7sL5y!x\O B
estimated processor speed = ______________________
i DbHu}6R2u0                                 processor use51Testing软件测试网0@,~)IYa*rX

l\t nh,a7~[0                            2 975 000 cycles/request x 1600 requests/s51Testing软件测试网)z*]7H1W6c [Gw&E xO
estimated processor speed = __________________________________________51Testing软件测试网;A?j6aP(mq(sKh
                                                0.40

z-B*dR!E0

f7TA'^7] c#F0estimated processor speed =  11 900 000 000 cycles/s51Testing软件测试网_6_@l d.BQab[

51Testing软件测试网 X+IP%F.}%m8G$W

number of 700 MHz processors needed = 11 900 MHz / 700 MHz = 17
$LAWL^6[x)_0新的性能目标要求 Web 服务器群集中有大约 17 个处理器,而原来只需 4 个。再次强调,这些估计仅当处理器速度是限制 Web 应用程序性能的因素时才有意义。

Y4U!uP X9e D0

TAG:

Kimiko的个人空间 引用 删除 Kimiko   /   2016-08-20 14:50:32
5
 

评分:0

我来说两句

Open Toolbar